-
Notifications
You must be signed in to change notification settings - Fork 486
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
detect-secrets not identifying all the secret occurrences in a file #493
Comments
Hi @lorenzodb1 any update on this? |
Hey, this is mentioned in the docs, to avoid this you can do the following: |
I'm running into this issue as well. Would it be worth adding a command line flag/programmatic setting of this behavior? |
I'll give it a go but the devs have been inactive for a while, I doubt they'll accept it. Still I'll drop the link to my forked repository. |
Hello everyone, apologies for the delayed reply. I've gathered some context around this issue and it turns out that this is actually a feature ™. Jokes aside, the idea behind this is that if |
Hi @lorenzodb1 thank you for the update. |
If the secret written into a file at multiple locations, only the first one being identified by detect-secrets. Remaining instances are not getting reported by detect-secrets.
Example code in demo.txt
Now run the detect-secrets scan on the above file and observe that the issue will be reported only at the line 1 and it is not reported the line number 3.
The text was updated successfully, but these errors were encountered: