Skip to content
Leakcheck

Leakcheck

github.com • November 28, 2026

Scan a folder for leaked API keys and secrets before you git push . Pure Python, no dependencies, offline. Secrets are masked in the output so the report itself does not leak them.

Exit code is 1 when anything is found, so it works as a pre-commit or CI step:

Detects AWS keys, GitHub tokens, OpenAI-style sk- keys, Slack tokens, Google API keys, Stripe live keys, PEM private keys, and generic password = "..." assignments. Skips .git , node_modules , virtualenvs, binaries and files over 1 MB. Patterns are in one dict at the top of leakcheck.py .

It is a regex scanner: it will miss some secrets and flag some false positives. If a real secret was ever committed, rotate it.

Or copy leakcheck.py into your project, it has no dependencies.

Extracted Entities