-
Notifications
You must be signed in to change notification settings - Fork 154
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
feat(output): Only fail secret scans when the secret is introduced #1010
feat(output): Only fail secret scans when the secret is introduced #1010
Conversation
455a373
to
ee9c949
Compare
ee9c949
to
db52127
Compare
db52127
to
f838e67
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1010 +/- ##
=======================================
Coverage 92.03% 92.03%
=======================================
Files 181 181
Lines 7706 7708 +2
=======================================
+ Hits 7092 7094 +2
Misses 614 614
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks to #1016, this PR is a lot simpler now. |
f838e67
to
b34d264
Compare
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
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.
Nice! And thanks for the great PR description ✨.
Context
Related to SPI-526 and will close #1001
We want to only fail secret scans when the secret is introduced.
New fields have been added to the API to automatically detect if the content is a diff and if the secret has been added, deleted or in the context. (GitGuardian/py-gitguardian#122)
not_introduced
as an ignore reasondiff_kind
to ignore policy breaksdiff_kind
can benull
(outside of commit) orADDITION
/DELETION
/CONTEXT
. We want to keep only the policy breaks withdiff_kind
:null
=> outside of commits, when scanning files or docker layersADDITION
=> introduced by a commitIn #1024, a
--all-secrets
option will allow user to display ignored secrets.Validation
When scanning the repository with
main
: 3 policy breaks are found in commit A, B and CWhen scanning with this PR: 1 policy break is found in commit A
PR check list
skip-changelog
label has been added to the PR.