Quick scan on every publish
Checks database access rules (tables without RLS, rules that let everyone through, leaked-password protection turned off), known vulnerable npm dependencies and unauthenticated MCP servers.
Lovable scans for common mistakes, and its own docs say those tools don’t replace a security review. Here is what to check, layer by layer.
Sound familiar?
Run Lovable’s Deep scan before launch, because only the Quick scan runs on publish, then check row-level security on every table by signing in as two users. Move any key found in frontend code into secrets and rotate it, and put permission checks in server-side functions, since code using the service role bypasses RLS.
Why it happens
Lovable apps have three layers: a frontend that runs in the user’s browser, backend code (edge functions, or server functions on TanStack Start apps) and a PostgreSQL database protected by row-level security (RLS). Lovable’s docs are blunt: frontend code can be inspected, modified or bypassed, so it must never make security decisions.
Most leaks come from a rule that’s missing or too open at one of those layers: a table without RLS, a policy that allows everyone, a secret in frontend code, or a backend function anyone can call. Lovable sets up basic RLS automatically, but new tables and features added later are where gaps appear.
Already done for you
Checks database access rules (tables without RLS, rules that let everyone through, leaked-password protection turned off), known vulnerable npm dependencies and unauthenticated MCP servers.
Reviews your application code for access control, abusable endpoints, injection, leaked secrets, payment logic, authentication and exposed personal data. It doesn’t run automatically.
More → Database → Manage → Policies lists every RLS policy, who it applies to and its condition. You change policies by asking Lovable in chat.
API keys are stored as backend secrets and read only in server-side code, never in the frontend.
Fix it yourself
In this order. Most apps get most of the way with these alone.
The Quick scan runs on every publish; the Deep scan doesn’t. Run it from the project’s Security view and fix every Critical finding first.
In the policies view, confirm RLS is on for every table with user data, users can only reach their own rows, and new tables have policies. Then test it: sign in as two different users and try to read each other’s data.
Treat any key found in frontend code as compromised: rotate it with the provider, store the new one as a secret, and read it only in server-side code.
Validation, permission checks and payment logic belong in edge functions or server functions, and each one must check who is calling. Code that uses the service role bypasses RLS, so it has to check permissions itself.
Turn on leaked-password protection, and check that email confirmation and account recovery behave as you expect.
New features add new tables and functions. Scan before each publish that changes who can see what.
If the steps above turn up more than you have time for, or the app already has paying users, I take Lovable apps to production: login and access rules, database and backups, payments, security, SEO and deployment.
App rescue: From $1,000, fixed price, scoped in writing before any work starts.
More in app rescue, or hire a Lovable developer.
Questions
Lovable sets up basic RLS, keeps keys in secrets and runs a Quick scan on every publish. Its docs also say these tools can’t guarantee complete security and that you’re responsible for your app’s security, especially with sensitive data.
Row-level security: database rules that decide which rows each signed-in or anonymous user can read or change, for example “users can only read their own orders”. Lovable creates them as it builds features that store user data.
Many of them, by asking Lovable to fix them. Review each change and scan again, because a fix that tightens access can break a page that depended on open access.
For apps with payments or sensitive data, a manual review or penetration test before a big launch is worth it. Lovable supports AI penetration tests through an Aikido connection, after you’ve fixed what the scanners find.
Send me the app and what’s worrying you. You get a written scope with a fixed price before any work starts.