For any live site you own
How to check a website for leaked API keys
Direct answer
If a server secret is in the HTML or JavaScript your live site already serves, it is public. You can confirm that yourself: open the production URL you own, list the scripts the page loads, and search those files for known key prefixes. Rotate anything that should never have left the server, then rebuild and search again.
LeakLatch does this as a free, read-only scan of a URL you own. It fetches the page, inline scripts, and up to 15 linked or preloaded JavaScript files, matches known secret patterns, and — when a public Supabase URL and anon key are already on the page — makes a read-only request to list table names and row counts. It also checks basic security headers. You get a risk score, redacted findings, and a fix prompt. It is not a substitute for a penetration test, and it will not see secrets that only exist on the server or on routes it does not load.
Owner checks
How to search the bundle yourself
Use these on a site you own or have permission to test. They are pre-ship checks, not a penetration test, and they do not involve writing to the application or its database.
Step 1
Use the live URL, in a logged-out window
Open the production site you own — not localhost, not a preview deploy unless that is what you are about to share. A private or logged-out window is enough. The question is what an unauthenticated visitor can already download. You must own the site or have permission to test it. Do not run this against other people’s apps.
Step 2
List every JavaScript file the page loads
View source. Collect script tags with a src attribute, and also link tags whose rel is modulepreload, or preload with as="script". Those extra links are easy to miss and often hold the Next.js or Vite chunks where a bundler inlined an env var. Open the HTML itself as well: secrets sometimes sit in an inline script or a JSON blob in the page.
Step 3
Search for secret prefixes, then decide which matches are actually secret
In each file, search for sk_live, sk_test, sk-proj-, sk-ant-, AKIA, ghp_, github_pat_, re_, service_role, sb_secret_, and eyJ (a JWT prefix). A Stripe pk_ key and a Supabase anon or sb_publishable_ key are designed to be in the browser; do not treat those as incidents on their own. A Stripe secret, OpenAI or Anthropic key, AWS access key ID, GitHub token, Resend key, Supabase service_role JWT, or sb_secret_ key is an incident. If you are unsure, assume it is secret, rotate it, and move the new value to the server.
Step 4
If a Supabase URL and anon key are on the page, check the tables separately
The anon key is not a leak, but it is enough to query any table that is exposed without working Row Level Security. In the Supabase dashboard, use the Security Advisor and confirm RLS is enabled on every table in an exposed schema. LeakLatch will also list table names and row counts with a read-only GET when those public credentials are already on the page. It does not store or show row contents.
Step 5
Rotate, rebuild, and search the new bundle
A secret in a compiled chunk stays there until you ship a new build. Removing it from .env or renaming a VITE_ / NEXT_PUBLIC_ variable does not edit the file already on the CDN. Revoke the old key at the provider first, keep the new one in a server-only variable, redeploy, and repeat the search on the live URL. See also whether VITE_ and NEXT_PUBLIC_ variables are public.
What the scan covers
Be precise about what is checked
Most leaked keys in vibe-coded apps never sat in a public git repo. They were pasted into a client component, or stored under a VITE_ or NEXT_PUBLIC_ name, and the bundler wrote the literal value into a hashed .js file. Repository scanners miss that. Looking at the deployed page is the ground truth. A short note on the same idea is in Check your JS bundle before you share the link.
LeakLatch will not invent findings it cannot see. It does not crawl every path on your site, does not fetch source maps, and does not open your hosting dashboard. If a secret only loads after a client-side navigation to another route, you should open that route yourself and repeat the search, or scan that URL separately. If you use Supabase Storage, public buckets are a different issue — see when a public Storage bucket is a problem— and are not inferred from a JavaScript search.
Related guides if you already know the stack: Lovable + Supabase keys, Bolt.new API keys, Replit API keys, and Cursor app API keys.
Copy-paste fix
Prompt you can paste into Cursor or Claude
After you rotate any secret that already shipped, paste this into Cursor, Claude, or Lovable and point it at your own project.
You are helping me fix leaked secrets on a site I own. Do not introduce new secrets into client-side code. Keep existing product behavior working. 1. Search the repository and the built frontend bundles for server secrets (Stripe sk_live / sk_test, OpenAI, Anthropic, AWS access keys, GitHub tokens, Resend, Supabase service_role or sb_secret_ keys, and similar). Move every secret into server-only environment variables or server handlers. Never put them in VITE_, NEXT_PUBLIC_, PUBLIC_, or other client-exposed env vars. 2. If the app uses Supabase, enable Row Level Security on every table in an exposed schema. Replace policies that allow the anon role to read or write all rows (for example USING (true)). 3. Rotate any secret that was already shipped in a public bundle, then confirm the old value no longer works. 4. Do not log or print full secret values.
FAQ
Straight answers about searching a bundle
If I cannot find a key in DevTools, is the site clean?
Not necessarily. You might have missed a preloaded chunk, a later route that loads another bundle, or a secret that does not match a well-known prefix. A search of the files this page loads is a pre-ship check, not a full audit.
What does LeakLatch actually fetch?
The live page you submit, any inline scripts on that page, and up to 15 JavaScript files referenced by script src, modulepreload, or preload-as-script links, within a short time budget. It then looks for known secret formats, may make read-only Supabase table-list requests when a public URL and anon key are already on the page, and checks basic security headers. It does not follow source maps, does not crawl every route, does not download arbitrary .env files unless they appear in the HTML or scripts it already fetched, and does not log in or write to your app.
Will LeakLatch show the full key in the report?
No. Secret values are redacted. You still need to rotate anything it flags, because a visitor could have read the same file before you did.
Can I paste any URL I find?
No. You must confirm you own the site or have permission to scan it. Unsolicited scanning of other people’s sites is not allowed.
Want this check done for you, read-only?
Paste a URL you own. LeakLatch returns a score, redacted findings, and a fix prompt.
Scan my site free