How to check if Supabase RLS is enabled (and fix it)

The most common way an AI-built app leaks its users' data is a Supabase table without row-level security. The anon key in your frontend can then read the whole table.

Why it matters

Supabase exposes every table in the public schema through its REST API. The anon key in your JavaScript is the only thing needed to call it. RLS is what decides which rows that key may see. With RLS off, the answer is all of them.

How to check

select tablename from pg_tables
where schemaname = 'public' and rowsecurity = false;

How to fix it

Turn RLS on, then add a policy so each user only sees their own rows:

alter table public.notes enable row level security;

create policy "Users read own notes" on public.notes
  for select using (auth.uid() = user_id);

Never ship the service_role key

The service_role key ignores RLS completely. It belongs only on a server or in an Edge Function. If it ever appeared in your frontend or a commit, rotate it in Project Settings → API.

Check your app now. Free, no signup, under a minute.

Scan your app

More guides: Is my Lovable app secure? A 5-minute check · Firebase test mode rules: how to tell if your database is open · How to check if your website leaks API keys · OpenAI API key exposed in your frontend? Do this now · Security checklist for apps built with Bolt, Cursor, v0 and Replit · Is this Claude skill or MCP server safe to install? A 5-minute check