How to choose a security scanner for a Lovable app
Written by our founder, a cybersecurity architect · Updated
Short answer
Choose by what the scanner can actually see. A scanner that only gets your URL sees what any visitor sees: keys in your JavaScript, public files, headers. It can’t see your Supabase Row Level Security (RLS) rules, your code, or what a signed-in user can do.
For a Lovable app, the most damaging mistakes are tables without RLS and secret keys in the frontend. So you want one check that looks at the live site, one that tests your database rules or your code, and a manual test with two accounts, which no scanner does for you.
What can a scan of your URL find?
A scan that only gets your address reads the same files a browser downloads. That is enough to find:
- Secret keys in your JavaScript (OpenAI, Stripe, the Supabase
service_rolekey). - Source maps that rebuild your original code.
- Files left public, like
.env,.gitor database dumps. - Missing security headers, HTTPS problems, unprotected cookies and open CORS.
It can’t see whether your tables have RLS, what your edge functions check, or whether one user can read another user’s data. A clean result means the common outside mistakes aren’t there, not that the app is secure.
Scans are either passive (they only read pages, like a visitor) or active (they send crafted requests to find weak spots). Only run an active scan against a site you own, and preferably on a copy rather than your live app.
Who tests your Supabase rules?
To know which tables a stranger can read, a tool has to query your Supabase project with the public anon key, the way an attacker would. You can do it yourself in a few minutes with our Supabase RLS guide.
Lovable also has a security scan in the editor, which reviews your project from the inside. Run it, and still test from the outside, because each sees things the other can’t.
If you use a third-party tool for this, prefer one that asks you to prove you own the site before testing it, and that counts rows instead of downloading them. Your users’ data shouldn’t end up in a vendor’s database.
Do you need a code scan?
If your Lovable project is connected to GitHub, a code scan on each change catches problems before they ship: secret keys committed to the repository, dependencies with known vulnerabilities and migrations that create tables without RLS. It also catches things a URL scan never sees, like keys used only on the server that were committed by mistake.
What should you ask before giving a scanner access?
- Does it store your code or your pages, and for how long?
- What does it do with a key it finds? It should mask it in the report and never use it.
- Does it ask for write access to your repository, and does it really need it?
- Does it check that you own a site before testing its backend?
- Does it say clearly what it doesn’t check? A scanner that claims to catch everything is overselling.
Never give a third-party tool your Supabase service_role key. It ignores RLS, so a tool holding it sees and can change everything, and the test wouldn’t tell you what a stranger sees anyway.
What does no scanner do for you?
- Sign up with two test accounts and check that the second can’t read or change the first one’s data, in the app and through the API.
- Check your business rules: prices, credits, limits and roles must be enforced on the server, not only in the browser.
- For an app that handles payments, health or other sensitive data, add a review by a security professional.
Where does Afterprompt fit?
Our free scan is a passive URL scan: it finds leaked keys, exposed files and missing headers in about a minute, with no account. Our code scan checks your GitHub repository on every push and pull request, free for public repositories and 2 private ones a month. Our backend check tests which Supabase tables, storage buckets and API routes a visitor with no account can read, after you prove you own the site, counting rows without downloading them: once a month on the free plan, weekly on Pro. None of them signs in, so the two-account test above is still yours to do.
Checklist
- Run Lovable’s own security scan
- Scan the live site for leaked keys and exposed files
- Test your Supabase tables with only the anon key
- Scan the code on each change if the project is on GitHub
- Never hand a tool your
service_rolekey - Test with two accounts that neither can see the other’s data
- Check prices, credits and roles are enforced on the server
Scan your site for free
Leaked API keys, exposed files and missing security headers, with a fix for each. No account, about a minute.
Questions
- Is a free security scanner enough for a Lovable app?
- It catches the mistakes visible from outside, like leaked keys and public files, which are worth fixing first. It can’t see your RLS rules or what signed-in users can do, so test those too.
- Does Lovable have its own security scan?
- Yes, Lovable has a security scan in the editor that reviews your project from the inside. Use it alongside a check of the live site, since each sees things the other can’t.
- Is it safe to give a scanner my Supabase keys?
- The anon key is already public in your site, so sharing it changes nothing. Never share the service_role key: it bypasses RLS and gives full access to your database.
- Can I scan a Lovable app that isn’t mine?
- Only with the owner’s permission. Even a passive scan should be limited to sites you own or are allowed to assess.