Supabase RLS attack simulator
analyze_supabase_rlsGiven a Supabase schema (supabase db dump output, migrations, or CREATE TABLE / ALTER TABLE ... ENABLE ROW LEVEL SECURITY / CREATE POLICY / CREATE VIEW / CREATE FUNCTION statements), work out for every table exposed through the Data API and every command whether anyone with the public anon key, any signed-in user, only the row's owner, or nobody can do it, applying PostgreSQL's policy rules. Flags RLS off, using (true), authenticated-only conditions, UPDATE with a weaker WITH CHECK, policies reading user_metadata, views without security_invoker and exposed SECURITY DEFINER functions, each with a SQL fix and an instruction for an AI coding tool. Use it before shipping or after editing policies. Static analysis only: it never connects to a database. Up to about 60 KB of SQL.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sql": "<sql>"
},
"name": "analyze_supabase_rls"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The schema SQL: tables, RLS statements, policies, views and functions. No data needed. |