GuardCue

Guide · Supabase

Supabase RLS explained in plain English

RLS, short for row level security, is the set of rules in your Supabase database that decides who can read and change which rows. Your app hands every visitor a public key to reach the database, so these rules are the only thing standing between a stranger and your customers’ data. Supabase’s own advice is to turn it on for every table your app can reach.

What does row level security mean?

Think of your database as a filing cabinet and each row as one card in it: one customer, one order, one message. Row level security puts a rule on each drawer saying whose cards a person may take out. A good rule says “each customer sees only their own cards”. Supabase describes it as authorization rules “that run inside the database”, which matters: the rule holds even if someone skips your app and talks to the database directly with your public key.

Why does it matter for an app built with AI tools?

Claude, Lovable, Bolt, Cursor and other AI tools build apps that talk to Supabase straight from the visitor’s browser, using the public key. That key is meant to be public. The rules are what make it safe, and they are the part an AI tool is most likely to leave out, because the app works perfectly without them.

The three states a table can be in

How do I check mine?

Paste this into Claude, Lovable, Bolt, Cursor or whichever tool built your app:

List every table in my Supabase database. For each one, tell me whether row level security is turned on and which rules (policies) it has, in plain words: who can read it, who can add to it, who can change it and who can delete it. Turn row level security on for every table that does not have it. Anything about a person should be readable and changeable only by that person. Show me the list before and after.

Then check from the outside, the way a stranger would. Our free database check finds your app’s public key the way a visitor’s browser does and shows which tables it can read. It cannot see what a signed in user can reach; that is the two user test above.

GuardCue checks apps built with AI tools and explains what it finds in plain English, for the person who built it rather than for a developer. Check your database, free.