Description
Ensure every table that has Row Level Security enabled also has at least one policy that defines who can read or change its rows. Tables should not be left with RLS turned on but no policies, unless the table is intentionally meant to be accessible only through server-side code.
Rationale
When RLS is enabled with no policies, the Data API denies all access to the table. This is safe, but it usually means the intended access rules were never written. Teams then often work around it by disabling RLS or using the secret key in the client, which creates a much bigger risk. Defining clear policies keeps access both working and secure.
Impact
Makes intended access rules explicit
Prevents risky workarounds such as disabling RLS
Policies must be tested to confirm they allow only the right rows
Default Value
By default, enabling RLS on a table does not create any policies, so all Data API access to the table is denied.
Pre-Requisites
Project Owner, Admin, or Developer role
An understanding of who should access each table
Test Plan
Sign in to the Supabase Dashboard at https://supabase.com/dashboard.
Select your project.
Open Advisors in the sidebar and select Security Advisor.
Check for the finding RLS Enabled No Policy.
For each listed table, confirm whether access through the Data API is intended.
If a listed table needs API access, follow the implementation steps.
Implementation Steps
Sign in to the Supabase Dashboard at https://supabase.com/dashboard.
Select your project.
Open the SQL Editor in the sidebar.
Create a policy for the table, for example: create policy "Users can read own rows" on public.<table_name> for select to authenticated using ((select auth.uid()) = user_id);
Add policies for any other operations the table needs (insert, update, delete).
Test the policies with a normal user account and rerun the Security Advisor.
Backout Plan
Sign in to the Supabase Dashboard at https://supabase.com/dashboard.
Select your project.
Open the SQL Editor in the sidebar.
Run: drop policy "<policy_name>" on public.<table_name>;
Reference
https://supabase.com/docs/guides/database/postgres/row-level-security
https://supabase.com/docs/guides/database/database-advisors?lint=0008_rls_enabled_no_policy