Open your own site, press F12, go to Sources, and search every JavaScript file for key, secret, token and sk_. AI-generated apps regularly ship credentials inside the bundle because the generator put them in client code, or because a build tool exposed an environment variable that was meant to stay private.
What is safe and what is not
Safe in a browser bundle: Supabase anon key, Firebase web config, Stripe publishable key (pk_), Google Maps keys restricted by referrer. These are designed to be public, but only with proper rules or restrictions behind them.
Not safe: Stripe secret key (sk_live_), Supabase service_role key, OpenAI or Anthropic API keys, database URLs with passwords, AWS keys (AKIA...), webhook secrets, private JWT signing keys.
How to check your own app
- In DevTools Sources, use "Search all files" (Ctrl+Shift+F) for:
sk_live,service_role,sk-,AKIA,postgres://,BEGIN PRIVATE KEY. - Check the framework rule: in Next.js only
NEXT_PUBLIC_variables go to the browser, in Vite onlyVITE_. Anything with those prefixes is public. - Fetch your
.js.mapfiles. If they exist, original source including comments is readable.
Only check apps you own.
Fix
- Rotate any secret that appeared in the bundle. Removing it from code does not un-leak it.
- Move calls that need a secret to a server route or edge function, and call that from the browser.
- Remove
NEXT_PUBLIC_orVITE_from names of anything private. - Add a secret scan to CI so keys do not return.
Check your own app from the outside, free. Run the free ProofForge scan on your live URL. No account needed for the first scan. It looks at your public site the way a stranger would and says pass, fail or inconclusive, so you know what is confirmed and what it could not see. One-time reports start at $9: see pricing. Building with an AI agent? There is an MCP server so it can check before it deploys.
Top comments (0)