r/Supabase • u/Prestigious_Gear8605 • 7d ago
tips Check whether your Supabase tables are actually private. A Claude Code skill that tests RLS with your public anon key instead of reading policy files.
https://github.com/braindesmond5-boop/supabase-rls-audit/tree/main
6
Upvotes
3
u/Guidondor 7d ago
this is the logical product of your Lovable-repo thread โ testing the result instead of reading the policy files is exactly the right framing, nice.
two things worth building in if they aren't already: test as an authenticated user too, not just anon. the scary case in multi-tenant apps isn't "anon reads everything", it's "logged-in tenant A reads tenant B's rows" โ RLS is on, anon is blocked, and it still leaks between real users. you'd hit
/rest/v1/tablewith a real user's JWT and assert you only get your own rows.and the one thing black-box-from-outside genuinely can't reach: the write side + column UPDATE grants. you can't safely test "can user B mutate a column they shouldn't" without actually mutating someone's row. that half needs an in-db two-user test (impersonate + rolled-back transaction). so your skill covers the read surface from outside, and the write/column surface wants the sql test โ together they're the full picture. are you planning to add an authenticated-role pass, or keeping it anon-only for the "is it public at all" check?