RLS Enabled No Policy
No outsider can read the table, but your own app cannot either, so a feature is probably broken or about to break.
What it means
This is an INFO in Supabase’s own Security Advisor (lint 0008_rls_enabled_no_policy). It is the safe way round: Row Level Security is on, and with no rules written, the public API returns nothing from the table and accepts no writes.
It can happen when an AI builder turned RLS on and never added the rules, or when the rules were dropped later. Lists come back empty and saves fail.
Sometimes it is on purpose: a table that only your server touches, using the secret key, needs no rules. In that case say so in writing, as the second step shows.
Check it yourself
Run this in the Supabase SQL editor. Each row is a table with RLS on and no rules at all.
select c.relname as table_name
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
where n.nspname = 'public'
and c.relkind = 'r'
and c.relrowsecurity
and not exists (select 1 from pg_policy p where p.polrelid = c.oid)
order by 1;The fix
- 1
Decide for each table: should logged-in users reach it from the browser? If yes, add rules. This set lets a user work with their own rows only. It assumes the table has a user_id column that holds the owner’s id.
create policy "read own rows" on public.notes for select to authenticated using ((select auth.uid()) = user_id); create policy "insert own rows" on public.notes for insert to authenticated with check ((select auth.uid()) = user_id); - 2
If only your server should touch the table, add a rule that says no. It changes nothing in behaviour, and it tells the next person (and the advisor) that the lock is deliberate.
create policy "no direct access" on public.internal_jobs for select using (false); - 3
Log in as a test user, open the screen that uses each table, and confirm it loads and saves. Then run your scanner again.
What can break
Adding a rule that is too wide can undo the lock. Do not paste in a rule that allows everything just to make the warning go away: that trades this finding for a worse one. Tables with no user_id column, shared team data and admin screens each need a different rule.
Undo it
Remove a rule you added with drop policy "read own rows" on public.notes;. The table goes back to returning nothing through the API. Do not switch RLS off to undo this: that opens the table to everyone. To confirm the fix, run the check again: each table you gave rules to should no longer be listed.
Table, column and bucket names here are examples. This page is general guidance for one finding; it does not make an app safe on its own. Take a backup before changing a live database. Any SQL on this page was run on a test Postgres database with two test users before we published it; the tests are public. The test database is not a Supabase project. Auth and storage are stand-ins, and GraphQL and queue extensions are not installed, so those pages are tested for permissions and rules only. Dashboard steps and app code are not tested.