Confirm Row Level Security covers your Supabase tables
Supabase gives every project an anon key meant for the browser. It is public by design: what it can read and change is decided by Row Level Security (RLS) policies on each table. So the key in your page is not the problem; a table without RLS, or with a policy that allows everyone, is. Whether your tables are protected can only be tested once you verify you own the site.
Find out whether your site has this problem, and every other check, in one free scan.
Check your site freeWhy it matters
A Supabase anon key is public by design; Row Level Security is what stands between it and your data. A table without it can be read, and often changed, by anyone holding the key from your page.
How to fix
- 1 In the Supabase dashboard, open the Table Editor (or Advisors > Security) and turn on Row Level Security for every table in an exposed schema.
- 2 Write policies that limit each table to the rows the signed-in user owns, using auth.uid(), and keep public read access only where it is meant.
- 3 Test as a signed-out visitor and as a second user that no table returns rows they should not see.
Common mistakes
- Creating a table in SQL or a migration and forgetting to enable RLS on it: the dashboard enables it for tables made there, but SQL does not.
- Enabling RLS with a policy like using (true), which lets the anon key read every row anyway.
- Treating the anon key as a leak and rotating it, when the fix is the policies, not the key.
How to verify
- 1 In Supabase, open Advisors > Security and confirm no table is reported without Row Level Security.
- 2 With only the anon key (signed out), query each table and confirm you get no rows you should not see.
- 3 Sign in as a second test user and confirm you cannot read or change the first user's rows.
Related checks
Ready to see where you stand?
Scan your site and get your Engineering Score with a prioritized roadmap in under a minute, no signup required.
