JustHandled Labs
// database security

Supabase RLS Doctor

Audit local Supabase migrations and client code for the row-level-security mistakes that can expose data, with severity, exact evidence, and a verification step for every review target.

What it inspects

What you give it

Point the workflow at the local project evidence you want reviewed: SQL migrations and policy files, Supabase client initialization code, a database schema snapshot, and storage policy configuration. Declared file scopes include its own package, matching *.sql files, and supabase/migrations/*.

The scanner uses the Python 3 standard library. If Python or matching files are unavailable, the skill falls back to its manual checklist instead of inventing a result.

What comes back

The local scanner prints Markdown or JSON findings. Each finding is ranked from Critical to Info and includes the affected object or file, exact review evidence, impact, a proposed fix, and a verification step. The checklist then covers policy semantics and live-project boundaries the heuristic scan cannot prove.

supabase-rls-doctor / review
$ scan local Supabase evidence
 
CRIT profiles: migration creates table without enabling RLS
HIGH posts_select: review USING (true) for public intent
MED avatars: confirm public bucket is intentional
 
read-only evidence, remediation, verification

Useful before

Permissions and safety boundary

Known limitations

The scanner is heuristic. It can identify risky patterns and missing local evidence, but it cannot prove a schema is secure or determine whether a deliberately public policy matches the product's business rules. Project-level settings, deployed drift, Security Advisor state, runtime JWT claims, and role-by-role behavior require manual or user-approved live testing.

Views, security-definer functions, grants, storage behavior, and authorization encoded outside matching files may need direct review. Treat a clean result as a smaller review queue, not a certification.

Use the Supabase RLS pre-launch checklist to build the identity-operation matrix and live evidence the local scan cannot see.

Questions

What Supabase security problems can it flag?

It flags missing or disabled RLS, apparently permissive policies, missing ownership checks, elevated-key references in frontend code, storage review targets, overbroad grants, and migration drift.

What project evidence can it inspect?

SQL migrations and policy files, Supabase client initialization code, database schema snapshots, and storage policy configuration. Declared scopes include matching SQL and migration files.

Does it connect to or modify my live project?

No. The scan is local and read-only. It does not change policies or settings, transmit project data, or install dependencies.

What does the report contain?

Severity-ranked findings with exact local evidence, impact, a suggested remediation, and a verification step, plus a manual review checklist.

Can it verify Dashboard and Security Advisor settings?

Not without separately approved live access. Deployed settings and role behavior require manual or user-approved testing.

Does a clean scan prove the database is secure?

No. It is a heuristic review tool, not a security certification. Test the intended authorization model by role and operation before launch.

Add Supabase RLS Doctor to your pre-launch review.

Current price and purchase option are shown on Agensi. The workflow starts read-only and works with agents that load SKILL.md packages.

Get Supabase RLS Doctor on Agensi