What the checker detects
| Provider | Pattern | Severity |
|---|---|---|
| AWS | AKIA… access key IDs, 40-character secret keys | HIGH |
| Stripe | sk_live_, rk_live_, whsec_ / sk_test_ | HIGH / MEDIUM |
| GitHub | ghp_, gho_, ghu_, ghs_, ghr_, github_pat_ | HIGH |
| OpenAI / Anthropic | sk-proj-…, sk-… / sk-ant-… | HIGH |
API keys AIza…, OAuth client secrets GOCSPX-… | HIGH | |
| Slack, SendGrid, Mailgun, Twilio | xox…, SG.…, key-…, SK… | HIGH |
| npm, Hugging Face | npm_…, hf_… | HIGH |
| Private keys | -----BEGIN [RSA|EC|OPENSSH|…] PRIVATE KEY----- | HIGH |
| JWTs, generic passwords | eyJ….eyJ….…, password=… | MEDIUM |
Patterns catch credentials by their format, so they work offline and need no account. They can't judge whether a key is still active; only the provider's dashboard can.
How the breach check keeps your secrets private
- Passwords: your browser computes SHA-1(password) and sends only the first 5 hex characters to Have I Been Pwned (via our server, which adds padding). HIBP returns every breached hash with that prefix (hundreds); the comparison with the full hash happens in your browser.
- API keys and tokens: your browser sends SHA-256(key) to our server, which looks it up in a table of keys known to be public. A 256-bit hash of a random key can't be reversed, and the key itself is never transmitted.
- Both checks are off until you start them, and the pattern scan works without them.
You can watch the requests in your browser's DevTools (Network tab): the request bodies contain only a hash prefix or a SHA-256 digest.
A secret leaked: what to do, in order
- Revoke or rotate the key at the provider immediately. This is the only step that actually stops misuse.
- Check the provider's logs (AWS CloudTrail, Stripe events, GitHub security log) for use you don't recognise.
- Remove it from the code and from git history if needed (
git filter-repo), then force-push and ask collaborators to re-clone. - Prevent the next one: add
.env*to.gitignore, a pre-commit secret scanner, and GitHub push protection.
# scan the whole git history locally with an open-source scanner gitleaks git --verbose . # or with trufflehog (verifies some keys against the provider) trufflehog git file://. --only-verified
The guide how to hide .env from git covers removing committed secrets step by step. For sharing a .env safely in the future, encrypt it first with the ENV encrypt tool.