← Blog · 22 October 2026
Is a secret API key hiding in your app's frontend?
When you ask Lovable, Bolt or Cursor to "connect to OpenAI" or "add Stripe", the quickest code it writes may call the service straight from the browser. That means your secret key ships to every visitor.
Some keys are meant to be public, like a Supabase anon key or a Stripe publishable key. Secret keys are not. Anyone who finds one can run up your bill or reach your data.
A quick check:
- Open your live app, press F12, open the Sources tab, press Ctrl+Shift+F (Cmd+Option+F on Mac) and search for "sk_", "secret" and "api_key".
- Move any secret key into a server function or edge function, stored as an environment variable.
- Rotate every key that was exposed, since old copies may already be out there.
For a longer walkthrough, see Is my API key exposed in my Lovable or Bolt app?
Want an outside check of your live app? Run a free scan at Vibe-App Watchdog.