← Blog · 21 October 2026
Is my API key exposed in my Lovable or Bolt app? How to check in a few minutes
Quick answer: open your live app, press F12, and search the loaded JavaScript for sk-, sk_live_, service_role and AKIA. If you find one, treat the key as stolen. Or paste your app's address into the free Vibe-App Watchdog scan and we check it for you, without logging in or touching your data.
Why this happens in vibe-coded apps
When you ask Lovable, Bolt or Cursor to "add AI" or "add payments", the fastest working answer is sometimes to put the key straight into the front end. It works on the first try, so nobody notices. But everything in the front end is downloaded by every visitor. Anyone who opens the browser's developer tools can copy the key and use it on your bill.
Automated tools scan public code for keys. If one finds yours, someone else can use it, and a leaked OpenAI or Stripe key can lead to unexpected bills.
Which keys are fine to show, and which are not
Some keys are made to be public. Others must never leave your server.
- Fine in the browser: the Supabase
anonor publishable key, the Stripe publishable key (pk_live_), a Firebase web config, and analytics IDs. These are safe only if the rest of your setup is right, for example Row Level Security on every Supabase table. - Never in the browser: OpenAI keys (
sk-orsk-proj-), Anthropic keys (sk-ant-), Stripe secret keys (sk_live_orrk_live_), the Supabaseservice_rolekey orsb_secret_key, AWS keys (AKIA), and email keys from Resend or SendGrid.
The quick manual check
- Open your live app in Chrome, not the editor preview.
- Press F12 and open the Sources tab (or Network, then filter by JS).
- Press Ctrl+Shift+F (Cmd+Option+F on a Mac) to search all files.
- Search one by one for
sk-,sk_live_,service_role,sb_secret_,AKIAandSG.. - Also check that your
.envfile is not public: visityour-app.com/.env. You should get a 404 page, not text.
If nothing shows up, good. If you are not sure what you are looking at, run the free scan. It shows any key it finds only in masked form and never saves it.
Found a key? Do this today
- Rotate it first. Create a new key in the provider's dashboard and delete the old one. Removing it from the code is not enough, because it may already be copied.
- Move the call to the server. In Lovable or Bolt with Supabase, ask the AI: "Move this API call into a Supabase Edge Function and read the key from a secret, not from the front end." In Cursor with Next.js, use an API route and a server-only environment variable without the
NEXT_PUBLIC_prefix. With Vite, anything starting withVITE_ends up in the browser. - Set a spending limit with OpenAI, Anthropic and your cloud provider, so a future leak cannot run up a big bill.
- Check again after every change. AI tools sometimes put the key back when you ask for a new feature.
Keep an eye on it
Keys can come back when an app changes. Vibe-App Watchdog runs a passive outside check of your live app and gives you a score from 0 to 100 with plain-language tips. The first scan is free: check your app now.