Is My Lovable App Secure? A 12-Point Checklist Before You Launch
Lovable makes shipping fast. These 12 checks catch the mistakes that leave a Supabase-backed app open: missing row level security, leaked keys, public buckets and more.
๐ก The short version: your Lovable app working is not the same as your Lovable app being safe. The real risk usually sits in the Supabase database behind it. Run through the 12 checks below, then let a free scan look at the live site.
You typed a prompt, and a few minutes later you had a working app with sign-in, a database and a shiny interface. It's a great feeling. It's also the moment most people stop looking.
Here's the thing nobody tells you while you're celebrating: the app can be live, full of real customer data, and nobody has checked who can read the tables. That's not hypothetical. In 2025, CVE-2025-48757 was assigned to exactly this kind of problem: insufficient row level security (RLS) in apps generated by Lovable, letting people with no account read or write database tables. (Want the full story? We wrote it up in our CVE-2025-48757 explainer.)
The lesson isn't "Lovable is bad". It's that generated code is unreviewed code, whoever wrote it. So let's review it. โ
๐๏ธ The database
- Turn on RLS for every table. In Supabase, once RLS is on and there are no policies, the public API returns nothing. That's the safe place to start. A table with RLS off is open to anyone holding your public key.
- Write a policy for each thing users should be able to do. "Users can read their own rows" is a policy. "Anyone can read everything" is what you're trying to avoid. Check the boring tables too, like
profilesandorders. (New to this? Start with our plain-English RLS guide.) - Check your views. Supabase notes that views bypass RLS by default, because they're usually created by the
postgresuser. On Postgres 15 and newer, setsecurity_invoker = trueso the view follows the table's policies. - Keep storage buckets private unless the files really are public. A listable bucket shows every file name to anyone who asks.
๐ Keys and secrets
- Know which key is which. Supabase's publishable key (the older
anonkey) is meant to live in the browser. The secret key (the olderservice_rolekey) skips RLS completely and must never be in frontend code, not even on localhost. - Search your built site for secrets. View the JavaScript your site loads and look for
sk_,sb_secret_, a long token whose payload saysservice_role, or a private key. If one ever shipped, rotate it. Deleting it from the code doesn't un-leak it. (More on this in API keys in the frontend.) - Keep third-party calls on the server. Payment, email and AI providers should be called from an edge function that holds the key, not from the browser.
๐ The site around it
- Add security headers. At least a Content-Security-Policy,
Strict-Transport-Security,X-Content-Type-Options: nosniffand a Referrer-Policy. - Force HTTPS and make sure the certificate matches your domain and isn't about to expire.
- Clear out the debug leftovers:
.envfiles, backups, source maps you didn't mean to publish, test admin pages. - Protect sign-in. Require email confirmation, and check the app slows down repeated wrong passwords.
- Set up SPF, DKIM and DMARC on the domain you send email from, so nobody can send convincing mail pretending to be you.
๐ What you can check by hand, and what a scan does for you
| By hand | With a scan |
|---|---|
| View source and search for key-shaped strings | Your public JavaScript is searched for known key formats |
Open /.env and /.git/config in a browser | Common exposed files are requested and judged |
| Read response headers in developer tools | Headers, HTTPS and the certificate are graded |
| Look up your DNS records | SPF, DKIM and DMARC are read and graded |
๐ Ready for a second pair of eyes? The free scan looks at your live site from the outside, the way a stranger would, and explains what it finds in plain language. Scan your site free.
๐ Questions people ask
Is the Supabase anon key a leak?
No. The publishable (anon) key is designed to be public. It's only safe because RLS limits what it can do, which is exactly why RLS matters so much.
Doesn't Lovable handle this for me?
Platforms keep improving their defaults and adding scanners, and that's good. But you still own the data. Treat any generated app as unreviewed until someone has checked who can read it.