Abbi Labs

2026-11-20 · Daily security tips

Is a database view handing out rows your RLS hides?

You lock a table down with RLS, then add a view to make a query simpler. By default, Postgres runs a view with the rights of whoever created it. On Supabase that's usually the postgres role, which skips RLS. If the view sits in the public schema, anyone with your anon key can read every row through it.

Check: open the Security Advisor in your Supabase dashboard and look for a "Security Definer View" warning. Or run select table_name from information_schema.views where table_schema = 'public'; in the SQL Editor.

Fix: on Postgres 15 or newer, run alter view your_view set (security_invoker = true); so the view follows the table's policies. On older versions, revoke select on the view from anon and authenticated, or move it to a schema the API doesn't expose.

Is your live site exposing something like this?

The free quick check looks at what your site already serves publicly: secret keys in your JavaScript, open /.env files and /.git folders, Supabase tables readable with your public key, and missing security headers. No sign-up needed.

No app handy?

No sign-up. Read-only public-resource and protocol metadata checks. No model prompts or tool execution. Scan only sites you own or are allowed to test.

Run on every deploy or use from Cursor / Claude Code via MCP →