LeakyVibe

Guides · Updated 2026-10-23

Is my Bolt app secure? What to check before you publish

Short answer: It can be, but Bolt can't know on its own which data should be private. The common problems in Bolt apps are a secret API key that ends up in the public JavaScript (often through a VITE_ variable), database tables that answer to anyone because a row-level security (RLS) policy is missing or allows everything, and protected pages that are only hidden in the UI. Bolt has a built-in security audit in the Publish menu and a database Security tab: run them before you publish, then check the live site from the outside, logged out and with a second account.

Does your app have this problem? Free scan, 15 sec, no sign-up

or watch it scan our demo app ▶

Why a working Bolt app can still leak

Everything your published site sends to the browser, its HTML and JavaScript, is public. Anyone can read it with the browser's developer tools. A Bolt app usually has a Vite + React frontend, so if a key or a database rule is wrong, the app keeps working perfectly for you while strangers can use the same key or read the same tables. Nothing breaks, so you don't notice.

On the Free plan, every site published from Bolt is public; private sites (only your team and invited people) are a paid-plan feature, and sites with a custom domain can only be public (https://support.bolt.new/cloud/hosting/publish). So assume real strangers can reach your app from the day you click Publish.

1. Secret keys in VITE_ variables or frontend code

Vite copies any variable that starts with VITE_ into the JavaScript bundle, and Vite's docs say these variables should not contain sensitive information such as API keys (https://vite.dev/guide/env-and-mode). Renaming a pasted key to VITE_OPENAI_KEY doesn't hide it, it just moves it.

  • Fine in the browser: your Supabase URL and publishable (sb_publishable_...) or legacy anon key, Stripe publishable key (pk_...). With Supabase, what protects data is RLS, not hiding the anon key (https://supabase.com/docs/guides/api/api-keys).
  • Never in the browser: Supabase secret (sb_secret_...) or service_role key, Stripe sk_ / rk_ keys, OpenAI, Anthropic or other AI keys, email/SMS keys (Resend, SendGrid, Twilio), database passwords.
  • Where secrets belong in Bolt: the Secrets tab (database icon > Secrets). Bolt's docs say secrets are read by server functions (also called edge functions) so they never end up in your users' browsers (https://support.bolt.new/cloud/database/secrets). If your project uses your own Supabase, use Supabase Edge Function secrets instead (https://supabase.com/docs/guides/functions/secrets).

2. Database tables anyone can read or change

New Bolt projects use a Bolt database by default, and Pro/Teams plans can use Supabase instead (https://support.bolt.new/integrations/supabase). Either way, the frontend talks to the database with a public key, so each table's rules decide who sees what. Supabase's docs warn that a table in an exposed schema without RLS is readable and writable by any role with a grant on it (https://supabase.com/docs/guides/database/postgres/row-level-security).

  • RLS off on a table: anyone with your public key can read and often write it.
  • RLS on, but a policy like using (true): same result. Bolt's database Security tab calls this "RLS Policy Always True".
  • A policy that only checks "authenticated": any stranger who signs up gets in. Scope rows to the owner, for example using (auth.uid() = user_id).

3. Pages and actions that are only hidden

Hiding the admin button, or redirecting logged-out users away from a page, is not access control. If an admin action or a server function never checks who is calling, anyone who finds the URL can use it. The check has to happen on the server or in the database for every request: the user's role, and that the row belongs to them.

4. Share links show your code

Sharing a Bolt project is different from publishing it. Per Bolt's sharing docs, a Viewer can open the project, duplicate it and view the preview and code; Editors can also view environment variables (https://support.bolt.new/collaboration/sharing). If you ever pasted a key into a file, anyone with a view link can read it. Review who has access and set the share link to no access when you don't need it.

Use Bolt's own checks first

  1. Project security audit: Publish > Run security audit. Bolt reviews code and database (who can see and change data, sign-in, misuse like changing a price, input handling, keys sent to browsers), fixes what it can and lists action items. Bolt says it doesn't use tokens when started from the Publish menu, and it's on paid plans (https://support.bolt.new/building/security).
  2. Database security check: database icon > Security. Available on all plans. It uses the same checks as Supabase's Security Advisor and offers "Ask Bolt to fix" (https://support.bolt.new/cloud/database/security). Open it again after every database change.
  3. Read what the fix changed before you publish. If a fix breaks something, Bolt's version history can roll back, but that also removes the security changes.

Then check the live site from the outside (10 minutes)

  1. Open your published site, then DevTools > Sources (or Network, filter JS). Search all files for sk_live, sk_test, sb_secret_, service_role and the first characters of each secret key you use.
  2. Open the site in a private window without logging in. Click around and watch DevTools > Network: does any request return other people's data?
  3. Make two accounts. Log in as A, open something that belongs to A and copy the URL. Log in as B and paste it. If B sees A's data, the database rules need fixing.
  4. Type /admin (or your admin path) while logged out and as a normal user.
  5. If you found a secret key anywhere public, rotate it in the provider's dashboard first (see https://leakyvibe.com/guides/leaked-api-key-what-to-do), then move it to Secrets.

A prompt for Bolt

Review this project for security before I publish. (1) List every environment variable and key in the code. Any secret (not a publishable key) must be removed from the frontend and from VITE_ variables, stored as a secret, and used only inside a server function that checks the caller is signed in. (2) For every database table, show me whether row-level security is on and each policy in plain English: who can select, insert, update and delete which rows. Replace any policy that allows everyone (using true) or any signed-in user with one scoped to the row owner. (3) Make sure every admin action checks the user's role on the server, not just in the UI. Don't print key values. List the files and policies you changed.

Short checklist

  • Bolt security audit and database Security tab run, errors fixed.
  • No secret key in VITE_ variables, frontend files or the live JavaScript.
  • Every table has RLS on with owner-scoped policies; no using (true) on private data.
  • Logged-out and second-account tests show only what they should.
  • Admin actions checked on the server; share links reviewed.

Want a quick outside check? The free LeakyVibe scan above reads your public pages and same-origin JavaScript, read-only, in about 15 seconds, and flags secret-looking keys, Supabase tables that answer to your public key, and missing security headers. It's a first check, not a full audit: it can't see your code, your Bolt settings or data behind a login.

Check your app for this now

Free scan · about 15 seconds · no sign-up

Passive, read-only checks. Only scan apps you own or have permission to test.