Vigia › Help › Lovable app security checklist

Is my Lovable app secure? A pre-launch security checklist

Published 27 October 2026 · About 6 minutes · For apps built with Lovable on Supabase

Short answer: Before you share your Lovable app, run Lovable's Deep security scan and fix every Critical finding, make sure Row Level Security is on with real policies on every table, and keep secret keys out of the browser. Then open your live site as a stranger and look at what it actually ships. Lovable's own docs say its scans help but cannot guarantee complete security.

Vigia publishes this page and sells an automated check that covers part of this list (see the end). It is not a security audit or a guarantee.

On this page: Why it matters · What Lovable already checks · The checklist · How to fix what you find · Prompts for Lovable · FAQ · How Vigia checks this · Sources

Why it matters

Lovable generates frontend code that runs in the browser. In Lovable's words, "API keys and other secrets cannot be stored safely in client-side code." Your data is protected by Supabase Row Level Security (RLS): Supabase's docs: "A table in an exposed schema without RLS is readable and writable by any role with a grant on it."

What Lovable already checks

The checklist

  1. Run the Deep scan and resolve every Critical finding before you publish.
  2. RLS on every table, with policies that limit rows to the right user, not using (true). In Supabase, run the Security Advisor and look for "RLS disabled in public" (lint 0013) and "permissive RLS policy" (lint 0024).
  3. Test with two accounts. Sign in as user A, then user B, and confirm neither can read or change the other's data.
  4. No secrets in frontend code. Lovable's pre-publish checklist: "No secrets exist in frontend code" and "External API calls happen server-side." Keys belong in Secrets and server-side functions.
  5. Look at your live site as a stranger. Open the published URL, open DevTools → Sources and search all files for sb_secret_, sk_live_ and sk-. Decode any long eyJ… string: "role":"anon" is normal, "role":"service_role" is a leak. Searching for the word "service_role" is not enough, because the role sits inside the encoded key.
  6. Check fixed paths. On your own domain, open /.env and /.git/HEAD. They should not return file contents.
  7. Turn on leaked-password protection if your app uses email and password sign-in.
  8. Re-check after big changes. Lovable recommends scanning after significant code or database changes and when you update dependencies.

How to fix what you find

  1. A secret key was public: rotate first. Supabase: create a new secret key, replace the old one everywhere, confirm everything uses the new one, then retire the old key. For an OpenAI key, OpenAI says: "If you believe your key has been leaked, rotate your key immediately."
  2. Move the call server-side. Store the key in Lovable Secrets and call the API from a server-side function, never from the browser.
  3. Fix RLS. alter table public.<table> enable row level security; then add one policy per operation. See Supabase RLS disabled?
  4. Run the scans again until no Critical finding is left.

Prompts for Lovable

Review my app's security. List every place a secret or API key is used, move each one to Secrets and a server-side function so it never ships to the browser, and confirm the frontend only uses the Supabase publishable or anon key.

Check every table in the public schema: enable Row Level Security, replace any policy that uses true with one that limits rows to the signed-in user, and explain each policy you changed.

Lovable treats conversational security reviews as normal build usage, so they use credits. Running the Quick and Deep scans is free.

FAQ

Doesn't Lovable already check security for me?

Partly. The Quick scan runs on every publish and checks database rules, dependencies and MCP exposure. The Deep scan, which reviews your code, only runs when you start it. Lovable says these tools cannot guarantee complete security.

Is it a problem that my Supabase anon or publishable key is in my JavaScript?

No, that key is meant to be public. It is only safe if Row Level Security is on, with correct policies, on every table your app exposes.

How do I tell an anon key from a service_role key?

Legacy Supabase keys are JWTs that start with eyJ. Decode the middle part and read the role claim: anon is normal, service_role is a leak. New secret keys start with sb_secret_ and must never be in the browser.

I found a secret key in my live site. Is deleting it from the code enough?

No. Rotate it first: create a new key, switch every place that uses it, confirm it works, then retire the old one. Anyone who loaded your site may already have a copy.

Do I need to re-check after every change?

It is a good habit. Lovable recommends scanning after significant code or database changes, and an AI edit can move a key or a rule without you noticing.

How Vigia checks this

Vigia is a read-only check for apps you own, from the outside, the way a visitor sees your site. It downloads your home page and up to 6 same-origin JavaScript files linked from it (scripts from a CDN or subdomain aren't checked). It looks for OpenAI, Anthropic, Stripe live, AWS and Supabase secret keys, decodes legacy Supabase JWT keys to read their role, and on your own domain requests /.env, /.env.local, /.env.production, /.git/HEAD and /.git/config. A publishable or anon key is reported as info, with a reminder that every table needs RLS. Before it shows any details, it asks you to prove you own the site, and it masks every value it shows.

Honest limits: Vigia does not read your code, test your RLS policies, review your dependencies or test sign-in flows. Those are steps 1–3, 7 and 8 above, so use Lovable's scans and your own tests for them. A clean report is not a security guarantee.

The free check is available now. Vigia Pro (€12/month or €120/year, VAT included) re-checks up to 3 apps every week and emails you what changed. Run the free check

Sources

Lovable, Supabase, OpenAI and Stripe are trademarks of their respective owners. Vigia is not affiliated with or endorsed by them.

Last reviewed 27 October 2026 against the official docs listed above.