Is Your Supabase Data Public? Check Row Level Security Before You Launch
The Supabase anon key is public by design, so row level security is what protects your tables. How to tell if a table is readable by anyone and how to lock it down.
Updated 2026-10-28
The anon key is not a password
A Supabase app puts its project URL and anon key in the browser so the page can talk to the database. That is normal. It also means anyone can copy them and send their own requests to your project's REST API.
What decides whether those requests get data is row level security (RLS). If RLS is off on a table, or a policy allows everyone to read, a stranger with your anon key can read that table without logging in.
Signs a table is open
- The Supabase dashboard shows a table as unrestricted or with RLS disabled
- A policy for the anon role uses true as its condition for select
- Your app reads the table before the user logs in and gets real rows back
Lock it down
Turn on RLS for every table in the public schema, then add only the policies you need. A common pattern is letting signed-in users read only their own rows:
alter table public.profiles enable row level security; create policy "Users read their own profile" on public.profiles for select to authenticated using (auth.uid() = user_id);
Never ship the service_role key
The service_role key skips RLS completely. It belongs only on a server. If it ever appeared in your front-end code, treat it as leaked: rotate it in the Supabase dashboard's API settings and move whatever used it to a server-side function.
Check your live app for free
If your page includes a Supabase project URL and anon key, Freedom Check makes a logged-out read of one row from up to two tables your code names, using only that public key, and reports whether data came back or was blocked. It never writes and never uses a service_role key. It also flags a service_role key if one is in the page.
The free scan shows how many issues turned up and explains the most serious one with a fix prompt. The full report is $19 one time, or $29/month for unlimited.
Run a free scan →See pricing