Exposed API key checker
AI builders like to put every key in the same .env and then prefix them all with NEXT_PUBLIC_ or VITE_. That ships the secret to every visitor.
Fine in the browser
- Supabase anon key, and the newer sb_publishable_ key. Safety depends on Row Level Security.
- Stripe publishable key, the one that starts with pk_.
- Firebase web config, if the security rules are tight.
Not fine in the browser
- Stripe secret or restricted keys: sk_live_, sk_test_, rk_live_. A test key is still a secret.
- Supabase service_role JWTs and sb_secret_ keys. They skip RLS.
- OpenAI keys (sk- and sk-proj-), AWS access key ids (AKIA), GitHub tokens, Slack tokens, SendGrid keys, and private key blocks.
Check it yourself in two minutes
Open the live site, view source, and search for sk_live_, service_role, and AKIA. Then open the network panel, find a .js file, and search again. If you see one, remove it from client code, rotate it at the provider, and keep the replacement in a server-only variable.
The scanner does the same search on the homepage and the scripts that page loads from the same host. It shows a shortened fragment, not the whole key.