Airlock RLS
v0.2.0Scan a deployed site for an exposed Supabase service_role key and audit Row Level Security.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
scan_site_for_exposed_key
Scan a DEPLOYED website's HTML, JavaScript bundles and source maps for an exposed Supabase service_role key (a service_role JWT or an sb_secret_... key), and check whether /.env is downloadable (fail), /.git/ is served (fail) or source maps are public (warn). Needs only the public URL: no database, no credentials. A found service key bypasses ALL Row Level Security, giving anyone full read/write to the database. Also reports whether the public anon/publishable key is present, which means RLS is the only lock (follow up with audit_supabase_rls). Use right after deploying a Supabase app. Never p…
| Parameter | Type | Description |
|---|---|---|
site_url * | string | Public https URL of the deployed site to scan (e.g. https://myapp.com). Only public http(s) hosts are allowed. |
max_scripts | integer | How many JS bundles to read (default 50). If the site has more, the result says how many went unscanned instead of implying it looked at all. |
audit_supabase_rls
Audit a Supabase/Postgres database's access control and return a human-readable report (use get_findings for JSON). Covers: tables with RLS off; permissive policies (USING (true) or anything that reduces to always-true); anon/authenticated policies that do not scope rows to the caller (tenant leaks) for SELECT, INSERT, UPDATE and DELETE; policies that trust user-editable user_metadata; Storage (public buckets and storage.objects policies, reported as storage_<kind>); SECURITY DEFINER functions (callable by anon, search_path not pinned, reading user_metadata); views that run as their owner and…
| Parameter | Type | Description |
|---|---|---|
db_url * | string | Postgres connection string for the project to audit (e.g. postgresql://... — get it from `supabase status` locally or your project's connection settings). A read-only role is enough. |
allow | array | Policy names that are intentionally permissive (e.g. a public status page). Prefer the qualified form "table.policy". |
schema | string | Schema to audit (default: public). |
get_findings
Audit a Supabase/Postgres database's Row Level Security and return machine-readable structured JSON. Unlike audit_supabase_rls (which returns a human-readable summary), this tool returns findings grouped by severity with counts, suitable for programmatic consumption by an agent that needs to iterate over findings, generate fixes, or build a report. Same engine, same checks (tables, policies, Storage, SECURITY DEFINER functions, views, Realtime, default privileges, roles), different output shape. Each finding has kind, severity (fail/warn), object and detail; pass kind to explain_finding or gen…
| Parameter | Type | Description |
|---|---|---|
db_url * | string | Postgres connection string for the project to audit (e.g. postgresql://... — a read-only role is enough). |
allow | array | Policy names that are intentionally permissive. Prefer the qualified form "table.policy". |
schema | string | Schema to audit (default: public). |
explain_finding
Explain what an Airlock finding kind means, why it is dangerous, how to fix it (with example SQL), and which other findings are related. Pure lookup — no database connection needed. Use this after get_findings or audit_supabase_rls to understand a specific finding before fixing it. Supported kinds: rls_disabled, permissive_true, anon_unscoped, authenticated_unscoped, write_unchecked, write_unscoped, update_using_unscoped, delete_unscoped, or_branch_unscoped, helper_scoped, policy_trusts_user_metadata, security_definer, anon_executes_definer, definer_search_path_mutable, view_bypasses_rls, ma…
| Parameter | Type | Description |
|---|---|---|
finding_kind * | string | The finding kind string from an audit result (e.g. 'rls_disabled', 'permissive_true', 'cross_tenant_read_leak'). |
generate_fix
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.
| Parameter | Type | Description |
|---|---|---|
finding_kind * | string | The finding kind to fix (e.g. 'rls_disabled', 'permissive_true'). |
table_name * | string | The table the finding applies to (e.g. "profiles"). |
policy_name | string | The policy name, if the finding is about a specific policy. Not needed for table-level findings like rls_disabled. |
schema | string | Schema the table lives in (default: public). |
list_monitor_projects
List the Supabase projects connected to your Airlock Monitor account. Returns project id, label, and last-run timestamp for each.
| Parameter | Type | Description |
|---|---|---|
api_key * | string | Airlock Monitor API key (starts with amk_). |
base_url | string | Base URL of the Monitor instance (default: https://app.shipsealed.com). |
start_monitor_run
Start an Airlock Monitor run (RLS audit + DAST) on a connected project. Returns the run id and initial status. Poll with get_monitor_run.
| Parameter | Type | Description |
|---|---|---|
api_key * | string | Airlock Monitor API key (starts with amk_). |
project_id * | string | The project id to run against (from list_monitor_projects). |
base_url | string | Base URL of the Monitor instance (default: https://app.shipsealed.com). |
get_monitor_run
Get the status and summary of an Airlock Monitor run. Status is one of: queued, running, completed, failed.
| Parameter | Type | Description |
|---|---|---|
api_key * | string | Airlock Monitor API key (starts with amk_). |
run_id * | string | The run id (from start_monitor_run). |
base_url | string | Base URL of the Monitor instance (default: https://app.shipsealed.com). |
get_monitor_findings
Get the findings (leaks, warnings) from a completed Airlock Monitor run. Each finding has kind, severity, object, detail and a suggested SQL fix.
| Parameter | Type | Description |
|---|---|---|
api_key * | string | Airlock Monitor API key (starts with amk_). |
run_id * | string | The run id of a completed run. |
base_url | string | Base URL of the Monitor instance (default: https://app.shipsealed.com). |
get_monitor_attestation
Download the signed attestation (Ed25519) for a completed run. Returns the canonical JSON report, its SHA-256 hash, and the signature. Anyone can verify it at shipsealed.com/verify without an account.
| Parameter | Type | Description |
|---|---|---|
api_key * | string | Airlock Monitor API key (starts with amk_). |
run_id * | string | The run id of a completed run. |
base_url | string | Base URL of the Monitor instance (default: https://app.shipsealed.com). |