-
Notifications
You must be signed in to change notification settings - Fork 9
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
[Bug]: docs/guides/software-lifecycle/security/secrets-detection/README.md
#122
Comments
@nutjob4life - thank you for testing out our guide and for finding this bug! Appreciate you taking the time to report on this. I just tested out a test scan on a repository using the three approaches below:
I then ran the following command against each of the
So, it seems in terms of the guide, the pattern @nutjob4life - did you see have a use case where you tried to include other @perryzjc - I think @nutjob4life's suggestion is spot on and we may need an update to the guide to reflect. Probably a clarification about glob vs regex. Thoughts? |
Keeping glob patterns when the Here's what I ended up using for Python repositories:
And for Maven:
Although I'm still not happy with either of these. For example, suppose you've got a Python repository with
or a Maven package with
Then in the Python case, the module On top of that, the command-line argument is |
@nutjob4life - added your contribution to this PR: #143 Thanks again! |
Wooot! Thanks @riverma! 🥂 |
Resolved with #143 |
Checked for duplicates
Yes - I've already checked
Website or Best Practice Guide?
Best Practice Guide
Describe the bug
When I tried integrating
NASA-AMMOS/slim-detect-secrets
into a PDS Engineering Node project, I noticed that the instructions in this guide kept treating thedetect-secrets
command's--exclude-files
argument as a "glob" style file patterns:However, when I run
detect-secrets scan --help
, the usage says:which says it's a regex, not a glob.
So, diving into the code:
And sure enough
.search()
is a function on a regex object, not a shell glob.What did you expect?
I expected the docs to use regexes, not globs:
should become
The same should be applied to the
args
in the pre-commit config later in the docs.Reproducible steps
Environment
- `slim-detect-secrets` @ 91e097ad4559ae6ab785c883dc5ed989202c7fbe - Python 3.11 - macOS 14.0
The text was updated successfully, but these errors were encountered: