Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use baselines in config file #75

Open
ghost opened this issue Feb 9, 2021 · 0 comments
Open

Cannot use baselines in config file #75

ghost opened this issue Feb 9, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Feb 9, 2021

Hi,

Whenever I refer to an existing baseline in the config YAML, I receive the following error:

Traceback (most recent call last):
  File "/usr/local/bin/detect-secrets-server", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/detect_secrets_server/__main__.py", line 37, in main
    return actions.scan_repo(args)
  File "/usr/local/lib/python3.8/dist-packages/detect_secrets_server/actions/scan.py", line 32, in scan_repo
    secrets = repo.scan(
  File "/usr/local/lib/python3.8/dist-packages/detect_secrets_server/repos/base_tracked_repo.py", line 163, in scan
    baseline = self.storage.get_baseline_file(self.baseline_filename)
  File "/usr/local/lib/python3.8/dist-packages/detect_secrets_server/storage/base.py", line 141, in get_baseline_file
    return git.get_baseline_file(
  File "/usr/local/lib/python3.8/dist-packages/detect_secrets_server/storage/core/git.py", line 83, in get_baseline_file
    return _git(
  File "/usr/local/lib/python3.8/dist-packages/detect_secrets_server/storage/core/git.py", line 206, in _git
    output = subprocess.check_output(
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', '--git-dir', '/root/.detect-secrets-server/repos/5b0da728830dfec0ad460e8451f809f4576b338e4fcc2489726ebe73bcc30279bf972376733ae5a0f4026ff7aa4e2dfbb504526452b2246fefb42330e700a35b', 'show', 'HEAD:/workdir/project.secrets.baseline']' returned non-zero exit status 128.

When I delete the baseline line from the config file, it works. I've also tried adding the full path, but it still didn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants