On this page
- Why this matters
- Fix private notes that another account can see or edit
- What we found in exported Lovable projects
- Lovable test environment: what replaced Test and Live
- Lovable app testing before you publish
- Which test catches what
- Related guides
- Official docs behind this checklist
- FAQ for builders before launch
Why this matters
Read against the Lovable docs on 19 October 2026, and on 25 October 2026 for the Test and Live retirement. Lovable calls the preview a "private testing space that always runs your latest work", while visitors see "a snapshot that only changes when you publish". Browser testing always runs against the preview, and Lovable says its scans "cannot guarantee complete security". The steps below are a proposed procedure, not an observed customer result.
Fix private notes that another account can see or edit
For an app using your own Supabase project, this migration targets public.notes with owner_id uuid and a body column. The example gives signed-in users owner-only reads and lets them edit body. Review existing policies first and remove any permissive SELECT, UPDATE or ALL policies that allow other users access. Review effective grants for inherited roles and existing column grants too. For owner-only tables on a separate draft backend, apply the equivalent settings in that test environment first.
The UPDATE policy checks both the original row and the proposed row. If your app also creates notes directly, add a separate owner-only INSERT policy and grant only the insert columns that flow needs.
Verify in preview with disposable data: A can read and edit their note, B cannot read or change it, and signed-out requests cannot read it.
alter table public.notes enable row level security;
revoke select, update on table public.notes from anon, public;
revoke update on table public.notes from authenticated;
grant select, update (body) on table public.notes to authenticated;
create policy notes_owner_read on public.notes
for select to authenticated
using ((select auth.uid()) = owner_id);
create policy notes_owner_edit on public.notes
for update to authenticated
using ((select auth.uid()) = owner_id)
with check ((select auth.uid()) = owner_id);What we found in exported Lovable projects
In a nonrandom October 2026 sample of 512 public Lovable repositories with Supabase migrations, 83 had a policy allowing signed-out whole-table writes. The study assessed migration files. It did not test Lovable Cloud or the published apps. See the evidence
Lovable test environment: what replaced Test and Live
Lovable retired Test and Live on October 23, 2026 and deletes the detached Test databases on December 1. Since November 16, a draft on the built-in backend normally gets a separate database with example data. If you use your own Supabase project or Lovable cannot set up a draft backend, the draft shares live data.
Look for the example-data banner before creating test records. In a draft with its own backend, Accept applies schema changes to the live database before Publish. The draft’s test rows stay in the draft and are discarded on Accept.
For the dates, getting Test data back, and what a draft cannot change, see Lovable Test and Live retired, and how to stage now.
Lovable app testing before you publish
- 1Ask Lovable to test the main flow in the preview. Browser testing clicks buttons, fills and submits forms, moves between pages and reads console logs and network requests. Lovable's own example prompt:
Output Use browser testing to verify the sign-up flow works. - 2If the app does not run on Lovable Cloud, test the signed-in flows yourself: with your own Supabase project or another auth provider, browser testing can only reach pages that need no sign-in.
- 3Test private data with two ordinary accounts in separate browser profiles. User A creates a private record and reloads it; it must still be there. User B and a signed-out visitor then open the list and the record's URL, and neither may see it.
- 4Check the code too, in a GitHub clone of the project. From its root, npx -y viberaven@latest check reports a service role key in a VITE_ variable as service_role_key_in_client_env and a table without row level security as rls_disabled. It reads the repo, so the two-account test still decides what each user can see:
Terminal npx -y viberaven@latest check - 5Open Publish, top right next to Share. The Quick scan runs when the dialog opens. Click its result line to open the Security view and start the Deep security scan there; it does not run on its own.
- 6Publish, then repeat the main flow and the two-account test on the published URL, your-subdomain.lovable.app or your custom domain. Publish updates what visitors see. Database structure and backend functions can change as soon as you accept a draft.
Which test catches what
No single test covers a Lovable app. The first table is built from Lovable's docs, read on the dates above. The second is from our read of the Supabase migrations in 512 public Lovable repos in October 2026: it shows what the code shipped, not what the live databases held, and no project is named.
When each test runs, and what it misses
| Test | When it runs | What it covers | What it misses |
|---|---|---|---|
| Browser testing | When you ask for it in chat, always in the preview | Clicks, form submits, page moves, console logs and network requests | Pages behind a login, unless the app runs on Lovable Cloud; canvas tools, drag and drop and subtle visual differences |
| Two-account test, by hand | In the preview, then again on the published URL | Whether user B or a signed-out visitor can open user A's private record | Records and pages you did not try |
| Quick scan | Each time the Publish dialog opens | Database access rules, dependencies and MCP server exposure | Anything outside those three |
| Deep security scan | Only when you start it from the Security view | Access control, leaked secrets, payments and authentication | Lovable says its scans cannot guarantee complete security |
What 512 public Lovable repos shipped
None of these shows when you click through the app as its owner. The two-account and signed-out tests show what other people can see on the pages you try. A function or a write policy that no page uses needs a database query instead; the first two posts below give one for the Supabase SQL editor. The sample comes from GitHub search and leans toward side projects.
| What the repo shipped | Repos |
|---|---|
| A security definer function in public that the anon key can call (migrations dated before May 30, 2026) | 47.3% (242) |
| A policy that lets signed-out visitors update or delete every row of a table | 16.2% (83) |
| A table created without row level security ever being enabled | 10.4% (53) |
| A table with email or phone columns that anyone can read | 8% (41) |
| A Supabase service role or secret key committed somewhere in the repo | 5.7% (29) |
| A password or password hash column that anyone can read | 2.1% (11) |
Related guides
Official docs behind this checklist
Browse all launch guides · Read resources · How to make and check your next change
FAQ for builders before launch
Can Lovable test my app automatically?
Partly. Ask in the project chat, for example "test this" or "verify it works", and browser testing runs the flow in a real browser. It is weak at canvas tools, drag and drop and subtle visual differences, and it runs against the preview, so check the published app yourself.
Does testing in the preview change my live data?
The main preview can write to the live database. In a draft, the example-data banner tells you it has its own backend. If there is no banner, the draft shares live data and any write takes effect immediately.
