-
Notifications
You must be signed in to change notification settings - Fork 482
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
Multiple filters support and secret filter by regex #391
Multiple filters support and secret filter by regex #391
Conversation
Hello @domanchi, this pull request resolves the problem described in #403. This feature could improve the usability and the configuration of the detect-secrets tool, without any impact in its performance. Moreover, the users still could use only one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! A couple of things to add, before we can merge this:
- Be sure to document this in the filters documentation
- As this adds a new flag, be sure to also update the README (here, and here)
- Since this modifies the baseline, you also need to modify the upgrade script to ensure backwards compatibility
Thank you for your detailed comment @domanchi , I think that everything is updated with these commits. |
I have verified that all tests pass with this branch. |
* Fix disable flags for pre-commit Follow up of Yelp#379 * docstrings
To deliver fix from Yelp#391 to users
This Pull Request includes the following features:
--exclude-lines
and--exclude-files
. The user can apply multiple regexes to filter the output of detect-secrets.secret
filter by regex: it could be interesting to discard fake secrets of secrets that are external references to, for example, environmental variables.The
tests/filters/regex_filter_test.py
has been updated to the multiple regexes support and includes thetest_should_exclude_secret
that tests the new secret filter.