Free tool
Exposed API key checker
Paste your app's URL. LeakFix downloads the page and up to eight of its JavaScript files — the same files every visitor's browser gets — and looks for secret keys that should never be there. It's free, needs no signup, and takes about ten seconds.
Check a URL
For apps you own or are authorized to test. We only fetch public pages, the way a browser does.
What does the checker look for?
Three things, all from the outside, exactly as an attacker would see your app:
- Secret keys in the page HTML and its same-origin scripts (the table below).
- An open Supabase API. If your app talks to Supabase with the older anon key, we check whether its API answers requests made with that public key. That's normal — but it means row-level security has to be right on every table.
- Security headers and CORS: HTTPS, HSTS, Content-Security-Policy,
X-Content-Type-Options, clickjacking protection, and CORS that lets any site make logged-in requests.
| Key | What it looks like | Severity |
|---|---|---|
| Stripe secret key | sk_live_… | Critical |
| Stripe restricted key | rk_live_… | Critical |
| OpenAI API key | sk-…, sk-proj-… | Critical |
| Anthropic API key | sk-ant-… | Critical |
| Supabase secret key | sb_secret_… | Critical |
| Supabase service_role key (older format) | a JWT (eyJ…) whose role is service_role | Critical |
| AWS access key ID | AKIA… | Critical |
| GitHub token | ghp_…, github_pat_… | Critical |
| SendGrid API key | SG.….… | Critical |
| Private key | -----BEGIN … PRIVATE KEY----- | Critical |
| Google API key | AIza… | Warning |
| Slack token | xoxb-…, xoxp-… | Warning |
Google keys are a warning rather than critical because many of them — for Maps or Firebase — are meant to be in the browser. Make sure each one is restricted to your domain and to the APIs you actually use.
Which keys are safe to have in the browser?
Some keys are designed to be public. They identify your project; something else decides what they can do:
- Supabase anon or publishable key (
sb_publishable_…) — safe only if row-level security is on for every table that holds real data. See how to check RLS. - Stripe publishable key (
pk_live_…). - Firebase web config — access is controlled by your Firebase Security Rules, not by keeping the key hidden.
- Google Maps keys restricted to your domain.
Everything else stays on a server: anything called "secret" or "service role", and server API keys for OpenAI, Anthropic, Stripe, AWS or your email provider.
How do secret keys end up in a front-end bundle?
- A public environment-variable prefix. Build tools copy certain variables into the JavaScript they ship: anything starting with
VITE_(Vite, which Lovable uses),NEXT_PUBLIC_(Next.js),REACT_APP_(Create React App) orEXPO_PUBLIC_(Expo). Put a secret key in one of those and every visitor gets it. - Calling a paid API straight from the browser. If your front end calls OpenAI or Stripe directly, the key has to be in the browser. The fix is a small server function that makes the call for it.
- A key pasted into a component while iterating with an AI tool, and never moved out.
I found an exposed key. What now?
- Rotate it first. Create a new key and revoke the old one at the provider. Deleting it from your code isn't enough: the old bundle has already been downloaded and may be cached. See the guides from Stripe and Supabase.
- Move the call to a server — an API route, a serverless function, or a Supabase Edge Function that reads the key from a server-only secret.
- Check for misuse. Look at the provider's usage, billing and logs for the time the key was public.
- Redeploy and run the check again.
- If the key was ever committed to git, it's in your history too. Rotating is what actually protects you. GitHub secret scanning can alert you to keys committed in the future.
What this checker can't see
- Your server code and server-side environment variables — which is where secrets belong.
- Scripts loaded from other domains, scripts beyond the first eight, and code-split chunks that only load later.
- Your repository: committed
.envfiles, keys in server code, missing row-level-security migrations. - Logic flaws such as missing auth checks, missing rate limits or unsafe input handling.
The $49 Launch check scans your repository for committed keys, .env files, row-level security, security-header config and CORS, then opens a pull request with safe, additive fixes. For everything else, work through the launch security checklist.
Questions
Is it safe to paste my URL here?
We fetch the public page and its same-origin scripts, the way a browser does. We don't log in, submit forms or try exploits. Only check apps you own or are authorized to test (Terms, section 3).
Do you keep what you find?
The URL you submit and the scan result are handled as described in the Privacy Policy. Any key we report is shown redacted.
Does a clean result mean my app is secure?
No. It means these checks found nothing in your public files. It's a best-effort check, not a penetration test.
How is this different from GitHub secret scanning?
GitHub scans what's committed to your repository. This checks what your live site actually serves to browsers. A key can be in one and not the other, so use both.
Want the fix, not just the finding?
The Launch check is a one-time $49 — no subscription, no account. Connect a GitHub repo, pay, and get a plain-English report plus a pull request you review and merge.