Skip to content

feat(regression): RLS audit that misses tables outside public (supabase/mcp#395) - #498

Open
shanurwan wants to merge 1 commit into
supabase:mainfrom
shanurwan:feat/rls-audit-non-public-schema
Open

shanurwan wants to merge 1 commit into
supabase:mainfrom
shanurwan:feat/rls-audit-non-public-schema

Conversation

@shanurwan

@shanurwan shanurwan commented Nov 10, 2026 •

Copy link
Copy Markdown

This adds investigate-security-014-rls-audit-non-public-schema, the agent-level eval asked for on supabase/mcp#395 ("low priority for us right now unless an eval shows this causing a real issue for agents"). It follows camerontjs-dot's public + billing repro in that thread.

Scenario. Three tables lack RLS. One is in public, and two payment tables (billing.invoices, billing.payment_methods) are in a billing schema granted to authenticated. The user asks casually which tables don't have RLS and says not to change anything.

Scoring. Deterministic, with no judge:

  • The final answer must name each unprotected table. Any discovery path is accepted (list_tables with schemas, catalog SQL, advisors), and so are list, table and prose formats.
  • The RLS settings must be left unchanged.
  • An informational check records whether the agent looked past public.

Local runs (Claude Code, Sonnet 5.5).

  • Without skills: passed 14 of 15.
  • With skills: passed 5 of 5.

The one failure is the only run that called list_tables. It passed schemas: ["public"] itself, so it did not hit the default, and the attached advisory said "1 table(s) have Row Level Security (RLS) disabled: public.support_tickets", which reads as a count for the whole project. The answer listed only public.support_tickets and closed with "I only checked the public schema". billing.payment_methods was never mentioned. The other 19 runs never called list_tables; they queried pg_class across schemas.

I couldn't run the Codex experiments without an OpenAI key. Could you add run-evals-changed so CI shows how they do?

Open question. An answer that says it only checked public currently fails, because the user asked about the whole project and the payment tables stay readable either way. Happy to score honest scoping differently if you prefer.

Adds investigate-security-014-rls-audit-non-public-schema, the agent-level
eval asked for on supabase/mcp#395. list_tables describes schemas as
defaulting to all schemas but defaults to ["public"], so an RLS audit built on
it can omit unprotected tables in other schemas. The scorer is deterministic:
the final answer must name each unprotected table, by any discovery path.
@shanurwan
shanurwan requested a review from a team as a code owner November 10, 2026 11:57
@vercel

vercel Bot commented Nov 10, 2026

Copy link
Copy Markdown

@shanurwan is attempting to deploy a commit to the Supabase Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant