If you built your app with Lovable, Bolt or another AI tool, there is a good chance Supabase is showing you a warning that says row level security is disabled on a table in the public schema. It is the most common serious problem I find in AI-built apps, and it is the one founders most often ignore, because the app works fine.
What the warning means
Your app talks to Supabase using a public key. That key is in the code every visitor downloads. It is meant to be public. What protects your data is a set of rules on each table that say who may read or change which rows. Those rules are called row level security, or RLS.
When RLS is disabled on a table, there are no rules. Anyone who has your public key, which is everyone, can read every row in that table and often change it too. They do not need to log in.
The second version of the same mistake
Sometimes RLS is switched on but the rule says, in effect, yes to everyone. AI tools write this when you ask them to make an error go away. The warning disappears and the table is just as open as before.
-- Looks protected. Is not.
create policy "allow all" on orders
for select using (true);What a correct rule looks like
A real rule ties each row to its owner. For a table where every row belongs to one user:
alter table orders enable row level security;
create policy "owners read their orders" on orders
for select using (auth.uid() = user_id);If you sell to companies, the rule checks that the user belongs to the company that owns the row. On NestLink, each agency's records are kept apart this way, inside the database, so no mistake in the screens can leak one agency's deals to another.
How to check your own app in ten minutes
- Open the Supabase dashboard and look at the security warnings. Every table listed there is open.
- For each table that has RLS on, read the policies. If one says using (true), treat that table as open.
- Create two test accounts. Sign in as the first and try to load a record that belongs to the second.
Do not just switch it on
Turning RLS on with no policies blocks everyone, including your own app, and the screens go blank. Each table needs its policies written and tested first. For a small app that is a day or two of work. It is the first thing I fix when I take over an AI-built app.