-
Notifications
You must be signed in to change notification settings - Fork 914
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
Replace trufflehog with detect-secrets #4404
Conversation
Signed-off-by: Elena Khaustova <[email protected]>
Signed-off-by: Elena Khaustova <[email protected]>
Signed-off-by: Elena Khaustova <[email protected]>
Signed-off-by: Elena Khaustova <[email protected]>
Signed-off-by: Elena Khaustova <[email protected]>
Signed-off-by: Elena Khaustova <[email protected]>
Signed-off-by: Elena Khaustova <[email protected]>
Signed-off-by: Elena Khaustova <[email protected]>
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.
Tested locally and it works well... awesome work @ElenaKhaustova . Thank you
@@ -40,11 +40,9 @@ repos: | |||
pass_filenames: false | |||
entry: lint-imports | |||
|
|||
- repo: local | |||
- repo: https://github.com/Yelp/detect-secrets |
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.
Thanks for the PR, @ElenaKhaustova!
Could you please provide some context on:
- Why we changed the architecture from
local
torepo
(and removedsecret-scan
from the Makefile)? - In this case, do we still need the
detect-secrets~=1.5.0
dependency inpyproject.toml
?
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.
Previously we had secret-scan
command in the Makefile
and pre-commit used this command as entry point (local). Now we use proper pre-commit hook (https://github.com/Yelp/detect-secrets) to run locally and an executable is still needed.
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.
LGTM! Tried locally
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.
thanks for PR and clarification, @ElenaKhaustova !
Worth doing this in the other repos too - |
Yep, makes sense - I will keep original issue opened until we make it for other repos 👍 |
Description
Solves #4062
Development notes
In this PR we replace
trufflehog
withdetect-secrets
- https://github.com/Yelp/detect-secrets for secrets detecting locally and at the CI:detect-secrets
as a test dependency;.secrets.baseline
- a baseline of potential secrets currently found in git repository against which further checks are done. So they are not considered as newly added secrets.detect-secrets
on committed files only;detect-secrets
to scan all tracked files;trufflehog
dependency andsecret-scan
make command.CI test: 8d7da69
To test locally:
1.
make install-test-requirements
2.
make install-pre-commit
3. Add some key to the codebase and try to commit changes
Developer Certificate of Origin
We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a
Signed-off-by
line in the commit message. See our wiki for guidance.If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.
Checklist
RELEASE.md
file