LatchDog

← Guides

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):

These tools see what no outside scan can: your code, your policies and your server functions. Use them first.

Where gaps can remain

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:

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.

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.