Cross-Tenant Read Detection for Supabase

supatripwire reads your project's API gateway logs and reports reads where one tenant got another tenant's rows.

$ npx supatripwire check --since 24hsupatripwire — 2026-11-25T05:00:00.000Z to 2026-11-26T05:00:00.000ZSigned-in reads scanned: 1284  found from 2026-11-25 05:00:12 to 2026-11-26 04:58:40 (UTC)  fully checked: 1243  on tables missing from the config: 0  without a row count: 0  on tables the config ignores: 41 (countries 41)Data crossed tenants: 2  2026-11-26 03:12:08  projects  user 2d9a7c41-8e3b-4f06-b5d2-91a0c6e4f378  (named another tenant)    rows: 3  status: 200  log id: a41f0c9e-63d2-4b8a-9f17-5e2c08d3b6a1    named tenants not theirs: b83e5d10-27c4-4f9a-a6e1-3c9d0f4e7b52    their tenants: 6f1c2a9e-4b7d-4e21-9c3a-0d5e8f7b2a14    query: ?select=*&org_id=eq.b83e5d10-27c4-4f9a-a6e1-3c9d0f4e7b52  2026-11-26 03:14:51  tasks  user 2d9a7c41-8e3b-4f06-b5d2-91a0c6e4f378  (more rows than their tenants hold)    rows: 50  status: 200  log id: c7e2b815-0f4a-4d39-8c6e-2a91f5d0e743    saw at least 50 rows; their tenants hold 12    their tenants: 6f1c2a9e-4b7d-4e21-9c3a-0d5e8f7b2a14    query: ?select=*&order=created_at.desc&limit=50
Data crossed tenants: 2  2026-11-26 03:12:08  projects  user 2d9a7c41-8e3b-4f06-b5d2-91a0c6e4f378  (named another tenant)    rows: 3  status: 200  log id: a41f0c9e-63d2-4b8a-9f17-5e2c08d3b6a1    named tenants not theirs: b83e5d10-27c4-4f9a-a6e1-3c9d0f4e7b52    their tenants: 6f1c2a9e-4b7d-4e21-9c3a-0d5e8f7b2a14    query: ?select=*&org_id=eq.b83e5d10-27c4-4f9a-a6e1-3c9d0f4e7b52

It named another tenant

The log keeps the filter every signed-in read sent. supatripwire resolves each id in it to a tenant and compares it with the caller's memberships. Rows came back: data crossed. None came back: RLS stopped an attempt.

Read more about what it reports in the README.

Data crossed tenants: 2  2026-11-26 03:14:51  tasks  user 2d9a7c41-8e3b-4f06-b5d2-91a0c6e4f378  (more rows than their tenants hold)    rows: 50  status: 200  log id: c7e2b815-0f4a-4d39-8c6e-2a91f5d0e743    saw at least 50 rows; their tenants hold 12    their tenants: 6f1c2a9e-4b7d-4e21-9c3a-0d5e8f7b2a14    query: ?select=*&order=created_at.desc&limit=50

More rows than they could see

Filters only ever narrow. A read that saw more rows than the caller's tenants hold crossed tenants, whatever its filter said, and even with no filter at all.

$ npx supatripwire doctorDatabase: connected as supatripwire  ✓ memberships: sees every row  ✓ projects: sees every row  ✓ tasks: sees every rowLogs API: ✓ reachable; signed-in reads found in the last hourNot checked: whether the config matches your app — which column holds the tenant,and whether the membership table is complete. Confirm those yourself.

Nothing in the request path

Logs come through the Management API, ids through a read-only role you create and grant only the id and tenant columns. No proxy, no SDK, and no row contents read.

Run npx supatripwire doctor to check the setup.