Half these apps could have their entire DB exposed to public and nobody would know until it's too late. Recently an app leaked 13k users' data because of broken RLS.
So I built a CLI to test RLS policies before prod:
- Introspects your DB schema - Simulates different roles (anon, authenticated, custom JWT claims) - Tries CRUD operations on every RLS-enabled table - Wraps everything in transactions with ROLLBACK (no actual data changes) - Generates snapshots you can diff in CI
It's not a substitute for proper security reviews (attackers will always find crafty exploits). But it catches the obvious messups before they leak user data.
https://github.com/Rodrigotari1/supashield
What's your RLS testing workflow? What edge cases am I missing?
BandButcher•2h ago
Kudos
Edit: does this also allow checking for the storage (buckets) RLS as well or just the DB tables? Thx
rodrigotarca•1h ago