forked from Yelp/detect-secrets
-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Describe the bug
Detect secrets does not seem to be applying the filter set by .exclude.lines found in the baseline file. This leads to findings appearing which should be caught by this rule. Setting the value through the CLI flag --exclude-lines behaves as expected and the findings are filtered out.
To Reproduce
Steps to reproduce the behavior:
- Create a new empty folder
- Create a file containing the line
secret: mysecret - Run detect secrets as follows:
detect-secrets scan --update .secrets.baseline --exclude-lines "secret" --all-files - View the baseline file, no results should be found and the value of
.exclude.linesshould equal"secret:" - Run detect secrets again as follows:
detect-secrets scan --update .secrets.baseline --all-files - Reload the baseline file and observe that results is no longer empty
Expected behavior
After running detect-secrets with the --exclude-lines flag, running the scan again without this flag should result in the same baseline file being generated.
Impact
This prevents us using the tool in CI as our production repo contains too many findings to audit by hand without being able to exclude specific keywords from the scan.
Additional context:
- OS:
Windows 11 Enterprise (Version 10.0.22621 Build 22621),Ubuntu 22.04.02 LTSR - Python Version:
3.11.2 - Detect Secrets Version:
0.13.1+ibm.61.dss - Languages Scanned:
.txt,.go,.yaml
vician
Metadata
Metadata
Assignees
Labels
No labels


