Menu

I let an AI agent audit my Supabase security — it gave a clean bill of health to a wide-open database
📰

I let an AI agent audit my Supabase security — it gave a clean bill of health to a wide-open database

DEV Community: postgres·Jorge Tavora·about 8 hours ago
#Tu3TtvjN
#devtopostgresql#devto#dev#agent#role
Reading 0:00
15s threshold

Last week I asked an AI coding agent to audit the RLS setup on one of my Supabase projects. It connected, ran its checks, and came back confident: everything secure, no issues found.

I ran my own checks after. Ten tables with RLS off. The main table readable, writable, and deletable by anyone holding the publishable key.

The agent wasn't lazy. It was blind — and the reason matters if you let AI anywhere near your database.

The trap

The agent queried information_schema.role_table_grants to see which roles could touch which tables. Zero rows came back. It concluded: no grants anywhere, nothing exposed.

Here's the problem: that view only shows what the current role is allowed to see. The agent was connected through a read-only role, so it got zero rows — the exact same zero rows it would get on a perfectly locked-down database. The query that was supposed to prove "nothing is exposed" returns the same answer whether the database is secure or wide open.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.