Menu

Static Auditing Supabase Migrations: Catching Missing RLS & SECURITY DEFINER Bugs Before Prod
πŸ“°

Static Auditing Supabase Migrations: Catching Missing RLS & SECURITY DEFINER Bugs Before Prod

DEV Community: postgresΒ·Pablo Ian LaurinoΒ·about 11 hours ago
#d4ERWyQ6
#devtopostgresql#devto#dev#supabase#function
Long article (1287 words) β€” no AI summary yet.
Reading 0:00
15s threshold

The Vibe-Coding Security Gap

You scaffolded a Supabase project. Enabled RLS on users . Added a policy. Shipped.

Three months later, a pen test finds:

analytics_events table: no RLS enabled (RLS-001, Critical)

get_user_stats RPC: SECURITY DEFINER without fixed search_path (RPC-001, High)

Frontend calls .rpc('deleted_function') β€” function dropped in migration 047 (RPC-002, High)

.env.example has VITE_SUPABASE_SERVICE_ROLE=eyJ... real JWT, not placeholder (SEC-001, Critical)

None of these throw errors. None show up in logs. They're silent misconfigurations that turn into data breaches.

Enter: Supabase RLS & Vibe-Code Security Auditor

A single-file, zero-dependency Python CLI that reads your SQL migrations (in filename order) and client source, then reports findings with file:line locations and concrete fixes .

# Scan a project python -m auditor ./my-supabase-project

# JSON for CI, fail on high+critical python -m auditor ./my-supabase-project --format json --out audit.json --fail-on high

# Or install…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.