Skip to content

Add custom secret detection pre commit hook#1220

Closed
StenLeinasaar wants to merge 2 commits intopre-commit:mainfrom
StenLeinasaar:FEATURE-detect-secrets-from-custom-regex
Closed

Add custom secret detection pre commit hook#1220
StenLeinasaar wants to merge 2 commits intopre-commit:mainfrom
StenLeinasaar:FEATURE-detect-secrets-from-custom-regex

Conversation

@StenLeinasaar
Copy link

Hook allows taking in a txt file with regex patterns for people to define their custom secrets or token structures.

In addition allows flexibility to include newly emerging API key structures or vendor tokens with regex pattern.

More customizable and modifiable than detecting private key or aws credentials.

Essentially can allow defining azure, digital ocean, gcp, or any provider's token structure.

@asottile
Copy link
Member

in the future please discuss features before wasting time on them

this entire hook is obsoleted by pygrep which is built in to pre-commit

@asottile asottile closed this Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants