generate_fix
Generates ready-to-run SQL to fix a specific Airlock RLS finding, tailored to table and policy names, for pasting into a migration file.
Instructions
Generate the exact SQL to fix a specific Airlock finding. Pure function — no database connection needed. Returns a ready-to-run SQL statement tailored to the table and policy names you provide. Use after get_findings or audit_supabase_rls to get a fix you can paste into a migration file.
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": {
"finding_kind": "<finding_kind>",
"table_name": "<table_name>"
},
"name": "generate_fix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | Schema the table lives in (default: public). | public |
| table_name | Yes | The table the finding applies to (e.g. "profiles"). | |
| policy_name | No | The policy name, if the finding is about a specific policy. Not needed for table-level findings like rls_disabled. | |
| finding_kind | Yes | The finding kind to fix (e.g. 'rls_disabled', 'permissive_true'). |