-
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
--baseline <FILE> returns no results #183
Comments
Hi @lirantal, Can you post a stack trace or example invocation so that we can better debug it? |
@domanchi sure, how can I provide you with a stacktrace or anything useful to debug it? So reminder that I installed detect-secrets in a container and I mounted the top level directory with .git as a volume there. When I run it without the baseline I get this kind of output:
When with baseline I get nothing printed:
However, when I run the baseline command like above from the host machine (not inside a container) it works fine. |
One difference that I now noticed is:
|
The output you provided helps! My hypothesis is that this is expected behavior. The detect-secrets-hook is meant to be used as a pre-commit hook, and will only complain if things are found. However, if a baseline is provided, it will ignore the secrets provided in the baseline. Methods to check whether my hypothesis is accurate:
|
I realized the issue is that I hadn't had I have a docker image bundling this for easy compatibility:
So you can now do something like: docker run -it --rm --name detect-secrets --volume `pwd`:/usr/src/app lirantal/detect-secrets "src/index.js" "src/component.js" |
* Add basic auth detection for just PAT, no username * Cover other cases * Address @xianjun comments
* Add basic auth detection for just PAT, no username * Cover other cases * Address @xianjun comments
I'm running
detect-secrets-hook
from a container with the current directory mounted. What would be some reasons that when I add a baseline I get no results and no error at all, but when I remove it and leave out just the file name, such as:detect-secrets-hook something.json
it reports correctly.What could be the reasons for that?
I'm using version 0.12.2
The text was updated successfully, but these errors were encountered: