KeyLeak Detector
Find the API keys and open Supabase/Firebase tables your running app actually ships.
Static scanners read your source. KeyLeak watches the running app (traffic, JS bundles, headers) and tests whether your backend is readable with the public key. You get a verdict, redacted evidence, fix steps, and a re-test command. Reports stay on your machine. Website: keyleakdetector.com
Only scan apps you own or are authorized to test. Probes are read-only. Reports redact credential values.
Try it
-
Chrome extension (browse your app, see findings as pages load): Chrome Web Store
-
CLI (Python 3.12 or newer required; older Pythons install the outdated 0.5.0 release):
pip install keyleak-detector keyleak local . --launch-profile launch-gate --fail-on high python -m playwright install chromium # once, for browser scans keyleak browser-scan https://your-owned-app.example --baas-validate
-
Browser app (scans pasted text and files on your device, no Python): build and serve it locally.
Example result
keyleak local . --launch-profile launch-gate --fail-on high on a copy of the repository's fake-key fixture (fixtures/vulnerable-demo), trimmed:
BLOCK SHIP: 4 critical, 1 high, 4 medium, 1 low
5 high/critical exposure(s); static detections — verify before relying on them. Fix before release.
Re-test: keyleak local /private/tmp/acme-app --include ci,code,config,docker,env,logs,mcp,sourcemaps --launch-profile launch-gate --packs leak --fail-on high
Coverage: complete; 3/3 checks completed; 0 skipped, 0 failed.
- CRITICAL openai_api_key at /private/tmp/acme-app/.env.leaky: [redacted:8003d7c8]
- CRITICAL database_url at /private/tmp/acme-app/.env.leaky: [redacted:a15e8e37]
- CRITICAL openrouter_api_key at /private/tmp/acme-app/app.js.map: [redacted:f21e9200]
- HIGH mcp_config_secret at /private/tmp/acme-app/.env.leaky: [redacted:540d08fb]
...
Add --markdown, --html, --json, or --sarif for the full report. Each finding carries its fix:
### CRITICAL: openai_api_key
- Source: `/private/tmp/acme-app/.env.leaky`
- Evidence: `[redacted:9162cc36]`
- Fix steps:
1. Rotate the OpenAI key, remove it from client/config files, and load it server-side from a secret manager.
The command exits 2 when findings reach --fail-on or coverage is incomplete.
Why not just gitleaks or trufflehog
- The secrets that hurt are the ones users receive: injected at build time, served in bundles, or exposed by a backend with RLS off.
- Source scanners read the repository, so they miss what only exists in the built or running app.
- Use KeyLeak next to your source scanner, not instead of it.
What it detects
- API credentials, private keys, and JWT risks in browser responses, JS bundles, source maps, and local files.
- Supabase, Firebase, Appwrite, PocketBase, and Convex configuration or access-control issues.
- Risky npm lifecycle hooks, CI workflow settings, and exposed local configuration.
- Opt-in application-security leads, labeled for review when they are not validated exploits.
Safe use
- Scan only systems you own or have permission to test.
--baas-validatesends active read-only probes to the Supabase/Firebase project the app uses, with the key found in the app; leave it off unless you are authorized.- Apart from that, detected keys are never sent to their provider to check whether they are live. Details: security model.
CI
- uses: actions/checkout@v4
- uses: Amal-David/keyleak-detector@v0.7.0
with:
mode: local
fail-on: high
Browser mode, SARIF upload, and preview-deployment examples: GitHub Action guide.
More
- Scanner workflows: every command, coverage options, verdicts, exit codes
- Chrome extension: unpacked ZIP, native host, permissions
- Browser app
- Binary and archive scanning
- Agent runbook and skills and integration audit
- Python secret serialization review
- PHP patch assessment and incident checks
- Convex support
- Releases and packaging and changelog
Contributing, security, license
See CONTRIBUTING.md to set up a checkout and add detectors. Report vulnerabilities privately through SECURITY.md; review ownership is in MAINTAINERS.md. MIT licensed: LICENSE.
Metadata
Release files for keyleak-detector 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| keyleak_detector-0.8.0.tar.gz | 202.6 kB | With provenance | Details for keyleak_detector-0.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| keyleak_detector-0.8.0-py3-none-any.whl | Python 3 | none | any | Details for keyleak_detector-0.8.0-py3-none-any.whl |
Total release size: 431.6 kB
Release files / keyleak_detector-0.8.0.tar.gz
| Download URL | keyleak_detector-0.8.0.tar.gz |
|---|---|
| Size | 202.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab6802c4964a9510e8a118e0023bf954510c309b5cb5078a2ad50c9e37e562cf
|
|
BLAKE2b-256 checksum How to use checksums |
9da9ce0192cb0a18417d6658a10aedf1d22afb9208bc93c895d2487f0c936653
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logRelease files / keyleak_detector-0.8.0-py3-none-any.whl
| Download URL | keyleak_detector-0.8.0-py3-none-any.whl |
|---|---|
| Size | 229.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c46bd952a9867a265a1b068d431b2b0b2e403f6fb155862946292641e3d6103
|
|
BLAKE2b-256 checksum How to use checksums |
01f8a7dd013ed88abbe79c4b70bbbb9de834aea17b753247ef86d51f3f0eac06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logSecurity for keyleak-detector 0.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for keyleak_detector-0.8.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.