← All guides

Lovable Security Scan Findings: How to Fix Them

LovableSupabase

The publish dialog ran a security scan, or you opened the Security view yourself, and now you’re looking at a list of findings. Or the list is empty and you’re wondering whether that means the app is safe to launch. This guide explains what Quick scan and Deep scan actually check, what each severity label means, how to treat the database, secret, dependency and password findings the official docs describe, and how to use Try to fix and Ignore without making things worse.

Tool pages: /fix/lovable and /fix/supabase. For a test-first pass that does not depend on one vendor’s scanner, see the vibe-coded app security checklist.

Quick scan vs Deep scan, and where findings appear

In a Lovable project, open More → Security in the toolbar. That Security view holds results for a single project. Two cards sit at the top:

  • Quick security scan, marked Automatic. It performs the same predetermined checks each time, and it starts on its own whenever you publish. Per Lovable’s security overview, those checks look at how the database is locked down (tables with no row-level security, policies that let every caller through, leaked-password protection left off), known flaws in the project’s npm packages, and an MCP server the app exposes without a sign-in check. The database portion runs only when a database is connected. If you add Wiz at the workspace level, its results appear here too.
  • Deep security scan, marked Recommended. It repeats every Quick scan check and then reads your application code. Extra findings are grouped into areas such as access control, endpoints anyone can call, unsafe input, secrets in the repo, payment flows, sign-in logic, and personal data leaking into errors or logs.

The Deep scan does not start on its own while you edit. Launch it with Run deep scan on the project Security tab, from the workspace Security center, or by asking in the project chat (you need edit access). Opening Publish always starts the Quick scan; the dialog then points you at the Security tab so a Deep scan can still be started before the app goes live. Lovable documents one exception: if the app’s MCP connection can be used by someone who is not signed in, publishing also kicks off a Deep scan without you staying on the tab.

Neither built-in scan spends credits. Asking Lovable in chat to “review my app’s security” is a separate, conversational review billed as ordinary build usage; the two scans that start with that request remain free.

Each card tells you whether results still match the current project. Not scanned yet means that scan has never run. Up to date means they do match. If the project has changed, the Quick scan card shows Run quick scan. The other card shows Run deep scan. Older findings keep a clock icon until you scan again. A Deep scan updates any stale Quick checks at the same time, so you do not have to start both.

Critical, Warning and Info: what to fix first

Lovable labels every built-in finding as Critical, Warning or Info. In the Security view docs, Critical needs attention now, Warning is something to review and fix if it applies, and Info is a suggestion. Groups are sorted by the worst label in the group, and after that by the size of the group, so the work that matters first sits at the top.

When the published app is limited to workspace members, Deep scan severity can be lowered. Something that would be Critical if the app were public appears as a Warning if reaching the cited code requires a login. Two groups stay at their original severity: secrets stored in source or in git, and issues a different site could abuse. After you change who can visit the app, run the Deep scan again so those labels can move.

You can still click Publish with Critical findings open, unless Block publishing with critical issues is turned on for the workspace. When that control is on, the Publish window shows a Resolve findings item in the Before you publish list. On Lovable’s built-in backend, a Review security findings dialog also appears; from there you can ask Lovable to work on the items, or go ahead and publish. Lovable’s docs treat a Critical finding as a weakness an attacker could use, and they tell you to fix what you can before the app is public.

Database findings: RLS off, or rules that are too broad

Mis-set access rules are the database items the Quick scan is built to catch. In a Lovable project you can read every policy under More → Database → Manage → Policies. How to write those policies is covered in Supabase RLS policies explained and Supabase “new row violates row-level security policy”; this section is only about what the scan is pointing at.

If the app uses a Supabase project you own, open Advisors → Security Advisor in the Supabase dashboard as well. These lints, from Supabase’s Advisors docs, map closely to what Lovable flags:

  • rls_disabled_in_public (ERROR, official summary: “Table publicly accessible”). RLS is off on a public table. Supabase’s write-up says a caller who has the project URL can create, read, update and delete rows. Turn RLS on, then add policies that match who should see which rows. With RLS on and no policies, the Data API denies access, which is safe but will break features until the policies exist.
  • policy_exists_rls_disabled. Policies are already defined, but RLS is still off, so none of them are enforced. Enable RLS so the rules you already wrote actually run.
  • rls_enabled_no_policy. RLS is on and there are no policies, so the API cannot read or write rows. That can be deliberate. If it is, Supabase suggests adding an explicit reject policy so the intent is obvious.
  • permissive_rls_policy (WARN; Supabase titles this lint “Security policy allows unrestricted access”). A policy uses an always-true test: a USING clause or a WITH CHECK clause that is just true. RLS looks enabled, but the listed roles can still read or write every row. Replace the condition with one that ties each row to the right user, or keep an always-true read policy only where public read access is what you want (Supabase lists public read-only tables such as product catalogues as a case where that can be intentional).

The Deep scan also looks at server code that goes around those database rules, including privileged paths that confirm only that a session exists, not whether that person is allowed to do it. Lovable’s security best practices note that code using the service role bypasses RLS, so that code has to enforce permissions itself.

After a fix, test the app you own, not someone else’s: open it signed out and confirm private data stays hidden, then sign in with a second test account and confirm you cannot open or change another user’s records. If those checks fail, the finding is not fixed, even if the Security view looks cleaner.

Secrets sitting in the code or the repository

The Deep scan reports credentials left in source files or the repo, and guessable access tokens, under Leaked secrets & credentials. Frontend code runs in the browser, so a key pasted into a component or a VITE_ variable is visible to anyone who loads the page. Lovable’s docs say the product tries to catch a key you paste into chat and steer you toward Secrets, with the actual call made in server-side code.

If a secret has already appeared in the client or in git, removing the line is not enough. Revoke or rotate it at the provider, put the new value in Secrets or a server-only environment variable, and confirm the old value is gone from the published bundle. The security checklist covers how to tell a publishable key from a secret key, including the Supabase anon/publishable key (meant to be public, but only safe with RLS) versus the service role key (never in the browser).

Dependency vulnerabilities and the bulk fix

The Security view includes a Project dependencies card. Click Review to see production npm packages (dev-only packages are left out) and a count of known issues by severity. Per the Security view docs:

  • The findings list only promotes issues that the advisory rates as critical, and those entries are always a Warning.
  • High and medium issues stay in the dependency list and do not appear as findings.
  • Some upstream-critical issues never become findings: either Lovable has already confirmed they cannot affect a Lovable app, or their EPSS score (an estimate of how likely exploitation is) is low. Those packages stay in the list with an info marker. Try to fix all skips them, and they are omitted from the known-issues total.

If the list contains known issues, Try to fix all sends those packages in one request, except the info-marker cases above. You can also use Scan dependencies when you want a fresh audit, or download a JSON list or an SBOM. An SBOM download does not use credits.

Auth settings: leaked password protection

The Quick scan’s database review can flag leaked-password protection when it is off. The setting lives in different places depending on the backend, and the official name is not the same in both products.

  • Built-in Lovable backend: enable Password HIBP check under More → Users → Settings → Email, as described in Lovable’s email authentication docs. It rejects passwords that already appear in the Have I Been Pwned breach list, plus passwords that are trivial to guess.
  • Your own Supabase project: in the project’s Auth settings, turn on the option to prevent leaked passwords. Supabase’s password security docs say this consults the HaveIBeenPwned.org Pwned Passwords API, and they restrict the setting to Pro and higher plans. A Free project cannot turn it on; if you ignore the finding, record that plan limit as the reason and treat the residual risk as accepted, not as a false positive.

This check is an Auth setting, not a Security Advisor database lint. The Advisors page has no leaked-password lint.

Use Try to fix, then check the diff yourself

Lovable can attempt a fix from the Security view or from chat:

  • Try to fix on one finding, or on a group row to cover every finding in that group.
  • Try to fix all, which sits in the panel header and sends every open finding, skipping ignored ones.
  • Try to fix selected, after you tick findings, groups or whole areas.
  • Fix all in the notice above the project chat. The count on that notice shows open Critical findings when there are any, and Warnings otherwise. Clicking Fix all sends every open Critical finding and Warning in one request. Info findings and ignored findings are left out. After you use it or close the notice, it stays hidden on that project for 24 hours.
  • Reference in chat in a finding’s … menu, if you want to ask a question or describe a different fix. That path is billed as ordinary build usage.

Each of those fix actions opens a single chat request for the work. Lovable’s docs tell you to review the changes and test them. The buttons are unavailable while an earlier request is still running or a scan is in progress.

Starting either built-in scan costs nothing in credits. Automated fix actions draw on your account’s 10 free fixes, shared with Try to fix on build errors across your workspaces and projects. Each used slot becomes available again 24 hours after you use it; after those 10, further fixes are billed as ordinary build usage. Your workspace needs at least one credit to start a fix.

A separate auto-fix setting can attach a small set of qualifying Quick scan items (Critical database and dependency items) to your next build request in chat. That path uses credits, and Deep scan items are outside the scope of that automatic path. You can still send Deep scan findings through Try to fix yourself.

After a fix, walk the signed-out and second-account checks above, then click through sign-up, login and the main data flows. Re-run the relevant scan and confirm the card reads Up to date and the finding is gone, not just marked with a clock icon.

When Ignore is the right call

When you have decided a finding is irrelevant, open its … menu, choose Ignore finding, and pick a reason. The reason picker offers This is intended. The other built-in choices are I accept this risk and This is wrong, plus Custom. From a group row the menu covers the whole group; Ignore selected in the header covers whatever you have ticked. Those items are collected under Ignored findings, below the open list. They no longer add to the header total. Try to fix all skips them, and they can be restored with Unignore finding. The details record who ignored it, when, and why.

Ignore is reasonable when you have checked the evidence and the behavior is what you want. Examples the source docs themselves allow: a table with RLS on and no policies because the API must not read or write rows; an always-true read policy on a genuinely public, read-only table such as a product catalogue. Ignore is the wrong tool for rls_disabled_in_public on a table that holds customer data, or for a secret that is still in the client bundle. If you are unsure, use Reference in chat before you ignore the item.

“No issues found” is not a clean bill of health

If the latest scan surfaces nothing, the Security view shows No issues found. Lovable’s explanation is that this empty state only reports that this run reported nothing, and that an empty result is not complete coverage of every risk. That empty state also says nothing about a Deep scan you have never run, or about findings with a clock icon from an older version of the project.

The scan looks for known patterns. It will not reliably prove that one signed-in user can never read another user’s records, that a payment can only complete after a successful charge, or that a server function verifies the person’s permissions, not merely that a session exists. For that kind of review, use the security checklist, and see AI code review vs human review for the authorization and business-logic gaps automated tools miss. Lovable’s docs tell you to consider an additional professional security review for apps that handle sensitive data or critical functions.

A scanner finds known patterns. A vetted senior engineer checks the logic it cannot see, such as who can read whose data. Fixed price, agreed upfront. If the app is failing in other ways, start with Lovable app not working. For a broader pre-launch pass, see AI app production readiness.

FAQ

Is the Lovable security scan free?

Starting either built-in scan costs nothing in credits, whether you launch it from the project Security tab, the workspace-wide center, the Publish window, or project chat. Automated fixes draw on your account’s 10 free fixes (the same pool Lovable uses when it repairs a build error); each used slot becomes available again 24 hours after you use it, and further fixes are billed as ordinary build usage. Your workspace needs at least one credit to start a fix. A conversational security review in chat, and Reference in chat on a finding, use credits. The scans that start alongside a chat review stay free.

How do Quick scan and Deep scan differ?

The Quick scan performs the same predetermined checks each time: how the database is locked down, known npm flaws, and an MCP server with no sign-in check. It starts on its own whenever you publish. The Deep scan includes those same checks and then reads your application code for problems in this project’s own authorization and data handling. It does not run on its own while you edit, except if you publish an app whose MCP connection can be used by someone who is not signed in.

Can Lovable fix security findings automatically?

Yes, in two different ways. Try to fix (and Try to fix all) can be used on open findings from either scan; you review the diff and test it. A separate auto-fix setting, when enabled, attaches a small set of qualifying Quick scan items (Critical database and dependency items) to your next build request. Deep scan items are outside the scope of that automatic path. Both kinds of fix should be reviewed before you publish.

Should I publish with Critical findings open?

You can, unless Block publishing with critical issues is on. Lovable still asks you to fix what you can first, and on a built-in-backend project it opens Review security findings when you click Publish. A Critical label is Lovable’s signal that the issue is worth treating as a weakness an attacker could use. For an app that will be public, resolve those items, re-run the scan, and only then publish.

My scan says “No issues found”. Is my app secure?

No. That message only reports that this run reported nothing. Lovable is clear that an empty result is not complete coverage of every risk. Confirm a Deep scan has actually run and is Up to date, then still test access signed out and with a second account, especially around whose data each user can see.

Comments

Add a comment

Generated for you. Click to type your own.

Required. Never shown on the page. Privacy policy.

Basic markdown: **bold**, *italic*, `code`, lists, quotes, and fenced code blocks. HTML shows as plain text.

Your draft stays on this device until you post.