It might be, and you can’t tell from the app’s UI. If row-level security is off or a policy is too open, anyone with your public anon key can query the table directly, and the Tech Check checks every table for this.
Of 1,072 vibe-coded apps scanned, 172 let anyone delete records from the database without logging in.
Source: Symbiotic Security, 2 Jun 2026
Why this happens
In apps built with Lovable, Bolt and similar tools, the browser talks to Supabase directly with the anon key. That key is public by design. Row-level security (RLS) policies are the only thing deciding which rows each request can read or change.
What I check
- RLS is turned on for every table in exposed schemas.
- Each table the app calls has grants for the roles that use it, anon and authenticated, and no more.
- Policies compare rows to auth.uid(), not to a value the client sends.
- Insert and update policies stop users from setting someone else’s user_id or their own role.
- Storage buckets have policies too, and private files are not public.
- Views and functions do not bypass RLS by running as the owner.
- I test it: two test accounts, one tries to read and change the other’s data.
A quick check you can do now
In the Supabase dashboard, open Database, then Tables. Any table marked as having RLS disabled can be read by anyone with your anon key. Supabase’s Security Advisor also lists them. Turning RLS on without policies blocks all access, so add policies before you switch it on in production.
What a safe policy looks like
For a table where each row belongs to one user, the read policy compares the row’s owner column with the logged-in user: create policy "Read own orders" on orders for select to authenticated using ((select auth.uid()) = user_id).
Insert and update need their own policies with a with check clause using the same comparison, or a user can write rows that carry someone else’s user_id. Supabase’s docs also suggest wrapping auth.uid() in a select, as above, and adding an index on user_id, so the check stays fast on large tables.
New tables also need grants
Since 30 October 2026, Supabase no longer grants new tables in the public schema to the API roles. This now applies to existing projects too. Tables you already have keep their grants. A table created after that date returns a 42501 permission denied error until you grant access, even with RLS on and correct policies.
Add the grants in the same migration that creates the table, and only for what the app needs: grant select, insert, update, delete on public.orders to authenticated. Grant select to anon only if logged-out visitors should read the table. A grant lets a role reach the table, and the policies still decide which rows it sees, so keep both.
Sources
- Supabase docs, Row Level Security, read 2 Nov 2026
- Supabase changelog, Tables not exposed to Data and GraphQL API automatically, read 2 Nov 2026
First published on badii.studio. I review and fix apps built with Lovable, Bolt and other AI tools before launch.
Top comments (0)