-
Notifications
You must be signed in to change notification settings - Fork 537
Support to extract pragmas for detect-secrets-server #346
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
Conversation
Supports git-defenders/detect-secrets-discuss#402
|
Whoops! I realize this was never merged. I'm going to go ahead and port this change to our
@francisluz : mind being the reviewer for the change, so we can verify that it works as designed? |
|
Hey @domanchi, I don't mind at all π I also need to create another PR to server to include some changes there. |
|
Actually, now that I think about this more @francisluz, what's the difference between this feature, and: |
Hey @domanchi , Well, I actually started this by using the grep which is not much different, but I had some issues because our Jenkins runs some sensitive data masking on it, then I couldn't generate the output list with the real values. Then I had to implement it inside of the code where it was out of Jenkins scope. |
|
Huh. Very interesting. I'm always curious to learn more about how different teams are using this tool in their various workflows. Be on the look out for a PR for this early next week. |
|
Awesome, definitely make sense as you guys have the big picture of the tool to understand more about its use. Btw, just open the Thanks @domanchi, |
|
Apparently, it was easier to implement than I expected. @francisluz , be sure to check out the linked PR and verify it on your end manually, to see if I missed anything in the port. You can do so via: If you wanted to do it specifically with |
|
Closing as done, since I've already ported it in the linked review. |
Supports git-defenders/detect-secrets-discuss#402
ποΈ Description
As a
detect-secrets-serveruser, I would like to extract all pragmas in my codebase where I can validate the use ofpragma: allowlist secrets.π‘ Solution
Using the current process that loop through the code and plugin, one more step was added to extract the pragmas. This is an optional feature where on the server side will be triggered through a new flag called
--extract-pragmaswhich will be pushed in its proper PR ondetect-secrets-serverrepo.As
scan_diffis called only bydetect-secrets-serverthis feature will be available only there.β Time complexity
The performance impact on the
scanif this feature is enabled, will be O(n+1) whereextract-pragmasis considered an extra plugin run.π Hope you guys like this feature, we're already using it in our internal CI process.
π Feel free to reach me out.