Guides

Launch security checklist for Lovable and Bolt

Ten checks before you share a Lovable or Bolt app that stores data in Supabase. RLS, two users, insert policies, leaked keys, and admin routes.

Updated 27 October 2026 · LIM Agentic AI, Paris

Lovable and Bolt will turn Supabase on for you, create tables, and ship a Vite app that talks to them with the anon key. That is a working app. It is not a check that user B cannot read user A. Run this list against the project you are about to share. Each item says what "done" looks like.

Before you send the URL

  1. RLS is enabled on every table in public, including profile tables and join tables the builder added. relrowsecurity is true for each. A table with RLS off is readable by anyone who has the anon key, which is everyone who loaded the page. See how to test Supabase RLS with two users.
  2. Two test users exist. As B, select, update, and delete A's marker row by id. All three return no row. A logged-out tab is not user B. Same guide.
  3. Every insert and update policy on user-owned tables checks auth.uid() = user_id. Nothing uses WITH CHECK (true) or a logged-in-only check. Update policies set both USING and WITH CHECK. The old open policy is dropped, not left beside the new one. See INSERT policies and WITH CHECK.
  4. The built JavaScript and source maps do not contain service_role or sb_secret_. Search dist and the deployed scripts, not only the repo. See the service role key.
  5. The only Supabase key in client env is the anon key or sb_publishable_.... No secret sits behind VITE_, NEXT_PUBLIC_, or REACT_APP_. Server code reads a name with no public prefix.
  6. Admin is not a hidden button and not user_metadata. The role lives in app_metadata or in a user_roles table the user cannot write. A policy search for user_metadata returns zero rows. See admin checks.
  7. Edge functions and API routes return 401 when you call them with no session. They call getUser() before they create a client with the secret key. A gateway "verify JWT" switch is not an admin check.
  8. Storage matches the data. A public bucket serves files to anyone with the URL. Private files use a private bucket and policies on storage.objects. using (true) on that table is the same leak as on a normal table.
  9. Auth redirect URLs are the real origins of this app. A wildcard that matches hosts you do not control will send a session there. Open signup is a choice you made: every confirmed user is the authenticated role, and your policies have to be written for that.
  10. The URL you will share is HTTPS. Then run the free scan on that exact host. It fetches the page and the scripts. It does not log in, so it does not replace items 2, 3, 6, or 7. After you publish the verification token, run the two-user check.

Check it yourself

Run both catalog queries in the SQL editor. You are reading definitions, not bypassing them, so the postgres role is fine here. Fix any table where rls_enabled is false, and any with_check or qual that is true on a private table.

Tables and policies
select c.relname as table_name, c.relrowsecurity as rls_enabled
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
where n.nspname = 'public' and c.relkind = 'r'
order by 1;

select tablename, policyname, cmd, qual, with_check
from pg_policies
where schemaname = 'public'
order by tablename, policyname;

Then, from a machine that is not the SQL editor, run the two-user script in the first guide against a marker row. Finish by calling one admin route with no header and with user B's token. Write down the status codes. "The page looks right when I am logged in as the owner" is not one of the ten.

Questions

The builder said it enabled RLS. Can I skip the rest?

No. Enabled with no policy locks the API roles out, which breaks the app until a policy is added. The policy that then gets added is often WITH CHECK (true) for authenticated users. Read pg_policies. Then run the two-user test.

Should I run the write test on production?

Prefer a staging project with two test users. The marker row is real data until you delete it. Do not aim an update or delete test at a table of customer rows. If production is all you have, add a notes table, test that, and delete the marker as user A at the end.

Nobody else has signed up. Do I still need this?

Yes, before the second person can create an account. The anon key is already in the page. Open signup, or a leaked service role key, does not wait for a launch announcement.

Other guides