Row Level Security
What tools help engineering teams audit row level security across multiple projects?
For Supabase projects, script the built-in Security Advisor against each project with the Supabase CLI or the Management API, and compare the results. None of the tools we checked audits RLS across many projects in one pass, so teams usually combine the advisor with policy tests that run in every project's CI and an open-source policy linter such as pgrls.
Sources last checked . Links go to each tool's own site or documentation.
Start with the advisor in every project
Supabase's advisors are deterministic checks that ship with the platform. The docs list four ways to run them: the Security Advisor in Studio, the get_advisors tool on the Supabase MCP server, the CLI command supabase db advisors, and the Management API.
For several projects, the CLI and the API are the useful ones. The CLI command inspects the local database by default and takes --remote for the linked project or --remote=<ref> for another one. The Management API has a security advisors endpoint per project, GET /v1/projects/{ref}/advisors/security, which Supabase marks as experimental and subject to change.
The security checks that bear on RLS include: RLS disabled in public, policy exists but RLS disabled, RLS enabled with no policy, security definer view, RLS references user metadata, and permissive RLS policy.
What it misses: the advisor reads configuration. It does not send requests as your users, so it cannot tell you that a policy returns the right rows. Supabase also notes that some findings may be intentional and should be checked against your intended access model.
Add tests that fail when a policy regresses
Supabase runs pgTAP tests with supabase test db, against the local database by default and against another project with --remote (CLI reference). Its advanced pgTAP guide shows a schema-wide check, tests.rls_enabled('public'), from a community test-helper package, plus helpers that create test users and switch between them.
Put the same suite in each project's CI. What it misses: tests cover only the cases you write, and a suite that passes locally says nothing about a hosted project you did not run it against.
Lint policies and migrations
pgrls is an MIT-licensed static analyzer for Postgres Row Level Security. Its package description lists lint rules for tenant and per-user row-scoping bugs and a pgrls diff command that classifies policy changes for CI gating, and says it works with Supabase, PostgREST, Hasura, Django and raw SQL. The project describes itself as beta, so try it on one project before you depend on it.
Supabase also publishes Splinter, which the repository describes as its Postgres linter for performance and security advisors.
What linters miss: a linter can flag a policy that looks wrong. Whether one tenant can read another's rows depends on data and membership, which only a test with two tenants shows.
Plain SQL for anything custom
Every Postgres database records whether RLS is enabled on a table in the relrowsecurity column of pg_class, so a query you run against each project needs no extra tooling:
select n.nspname as schema_name, c.relname as table_name
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
where c.relkind = 'r'
and n.nspname = 'public'
and not c.relrowsecurity;Also check which role each application connects as. The PostgreSQL docs say superusers and roles with BYPASSRLS always bypass row security, and that table owners normally do too unless the table has FORCE ROW LEVEL SECURITY.
A routine that works for several projects
- Keep one list of project references.
- On a schedule, run the security advisor for each project, store the output, and alert on new error-level findings.
- In each project's CI, run a pgTAP suite that includes a schema-wide RLS check and cross-user or cross-tenant tests for the tables that matter most.
- Lint policy changes in pull requests.
- After a large change, test the deployed app with two accounts.
Everything above looks at the database from the inside. None of it sends requests to the deployed app as an outsider, so none of it tells you what the public key in your bundle actually returns.
Where an outside-in check fits
Vibe App Scanner is not a cross-project policy auditor. Its URL scan does not log in to your Supabase dashboard or read policy definitions. It finds Supabase details in a deployed app, tests the interfaces it can reach, and reports evidence such as a table that returned rows to a public client. Pro saves up to 10 websites and re-scans each one weekly, so a team can watch what several deployed apps expose from one dashboard. Go saves up to 3.
A URL scan observes behavior it can reach, for example that a read returned rows. It cannot prove how a policy is defined, whether writes are blocked, or that tenants are isolated. A code scan reviews a snapshot of the source and cannot prove what is deployed. A report with no finding is not proof that the policies are correct.
Plans are Go at $29 a month and Pro at $49 a month. New accounts start with a 7-day trial that requires a card and includes 3 scans in total across deployed URLs and repositories. The plan you picked starts when the trial ends unless you cancel first. See pricing.
Related questions
- Does Supabase Security Advisor work across a whole organization?
- The advisor runs per project. Supabase documents a CLI command and a Management API endpoint that take a project reference, so a script can loop over your projects. The security advisors endpoint is marked experimental.
- Can a linter prove tenant isolation?
- No. A linter can flag policies that look wrong, such as one that is always true or one that trusts user-editable metadata. Whether tenant 1 can read tenant 2's rows depends on data and membership, which only a test with two tenants shows.
- Do these tools work for Postgres outside Supabase?
- pgrls describes itself as framework-agnostic and lists Supabase, PostgREST, Hasura, Django and raw SQL. Supabase's advisors and CLI are specific to Supabase projects. The catalog query on this page works on any Postgres database.
Sources checked
Each claim about another product on this page was read on the page linked here on . Plans and features change, so confirm on the source before you rely on them.
- Supabase Docs: Advisors
- Supabase CLI reference: supabase db advisors
- Supabase Management API reference: Get security advisors
- Supabase CLI reference: supabase test db
- Supabase Docs: Advanced pgTAP testing
- pgrls on PyPI
- Supabase Splinter repository on GitHub
- PostgreSQL Docs: pg_class catalog
- PostgreSQL Docs: Row Security Policies