-
Notifications
You must be signed in to change notification settings - Fork 481
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
How does one run a scan against a current baseline? #246
Comments
Hi @oschrenk, thanks for making this. You are right that We do install a [1] Line 39 in 5d3e065
|
That does help. Wasn't aware of the second script. Thanks! |
Hey @KevinHock! I'm running into the exact same issue (I want to integrate My
However, after configuring my baseline and adding this to my repo, whenever I try to commit an obvious test secret it passes (in fact, it gives no indication that it even ran). When I run the same commit with |
So the pre-commit framework normally passes all the file names to detect-secrets-hook, unlike detect-secrets, the hook doesn’t default to scanning “.” when given no arguments. (usage.py, if curious) |
I see. Is there any chance that feature might be included? Or rather, an |
So your current command looks good except something else will need to add the file names. Technically, we could have the hook run git diff itself, given a certain flag, but that’s not something we’ve looked into. |
Right, so I could run something like this: detect-secrets-hook -v --exclude-lines=".*integrity.*" --no-db2-scan --keyword-exclude=".*secret.*" ./**/** which has the configurations I need, but I still need to run |
I fail to see how this is possible given the CLI options available. I guessed
detect-secrets scan --baseline .secrets.baseline
, but it does not recognise the option.This is confirmed by
detect-secrets scan --help
. There is no--baseline
option.How does one run a scan against a current baseline?
Background:
I’m asking because I am required to use this tool, but since we also use husky I wanted to use the detect secrets CLI for easy integration - that does not seem possible.
I thought the workflow for the
detect-secrets
CLI would be something like:But It seems that
scan
is only used for building the baseline and that there is a hard requirement on using the pre-commit hook to find new violations against the baseline. Is that assumption correct?The text was updated successfully, but these errors were encountered: