Profile
Back to NewsBack
GitHub Trending 3 min
Reader Mode
Amal-David/keyleak-detector: Find API keys and open Supabase/Firebase tables your running app actually ships. Chrome extension + CLI.

Amal-David/keyleak-detector: Find API keys and open Supabase/Firebase tables your running app actually ships. Chrome extension + CLI.

16 hours ago

KeyLeak Detector

Find the API keys and open Supabase/Firebase tables your running app actually ships.

PyPI</a> License</a> GitHub stars</a>

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

!KeyLeak scan ending in BLOCK SHIP

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

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-validate sends 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
  with:
    mode: local
    fail-on: high

Browser mode, SARIF upload, and preview-deployment examples: GitHub Action guide.

More

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.

Chat with me