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

  1. No secrets in frontend code. Search the built JS for service_role, sb_secret_, sk_live_, sk-ant-, and sk-. Anon / publishable keys are expected. Everything else means rotate, then keep it server-side only.
  2. 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';
  3. No policy lets everyone through. Dump pg_policies and remove any whose condition is true (or a tautology) unless the data is meant to be public.
  4. Every private table has a policy per operation that names a role (to authenticated / to anon) and checks auth.uid() (or your tenant column).
  5. Users can't promote themselves. An owner-scoped UPDATE still lets someone set is_admin, role, plan, or credits on their own row. Use column grants or a BEFORE UPDATE trigger.
  6. Views respect RLS. alter view … set (security_invoker = true); on Postgres 15+, or revoke API access to the view.
  7. SECURITY DEFINER functions aren't open. Check auth.uid() inside, pin search_path, revoke execute from roles that don't need them.
  8. Private files live in private buckets with per-user storage policies. A public bucket serves every object URL to the world.
  9. Edge / server functions check who's calling and never trust a client-supplied user id for authorization.
  10. Auth settings are production settings (confirm email, redirect allowlist, no open redirect to a random domain).
  11. Lovable Security view + Supabase Security Advisor are clean of critical findings.
  12. You've tried to break in yourself — logged-out browser, another test account, and the free outside check below.

The 60-second outside check

  1. Open the app in a private window (logged out).
  2. Visit https://yourapp.com/.env and /.git/HEAD. You want 404/403, not a file of keys or ref: refs/heads/….
  3. In DevTools, search the JS bundles for secret key prefixes (above).
  4. If the app uses Supabase, copy the project URL + anon key from the public JS and curl a 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

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