8 min · published Jul 10, 2026
Supabase and RLS security checklist
A practical review of policies, keys and data isolation before publishing an app with Supabase.
By Leonardo Soledade · product and software consultant
RLS must be on and tested
Row Level Security is not just a setting checked in the dashboard. Every table exposed through the API needs policies that match product roles. The important test is trying to access another user’s data, not just confirming that a user can see their own.
Keys have different roles
The public key is meant for client use when RLS protects the data. The service role bypasses those policies and must never reach the browser. If it appeared in a bundle, Git history or public screenshot, treat it as compromised and rotate it.
- Search code and history for secrets
- Separate public and private variables
- Keep administrative operations on the server
- Revoke and replace exposed credentials
Authentication is not authorization
Knowing who is signed in does not prove they can perform every operation. Check resource ownership, admin roles and state changes in the database or server too, not only by hiding interface buttons.
Functions and Storage are part of the review
Buckets, Edge Functions and webhooks can open paths that table policies do not cover. Validate file type and size, authenticate calls and log sensitive operations.