Check your Supabase Row Level Security from the outside
Use the same public key your app ships and try to read each table without signing in: any table that answers has Row Level Security off or a policy that allows everyone. A scan of your app’s address does this for you.
Why the key alone is not the problem
The anon or publishable key is meant to be public: the browser needs it. Supabase relies on Row Level Security to decide what that key may read. With RLS off, the public key reads every row.
What the check does
- It finds your Supabase project and public key in the JavaScript your app serves.
- It asks for each table it can see, as a visitor who has not signed in.
- Each table that answers is a finding, with the table name and a fix.
What a service_role or secret key means
If the check finds a service_role key or an sb_secret_ key in the browser, Row Level Security does not help: those keys bypass it. Delete the key in Supabase, make a new one, and use it only on a server or in an edge function.
A prompt to paste into your AI
Turn on Row Level Security for every table in my Supabase database. For each table, write policies so a signed-in user can only read and change their own rows, and nobody who is not signed in can read anything except what the app shows publicly. List each table and the policy you wrote.