Is my Bolt app secure? What Bolt checks, and what to check yourself
Short answer: Bolt gives you real security tools, but no scan can tell you an app is secure, and a Bolt app is only as safe as its last edit. In practice the question comes down to six checks: (1) Bolt's security audit has run and its action items are done; (2) no secret key sits in a VITE_ variable or in frontend code; (3) every table has Row Level Security (RLS) on, with policies that check who owns the row rather than using (true); (4) no secret key is in the JavaScript your live site serves; (5) a logged-out stranger can't read private data; (6) file buckets, HTTPS, security headers and exposed files are in order. Then re-check after launch, because every prompt can undo any of them.
What Bolt already checks for you
Bolt's Help Center describes two built-in security checks (Bolt: Check your project's security):
- Project security audit (Publish → Run security audit): "Reviews your whole project, including your code and database, fixes what it can, and flags anything you need to handle." It is available on paid plans, and neither the audit nor its fixes use your tokens. It covers who can see and change your data, what your app makes public, sign-in and sessions, ways your app can be misused, visitor input such as file uploads, and "Your keys and security settings": Bolt checks that "private keys and passwords aren't stored in your project's code or sent to visitors' browsers". You can run up to 30 audits a day.
- Database security check (database icon → Security): available on all plans, and it checks only your database, not your code. It uses "the same database checks as the Security Advisor in Supabase" and labels each result Error, Warning or Info, with an Ask Bolt to fix button (Bolt: Database security settings).
- Secrets: Bolt keeps API keys and passwords in a Secrets tab that your server functions read, "without exposing them to users", and prompts you to add one when your code needs it (Bolt: Database secrets settings).
- Defaults: "Bolt turns on RLS for the tables it creates." Bolt's security page says the same about generation: when code touches a database, it follows RLS practices "as far as the application allows" (Bolt: Security & Trust).
These tools see what no outside scan can: your code, your policies and your server functions. Use them first.
Where gaps can remain
- You have to run the audit. Bolt's docs say "we recommend running a security check at least once before you publish", and after the audit finishes the button reads "Security audit up to date" until you change the project. The docs we read don't describe it re-checking your live site over time. Bolt's security page mentions an automatic review you can turn on that "reviews every app before it goes live"; we couldn't find that setting in the Help Center, so check your own Publish menu.
- On a free plan you only get the database check, which "checks only your database, not your whole project".
- "RLS is on" isn't "RLS is right". If you haven't added sign-in, "Bolt might write policies that allow any visitor to view, add, change, and delete the data in your database". The Security tab flags those as
RLS Policy Always True, "even when public access is what you want", so you have to decide, table by table, whether that is acceptable. - Env var names can mislead. Bolt's intro to databases says "Environment variables keep these values private" and lists
VITE_SUPABASE_URL,VITE_SUPABASE_ANON_KEYandSUPABASE_SERVICE_ROLE_KEY(Bolt: Introduction to databases). That holds for the unprefixed one. AVITE_variable is compiled into the browser bundle (see check 2). - Later edits. A prompt like "add a payments page" can add a key, a view or a loose policy after your last audit.
Check 1: run the audit before you publish
Click Publish, then Run security audit (use the button, not a chat prompt: Bolt says the button doesn't use tokens and prompting Bolt to audit "decreases your token balance"). Expand the summary in the chat and do every item under the action items yourself, such as a setting in a connected email or payment provider. On a free plan, open the database icon → Security and click Ask Bolt to fix on each Error and Warning. Run it again after new tables, sign-in changes, payments, file uploads or any bulk AI rewrite.
Check 2: no secret keys in VITE_ variables or frontend code
Bolt's own docs use variable names with Vite's VITE_ prefix, so many Bolt web projects are Vite apps (on Next.js the same rule applies to NEXT_PUBLIC_). Vite's docs: "VITE_* variables should not contain sensitive information such as API keys. The values of these variables are bundled into your source code at build time" (Vite: Env variables and modes). Renaming a pasted key to VITE_OPENAI_API_KEY doesn't hide it; it ships it to every visitor. Which values belong where:
- Fine in the browser: your Supabase URL and publishable (
sb_publishable_) or legacy anon key. Supabase: "Anyone can read it, so it only reaches what Row Level Security allows" (Supabase: API keys). Also a Stripe publishable key (pk_). - Never in the browser: the Supabase
service_roleorsb_secret_key ("A secret key bypasses every Row Level Security policy you have. Never put one in a browser"), Stripesk_andrk_keys, OpenAI, Anthropic and other AI keys, email provider keys, database passwords. Put these in Bolt's Secrets tab (database icon → Secrets) and call them only from a server function. If you use your own Supabase project, Edge Function secrets are the Supabase equivalent (Supabase: Edge Function secrets).
Search your project for VITE_ and read every name. Anything with KEY, SECRET, TOKEN or PASSWORD in it, other than the Supabase publishable or anon key, needs to move. More in exposed API keys in JavaScript bundles.
Check 3: RLS on every table, and no policy that lets everyone through
On a Bolt Database, open database icon → Security and read every RLS Policy Always True warning. If you connected your own Supabase project, run these in its SQL editor:
-- Tables with RLS off (rowsecurity = false) are readable with the public key select tablename, rowsecurity from pg_tables where schemaname = 'public' order by rowsecurity; -- Policies that let everyone through select tablename, policyname, cmd, roles, qual, with_check from pg_policies where schemaname = 'public' and (qual = 'true' or with_check = 'true');
using (true) is fine for a public menu or blog. It isn't fine for profiles, orders, messages or anything with an email address. Private data needs sign-in first (Bolt's docs say "To keep data private, add sign-in to your site"), then an owner check, one policy per operation, naming the role with to authenticated:
alter table public.orders enable row level security; create policy "owners read their own orders" on public.orders for select to authenticated using ((select auth.uid()) = user_id); create policy "owners add their own orders" on public.orders for insert to authenticated with check ((select auth.uid()) = user_id); create policy "owners update their own orders" on public.orders for update to authenticated using ((select auth.uid()) = user_id) with check ((select auth.uid()) = user_id);
For a table where visitors only submit, such as a contact form, allow insert and nothing else. Details and the outside test: Supabase RLS for vibe-coded apps, and if a lint named rls_disabled_in_public shows up, fixing rls_disabled_in_public. Views are a separate trap, because a view can return rows its table's policies would block: Supabase views bypass RLS.
Check 4: no secret keys in your live JavaScript
Check the site that is actually published, not just the project. Open it in a logged-out browser, open DevTools → Sources, and search the loaded scripts for service_role, sb_secret_, sk_live_, sk-proj- and sk-ant-. If you host somewhere other than Bolt, remember that variables set in that host's dashboard follow the same VITE_ rule at build time.
Check 5: test as a stranger
Only test your own project. If your app talks to Supabase, use the project address and the anon or publishable key your site already ships:
curl "https://YOUR-PROJECT-REF.supabase.co/rest/v1/orders?select=*&limit=1" -H "apikey: YOUR_ANON_OR_PUBLISHABLE_KEY"
Rows coming back for data that should be private means the table (or view) is open, whatever the dashboard says. [] means no rows are visible to anon, or the table is empty, so test with a table that has rows. A 401 or 42501 means anon can't reach it at all. For a Bolt Database, also open your app in a private window and try the pages and data that should need sign-in; then sign in as a second user and try to open the first user's records.
Check 6: file buckets, HTTPS, headers and exposed files
Bolt labels each storage bucket Public or Private: "Public: Anyone with the link can see these files, even if they're not signed in to your app" (Bolt: File storage settings). Keep anything user-specific private. Then make sure HTTP redirects to HTTPS, the common security headers are set (security headers for AI-built apps), production source maps aren't public, and /.env and /.git/ don't download from your domain.
If a key already leaked
Fix the code so the key is no longer served, then create a new key at the provider, deploy it, confirm nothing still uses the old one, and revoke the old one. If the key can spend money (an OpenAI or Stripe secret key) and you see usage you don't recognize, revoke it right away and accept the downtime. Then check the provider's usage logs for the exposure window. For a leaked Supabase secret or service_role key, follow our leaked-key guide and Supabase's rotation steps.
Paste-in fix prompt for Bolt
Review this app's security before I publish. Please: 1. List every table in my database. For each one, say whether Row Level Security is on and show its policies. 2. Replace any policy that uses "true" on data that should be private with owner-only policies, one per operation, using "to authenticated", "using ((select auth.uid()) = user_id)" and, for insert and update, "with check ((select auth.uid()) = user_id)". If the app has no sign-in yet, tell me and add it first. 3. Search the code, .env and any build output for secret keys: service_role, sb_secret_, OpenAI, Anthropic, Stripe sk_ or rk_, and anything named KEY, SECRET, TOKEN or PASSWORD behind a VITE_ prefix. Move every one into Secrets and call it only from a server function. The Supabase URL and publishable or anon key may stay in VITE_ variables. 4. Make storage buckets private unless the files are meant to be public, and use signed URLs for user files. 5. Do not disable RLS, do not use the service_role key in the browser to make anything work, and do not change unrelated code. Show me the changes and the SQL first, then explain who can read what afterwards.
Review what Bolt changes, run Run security audit again, then repeat checks 4 and 5 against the published site.
After launch: keep checking
Bolt's docs describe the audit as something you run before launch and can run again after changes. The prompts you send later are what change an app, so a clean audit from last week says little about this week's build. Your options: re-run Bolt's audit after every meaningful change, script outside checks in CI, or use an outside monitor that re-checks the live site and tells you what changed. The vibe coding security checklist is a short version to run after every deploy.
What LatchDog does here (and doesn't)
LatchDog keeps watching your live app after launch. Starter ($19/month, up to 3 apps) and Pro ($39/month, up to 10 apps) re-scan it automatically every day and after every deploy (triggered by a deploy hook from your host or CI), and email you only when something changes. Nothing to install: you verify your domain once. It works from the outside on any public web URL, so it can sit alongside Bolt's audit, not replace it.
- Free check, no sign-up: security headers, HTTPS and the HTTP-to-HTTPS redirect, leaked secret keys in your JavaScript and source maps (shown masked), public source maps, and exposed
.env/.gitfiles. It does not test your database. - Deep scan, only after you verify you own the domain (DNS TXT record, a meta tag in your homepage's HTML, or a
/.well-known/latchdog.txtfile; the last two don't need DNS access): if your JavaScript contains a Supabase project address (supabase.co) and a public key, it sends oneSELECT ... LIMIT 1to each of up to 15 tables or views your site's code names with.from("...")and records only whether a row came back. Row contents are discarded and never stored. It also looks forservice_role/sb_secret_and other provider secrets, and permissive CORS. Every finding comes with a fix prompt you can paste into Bolt. - Plans: the Free plan includes the free check and one deep scan after verification. Starter is $19/month for up to 3 apps and Pro is $39/month for up to 10 apps; both deep-scan every day and after every deploy, and email you only when something is new, worse or fixed. A one-time $9 Full Report gives you one more full deep scan without subscribing, and the $9 comes off your first month if you subscribe within 30 days. Not happy? Email support@latchdog.com within 7 days of a payment and that payment is refunded in full.
- Limits: it can't see your code, policies, functions, grants or payment logic (that's what Bolt's audit and Supabase's Security Advisor are for), it doesn't call
/rest/v1/rpc/functions, and it can't check what one signed-in user can see of another's data. We haven't verified what address a Bolt Database uses, so for an app on one, the table test may not run; the key and header checks still do. It's an outside-in check, not a penetration test or a guarantee.
A sensible setup for a Bolt app: the security audit before launch and after big changes, Security Advisor or the database Security tab after schema changes, and an outside monitor on the live site for everything that changes in between.
Keep watching your app, not just checking it once
LatchDog keeps watching your live app after launch. Starter ($19/month, up to 3 apps) and Pro ($39/month, up to 10 apps) re-scan it automatically every day and after every deploy (triggered by a deploy hook from your host or CI), and email you only when something changes. Nothing to install: you verify your domain once.
Start with the free check (headers, HTTPS, leaked keys in your JavaScript, source maps, .env/.git). Open-table checks run after you verify your domain. See plans
Free, read-only public check: no sign-up, no card. Headers, HTTPS, leaked keys in your JavaScript (always masked), public source maps and exposed .env/.git files. Supabase table checks run after you verify you own the domain.
Want the open-table check too? Get my free deep scan: sign in with your email (no password) and verify you own the domain. Your first deep scan is free and adds CORS, more of your JavaScript and, if your app uses Supabase, whether anyone can read its tables and views with your public key.