Framework Security

Auditing Postgres and Supabase Row-Level Security (RLS) policies

Catch tables missing ENABLE ROW LEVEL SECURITY, overly broad anon policies, and self-comparing joins in Supabase migrations.

Prerequisites

  • SQL migrations / Supabase schema
STEP 01

Verify RLS enabled on every public table

Inspect pg_tables.rowsecurity across every migration file; default-deny when policies are absent.

STEP 02

Bind policies cleanly to auth.uid()

Check both USING and WITH CHECK clauses on SELECT, INSERT, UPDATE, and DELETE.

Related AegisSec skills