Free & open source

Prove your Postgres RLS, tests generated for you.

Reads your Row-Level Security policies. Generates the pgTAP suite and the seed data that prove them.

Apache-2.0, emits pgTAP, Supabase & any Postgres
Featured in Supabase's July 2026 Developer Update, under "Made with Supabase".
rlsautotest RLS access report: a per-identity grid where anon can read every row in public.documents is flagged red as a leak
One command produces a per-identity access report that flags a table anon can read.

Why the data matters

The report

One report per schema, dated and reproducible. Each table shows a row-level grid and a column-level security grid, side by side, so it reads like a permissions table.

rlsautotest RLS access report for the colsec schema. Each table has a Row level (can act?) grid and a Column level security (granted / leaks) grid, per identity and command, with columns that leak past their grant flagged red.
Each table carries a row-level grid and a column-level security grid, side by side. Columns that a broader grant leaks past are flagged red.

The two-membership user

Most suites test membership policies with users who belong to exactly one team. Real users belong to two, and that is where a class of bugs lives.

Beyond the policies

Correct policies can still be undone by how the data is reached. rlsautotest maps that surface straight from the catalog and reports each object or role that can sidestep RLS.

Two layers where tenant data leaks. One tool for each. Use both.

A test at one layer says nothing about the other.

rlsautotest

Policy layer
  • Proves each RLS policy, per table, per command and per identity
  • Fails CI on a reachable table with no policy
  • Names every SECURITY DEFINER function, view and trigger as a suspect

It cannot judge the suspects; it sees that code bypasses RLS, not whether it leaks.

rlsautotest, free and open source →

UnitAutogen seccover

Code layer
  • Runs each suspect as two tenants with generated data on both sides
  • A verdict per routine, enforced or leaking, with the table, command and channel
  • A PII pass for personal data escaping through error messages

It cannot stand in for the policies; direct table access is rlsautotest's job.

seccover, in the UnitAutogen engine →

Complete leakage detection needs both.

Get started

pip install rlsautotest

# quick check: write an access report, open it in your browser (nothing saved)
rlsautotest --db-url "$DATABASE_URL" --schema public --html rls-report.html

# or generate a pgTAP suite to commit and run in CI
rlsautotest --db-url "$DATABASE_URL" --schema public --emit supabase/

What platforms suggest

rlsautotest generates exactly the RLS proof PostgreSQL, Supabase and Neon tell you to have.