Guide · November 5, 2026
Lovable app security checklist (before you publish)
Lovable ships full-stack apps fast, often with Supabase in the browser. That is fine — as long as Row Level Security, secrets, and storage are locked before real users show up. Lovable's own docs say to review RLS early and clear Security view findings before publishing. This page is the short version you can run in one sitting.
Shortcut: paste your live URL into the free VibePreflight check. It looks for leaked keys, exposed /.env / /.git, and Supabase tables readable while logged out.
Before you hit Publish
- No secrets in frontend code. Search the built JS for
service_role,sb_secret_,sk_live_,sk-ant-, andsk-. Anon / publishable keys are expected. Everything else means rotate, then keep it server-side only. - RLS is on for every table in
public. Lovable often creates tables via SQL migrations, and those do not always get RLS the way dashboard-created tables do. Run:select tablename, rowsecurity from pg_tables where schemaname = 'public'; - No policy lets everyone through. Dump
pg_policiesand remove any whose condition istrue(or a tautology) unless the data is meant to be public. - Every private table has a policy per operation that names a role (
to authenticated/to anon) and checksauth.uid()(or your tenant column). - Users can't promote themselves. An owner-scoped UPDATE still lets someone set
is_admin,role,plan, orcreditson their own row. Use column grants or a BEFORE UPDATE trigger. - Views respect RLS.
alter view … set (security_invoker = true);on Postgres 15+, or revoke API access to the view. - SECURITY DEFINER functions aren't open. Check
auth.uid()inside, pinsearch_path, revoke execute from roles that don't need them. - Private files live in private buckets with per-user storage policies. A
publicbucket serves every object URL to the world. - Edge / server functions check who's calling and never trust a client-supplied user id for authorization.
- Auth settings are production settings (confirm email, redirect allowlist, no open redirect to a random domain).
- Lovable Security view + Supabase Security Advisor are clean of critical findings.
- You've tried to break in yourself — logged-out browser, another test account, and the free outside check below.
The 60-second outside check
- Open the app in a private window (logged out).
- Visit
https://yourapp.com/.envand/.git/HEAD. You want 404/403, not a file of keys orref: refs/heads/…. - In DevTools, search the JS bundles for secret key prefixes (above).
- If the app uses Supabase, copy the project URL + anon key from the public JS and
curla sensitive table with only that key. Rows back = open table.
Or let us do steps 2–4: free live-site check. Each finding includes a fix prompt you can paste back into Lovable / Cursor / Claude.
Deeper reading
- Supabase RLS check — the SQL and policy patterns in more detail.
- Lovable: security best practices
- Supabase: Row Level Security
Want a second pair of eyes?
Our report scans the repo and live URL for the checklist items above and ranks the fixes. Sample report · Pricing · Free guardrail pack
The VibePreflight team