You asked an AI tool to build your app and it works. The login works, the data shows up, the buttons do what they should. What you cannot see is whether the database behind it is locked down or standing open.

This happens more than people admit. An AI builder writes the app, wires up Supabase, and ships it with row level security off on a table, or with a policy that lets everyone through. The app looks finished. The database is not.

Eight queries

The check is eight read-only SQL queries you paste into the Supabase SQL Editor. They list every table with RLS off, every policy that lets everyone through, every SELECT grant to anonymous visitors, and every SECURITY DEFINER function that skips RLS entirely. Read-only means the audit cannot change or leak anything itself. It only reads the catalogue.

I ran all eight against a local Postgres 16 database with a dummy schema built to hold the common mistakes: a table with RLS off, a table with RLS on and no policy at all, a policy that lets anon through with USING (true), and a SECURITY DEFINER function that reads a secrets table. The audit caught every one of them. The run also caught a real bug in my first draft of the queries, which is fixed in the shipped file.

The MCP half

The second half is a small Node script. You point it at an MCP server and it lists the server's tools and saves a baseline. Run it again later and it reports what changed: tools added, inputs widened, descriptions rewritten. I ran it against the official filesystem MCP server, 16 tools, and a test server built to change. It caught the added tool and the widened input both times.

One thing the kit is honest about: the RLS audit was not run on a Supabase cloud project, because no login was available. The guide says so in three places. The queries are standard Postgres and run unchanged in the Supabase SQL Editor, but the cloud run itself is yours to do, and the guide tells you exactly how.

The one-page pre-flight checklist is free: MCP pre-flight checklist. The full kit, guide plus SQL plus script plus checklist, is $29: AI-App Security Audit Kit.

The full numbers behind this one are in the AI-App Security Audit Kit. Everything I write here stays free, that part doesn't change. — Salam

More from AheadKit: programming books, packs and AI tools. Each page lists exactly what's inside before you pay.