Supabase RLS Security Pack: find the holes before your users do
by TIC
$19
You built your app with Lovable, Bolt, Cursor, or v0. It works. But the most common way AI-built apps leak data is not a crash, it is a quiet one: Row Level Security switched on while policies quietly let anyone through, or switched off on a table nobody remembered.
This pack finds those holes before your users do.
How it works:
The read-only SQL auditor (supabase-rls-audit.sql) is a single SELECT over your database system catalogs. It outputs a prioritized diagnostic report of security findings. In our tests we run it inside a READ ONLY transaction; for extra assurance you can do the same: type begin read only;, paste the script, then rollback;. We have not tested this in the hosted SQL editor. It never touches your rows, modifies data, or alters configuration.
The companion remediation file (fix-recipes.sql) provides tested copy-paste SQL templates for each finding and error code. You review the SQL, customize table and column identifiers for your schema, and deliberately execute the fix in your Supabase SQL Editor.
What it checks:
Tables with RLS switched off (leaving public API roles with full table access)
Tables with RLS enabled but zero policies defined (PostgreSQL defaults to deny-all, blocking reads and raising 42501 permission denied errors when policies are omitted)
Insert policies that check nothing (WITH CHECK (true)), which allow users to insert rows with another user's ID, or unconstrained policies admitting signed-out visitors
Overly broad update and delete policies that apply across any row (USING (true))
Direct write grants held by the anon role
Views that bypass row level security or allow writes without check options
API roles missing table grants (Supabase new table default privilege behavior raising 42501 before RLS evaluates)
Effective PostgreSQL write-check behavior:PostgreSQL automatically reuses the USING expression as the check condition on UPDATE policies when WITH CHECK is omitted. Omitting WITH CHECK on an update policy is therefore not a vulnerability when USING correctly restricts rows to the owner. The actual vulnerability occurs on INSERT policies that lack constraints or write policies with explicit WITH CHECK (true) clauses that allow arbitrary writes.Why this format:
No install. It is plain SQL, nothing to run on your machine.
No account access. You never share your database password, your service key, or your project. You run it yourself, inside your own dashboard.
Read-only and safe. It only reads system catalogs. It does not read your rows, write anything, or change a setting.
Direct execution. Validated against PostgreSQL 16.2 with standard Supabase role simulation (anon, authenticated, service_role). Runs directly in your Supabase project SQL Editor without external tools or dependencies.
Product contents (seven files):
supabase-rls-audit.sql: read-only auditor script (19,759 bytes / 19.8 KB)
fix-recipes.sql: copy-paste fix templates for every finding and error code (12,218 bytes / 12.2 KB)
SKILL.md: Claude Code and Cursor skill to analyze findings and write schema DDL (5,486 bytes / 5.5 KB)
README.md: detailed technical reference manual (6,905 bytes / 6.9 KB)
QUICKSTART.md: step-by-step customer walkthrough (3,082 bytes / 3.1 KB)
LICENSE.txt: commercial Single Developer License terms by Tori (3,935 bytes / 3.9 KB)
SHA256SUMS: cryptographic checksum manifest for local byte verification (480 bytes)
Compatibility & test scope:
Runs directly in your Supabase dashboard via the SQL Editor against PostgreSQL system catalogs.
Validated against PostgreSQL 16.2 configured with standard Supabase role simulation (anon, authenticated, service_role) and auth.uid() function. Does not constitute testing against live hosted Supabase platform infrastructure.
Catches recurring high-frequency RLS configuration vulnerabilities fast. It does not replace a dedicated manual code audit or penetration test for bespoke PL/pgSQL procedural functions or complex storage bucket rules.
Remediation notice:Fix recipes are provided as tested templates. Remediation requires customer review and deliberate SQL execution in your Supabase SQL Editor. Customize table names, policy names, and ownership columns for your schema before applying changes.Support expectations:Self-service developer tooling. Includes tested copy-paste SQL templates, troubleshooting guides, and AI skill definitions. Bespoke database administration or emergency penetration testing services are not included.Customer-facing security disclaimer:The software and fix templates are provided "as is", without warranty of any kind. The audit is a single SELECT over system catalogs and does not alter database state. Always review fix recipes and test policies in a staging environment before applying them to production.Published by Tori (TIC Association). Contact: tori.tic.association@gmail.com