A published Lovable app passed its Quick scan, yet any visitor can read every customer's records — which limits of Lovable's built-in scans explain that?
answer
- a fixed set of checks
- policies versus application code
- the scan that never runs itself
- the publish block is opt-in
- ignored findings stop counting
basics
~20 sLovable's Quick scan checks database access rules, npm dependencies and MCP exposure, not application code. Service-role server code bypasses row-level security unseen; the on-demand Deep scan reviews it, and critical findings block publishing only if the workspace enables that.
solid answer
~50 sLovable's **Quick scan** runs a fixed set of checks when you publish: database access rules (tables without row-level security, rules that let everyone through, leaked-password protection), an npm dependency audit and an MCP server exposed without authentication. It does not read application code. If an edge function or server route uses the service role, it **bypasses RLS**, so clean policies can coexist with an endpoint that returns every row. That is what the **Deep scan** covers — access control, including server code that bypasses database rules, and unauthenticated endpoints — but apart from one MCP-related exception it runs only on demand. Also check whether a finding was **ignored**, which removes it from the count and from the publish block, and whether **Block publishing with critical issues** was enabled; it is off by default. The docs say the scans do not replace a security review.
go deeper
Know there are two scans: the Quick scan runs on publish over database rules, dependencies and MCP exposure; the Deep scan reviews the code on demand.
Explain what each scan reads, that ignored findings drop out of counts and blocks, and that the publish block is opt-in except on new Enterprise workspaces.
Diagnose an exposed table: check policies, ignored findings and service-role server code, run the Deep scan, and turn on the publish block for the workspace.
Set the workspace policy: which projects need scheduled Deep scans, a mandatory publish block and an external review, given that the scans state they are not a security audit.
## Two built-in scans with different reach Lovable ships two security scans, shown in the project **Security view** as **Quick security scan** and **Deep security scan**. Findings from both are grouped by security area and labelled **Critical**, **Warning** or **Info**. | | Quick scan | Deep scan | |---|---|---| | When it runs | Automatically when the publish dialog opens; on demand | On demand from the Security view or the workspace Security center; scheduled on Enterprise; on publish only for an app whose MCP integration allows access without sign-in | | Speed | Seconds, a fixed set of checks | Reviews all application code | | Database | Access rules and settings | Everything the Quick scan checks, plus whether server code honours them | | Dependencies | Known vulnerabilities in npm packages | Included | | Code | Not covered | Access control, unauthenticated endpoints, injection, leaked secrets, payments, account security, exposed data | The Quick scan's **database review** flags tables without per-record access control (row-level security, **RLS**), access rules that let everyone through, and leaked-password protection turned off. Its other two checks are the **dependency audit** and an **MCP server check** for an MCP server the app exposes without authentication. ## How "every row is readable" survives a passing Quick scan - **Server code bypasses the policies.** RLS applies to requests the app makes on behalf of a signed-in or anonymous user. Server-side code that uses the **service role** — the backend's privileged database access — bypasses RLS and must check permissions itself. An edge function that fetches orders with the service role and returns them to any caller exposes everything, while every table still shows correct policies. The Quick scan does not read that code; the Deep scan's **access control & authorization** area explicitly covers "server code that bypasses the rules your database enforces", and its **unauthenticated & abusable endpoints** area covers functions anyone can trigger. - **The Deep scan was never run.** It does not run as you work, and the publish dialog only links to it. The one automatic exception is an app whose MCP integration allows access without sign-in, which starts a Deep scan in the background on publish. - **The finding was ignored.** **Ignore finding** with a reason such as **I accept this risk** moves it to **Ignored findings**; ignored findings are left out of the header count, out of **Try to fix all**, and out of the publish block. - **Publishing was not blocked.** **Block publishing with critical issues** is **disabled by default**, except on new Enterprise workspaces Lovable creates. Without it the dialog warns and you can publish anyway. Even when enabled, it uses the latest results, even outdated ones, and "passing it does not prove that your app is secure". - **Auto-fix has a narrow remit.** When enabled, it adds a few of the latest Quick scan findings — critical database findings and dependency findings — to build requests; it does not fix Deep scan findings. ## A diagnosis order 1. Open **More → Cloud → Database → RLS policies** (read-only; on your own Supabase project, use its dashboard) and confirm which policies cover the table, for which role and command. 2. Check **Ignored findings** in the Security view and who ignored what, and why. 3. Run the **Deep scan** and read the access-control and endpoint areas. 4. List the edge functions and server routes that read the table, and ask Lovable to make them check the caller rather than rely on RLS. 5. Ask an admin to enable **Block publishing with critical issues** for the workspace. ## Where the findings live The project **Security view** is the working surface: it lists open findings by area with severity badges, shows whether each scan is **Up to date**, offers **Run quick scan** and **Run deep scan**, and records who ignored a finding and why. On Business and Enterprise plans the workspace **Security center** shows the same picture across projects, including ones never scanned, so a lead can spot a published project whose Deep scan never ran. ## What the scans promise Lovable's own wording is that the scans "do not replace a thorough security review" and "cannot guarantee complete security", and that you are responsible for the app meeting its security requirements. A **conversational security review** ("Review my app's security") is available as standard build usage, and optional connectors add external scanning or AI penetration testing. Designing correct RLS policies is a database subject of its own; the Lovable-specific knowledge is what each scan reads, when it runs, and what lets a finding through to a published app.
- In Lovable, does enabling Block publishing with critical issues guarantee a fresh Deep scan before each publish?No. The block uses the latest scan results, even outdated ones, and does not require a fresh Deep scan. Ignored findings do not count toward it. The Quick scan runs when the publish dialog opens, but the Deep scan still has to be run on demand or scheduled on Enterprise plans.
- A Lovable app is visible only to the workspace. Why might a Deep scan finding show as Warning instead of Critical?When website access is set to the workspace only, the Deep scan takes that audience into account: a finding that would be Critical on a public app is shown as Warning when the code it cites is reachable only after signing in. Findings about secrets in the code or repository, and ones another website could exploit, keep their level.
- A clean Quick scan proves the app's data is protected
- The Deep scan runs automatically on every publish
- Critical findings block publishing by default on every workspace
- Correct RLS policies also restrict service-role server code
- Ignoring a finding fixes it for the publish check