Skip to content

v1.2.0: Supabase migrations

Choose a tag to compare

@azank1 azank1 released this 31 Oct 19:01
· 8 commits to main since this release

Supabase migrations. agent-check now replays supabase/migrations/*.sql (and supabase/schemas/*.sql) in order and reports what the API can reach:

  • rls-off-table: a table in an exposed schema with row-level security off. Critical when the migrations let anon change it, high otherwise. A table with no grant in the migrations still counts: until 30 October 2026 Supabase granted every new table to anon and authenticated, so on those tables row-level security is the only guard.
  • default-grant-to-anon: alter default privileges … grant … on tables to anon, which exposes every future table again and undoes Supabase's 30 October change.
  • view-bypasses-rls: a view without security_invoker, which runs with its owner's rights and skips the row-level security of the tables it reads.

Comments, string literals and function bodies are ignored. A later enable row level security, rename or revoke counts, and so does a DO loop that switches row-level security on for the tables it lists or for every table, or an event trigger that does it for new ones. Exposed schemas come from supabase/config.toml ([api] schemas) and default to public.

The fixes are in docs/fixes.md. Each snippet there was run against Supabase's Postgres 17 image, along with the behaviour each rule describes: anon reading and writing a table with row-level security off, and a view without security_invoker returning rows that row-level security hides.

Reports. Each finding now carries a severity marker (🔴 critical, 🟠 high, 🟡 medium, ⚪ low), and the report ends with a link to the fix guide and a line on where to ask for a fixed-price fix. The README leads with a screenshot of the job summary from a demo repository with planted mistakes.