You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Secrets Left: 1/1
Filename: test_secrets/file_with_secrets.py
----------
sed: can't read test_secrets/file_with_secrets.py: No such file or directory
Traceback (most recent call last):
File "/kevin/code/gh_detect_secrets/detect-secrets/three_six/bin/detect-secrets", line 11, in <module>
sys.exit(main())
File "/kevin/code/gh_detect_secrets/detect-secrets/three_six/lib/python3.6/site-packages/detect_secrets/main.py", line 43, in main
audit.audit_baseline(args.audit[0])
File "/kevin/code/gh_detect_secrets/detect-secrets/three_six/lib/python3.6/site-packages/detect_secrets/core/audit.py", line 40, in audit_baseline
original_baseline['plugins_used'],
File "/kevin/code/gh_detect_secrets/detect-secrets/three_six/lib/python3.6/site-packages/detect_secrets/core/audit.py", line 121, in _print_context
plugin_settings,
File "/kevin/code/gh_detect_secrets/detect-secrets/three_six/lib/python3.6/site-packages/detect_secrets/core/audit.py", line 212, in _get_secret_with_context
filename,
File "subprocess.py", line 336, in check_output
**kwargs).stdout
File "subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['sed', '-n', '1,9p', 'test_secrets/file_with_secrets.py']' returned non-zero exit status 2.
``
KevinHock
changed the title
Auditing is not robust
--audit crashes on non-existant files
Jul 10, 2018
When you audit a baseline, if a file has been removed, it crashes the audit command and you lose all your progress.
Progress should be saved after each keystroke, and system calls should be protected by a try ... catch block
How to reproduce
The text was updated successfully, but these errors were encountered: