Research · December 2026

I read the database migrations of 120 Lovable apps

I fix AI-built apps for a living, so I wanted real numbers instead of scary headlines. I took 120 public GitHub repositories created with Lovable and updated after June 2026. 97 of them use Supabase, and 88 contain database migrations with tables. I read their SQL and source code.

Static review only. I did not access any live app or database, and I did not use any key I found. No project is named here.

What actually goes wrong

ProblemShareWhy it matters
An active policy lets anyone update or delete rows (USING (true) on UPDATE, DELETE or ALL)29 of 88 (33%)In 19 projects this works without logging in, in 19 for any logged-in user. One request can rewrite or wipe a table.
Anonymous inserts with no check (WITH CHECK (true) for anon)34 of 88 (39%)Fine for a contact form, risky for tables the app trusts: spam, fake orders, polluted data.
SECURITY DEFINER functions without a fixed search_path31 of 88 (35%)Flagged by Supabase's own linter. These functions run with elevated rights.
Public tables without row-level security9 of 88 (10%)Anyone with the public key can read and write the whole table.
The service_role key hardcoded in frontend code1 of 120That key bypasses every policy. Full access to the entire database.

Policies were tracked across the full migration history: a policy that was created and later dropped does not count.

What scanners exaggerate

My first naive scan said 84% of these apps had dangerous policies. After checking by hand, the real number was 33%. Most of the noise came from:

Don't panic because a tool shows a big red number, and don't relax because it shows a green one. Read the policies.

Check your own app in 10 minutes

  1. Search your migrations for USING (true) and WITH CHECK (true) on anything other than SELECT.
  2. In Supabase, open the Security Advisor and fix every error it lists.
  3. Make sure your service_role key never appears under src/ or in any file the browser loads.
  4. Log in as a second test user and try to open the first user's data by changing an ID in the URL or the request.

Want a second pair of eyes?

Send me your app URL and I'll tell you the three biggest risks I see, for free, within 24 hours. If you want them fixed, I do that at a fixed price.

Get a free red-flag check