Check Supabase migrations for RLS and grant gaps
check_supabase_migrationscheck_supabase_migrations({"sql":"create table public.notes (id bigint);"}) Use when reviewing Supabase migration changes for missing RLS or policies, unrestricted read/write policies, exposed security definer functions and Data API grant gaps. Pass file contents: sql contains one migration's SQL text; files contains path and content for each file. Runs the VibeRaven 1.8.0 SQL rules and returns finding id, severity, file, line, a suggested fix and a guide link. For missing Data API grants, include the migration revoking default privileges or supabase/config.toml, plus browser files using supabase.from(...) (a "use client" file, or src files with package.json for Vite). Limits: supplied text only, up to 200 KB/50 files; cannot access your repository or database, does not execute SQL, and does not store or log file contents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | The SQL text of one migration file. | |
| files | No | Several files: .sql migrations, and optionally supabase/config.toml, package.json and browser code files. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | Yes | ||
| counts | Yes | ||
| skipped | Yes | ||
| findings | Yes | ||
| nextStep | No | ||
| sql_files | Yes | ||
| full_check | Yes | ||
| public_tables | Yes | ||
| viberaven_version | Yes | ||
| findings_not_listed | Yes |