Supabase column permissions
Who can read the
private email?
Anyone can browse this directory. Each listing has a public name and a private email. Here’s what changes when the migration grants access to specific columns.
What a signed-out visitor can read
| Column | Before | After |
| id | Readable | Readable |
| display_name | Readable | Readable |
| private_email | Readable | Blocked |
Table-wide grant
Grade C
RC006 · high · Signed-out visitors have permission to read public.directory.private_email on any row visible to them.
Inspect the SQL
001_directory.sql
create table public.directory (
id integer primary key,
display_name text not null,
private_email text not null
);
alter table public.directory enable row level security;
create policy browse on public.directory for select to anon using (true);
grant select on public.directory to anon;
Column grant
Grade B
RC006 cleared. The narrowed grant keeps the private email out of signed-out reads.
Inspect the SQL
002_narrow_reads.sql
revoke select on public.directory from public, anon;
grant select (id, display_name) on public.directory to anon;
Both scans include the RC005 warning because the directory deliberately allows public reads of every row.