Yelp / detect-secrets

An enterprise friendly way of detecting and preventing secrets in code.
Apache License 2.0
3.58k stars 449 forks source link

Configure to only warn, for pre-commit hook config #854

Open Architrixs opened 2 weeks ago

Architrixs commented 2 weeks ago
gpflaum commented 2 weeks ago

@Architrixs Assuming you are running on Linux, you can ignore the exit code by adding || true to the command, like this:

git diff --staged --name-only -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline || true
gpflaum commented 2 weeks ago

Sorry, I missed that you are using pre-commit. I don't know how to do it in that framework.

Architrixs commented 2 weeks ago

so, could this be a potential feature?

Sorry, I missed that you are using pre-commit. I don't know how to do it in that framework.

lorenzodb1 commented 1 week ago

Could this help?

Architrixs commented 1 week ago

Could this help?

Thanks, I'll check it out.