Audit Supabase security with AI

Checks your Supabase project for tables without RLS, always-true policies, security-definer functions, public storage buckets and advisor warnings, then ranks the fixes with the exact SQL for each.

Asks before writingUses 7 Supabase toolsWorks in RevampKey, Claude Code, Codex and Cursor

Use in RevampKey

Get RevampKey to connect Supabase

RevampKey is a free desktop app for Mac, Windows and Linux. Install it, sign in, and Supabase is one click away with its skills already attached.

Download RevampKey

Not now? Use the skills in your current tool

curl -fsSL --create-dirs -o .claude/skills/supabase-security-audit/SKILL.md https://revampkey.com/marketplace/supabase/skills/security-audit/SKILL.md
Other agents
Other agents

When to use it

  • Before launching to real users
  • After a scare about leaked data
  • Regular security reviews

What it looks like

You

Is our Supabase project safe to launch?

get_advisorslist_tablesexecute_sqllist_extensions+3 more
Agent

2 critical issues: webhook_events has no RLS and is readable through the API, and the "avatars" bucket is public with no size limit. 3 high: profiles uses (true) for UPDATE, plus 2 security-definer functions in public. 6 performance warnings (unindexed foreign keys). Fix SQL for each is below.

The SKILL.md file

View raw
name: supabase-security-audit

Audit a Supabase project's security and performance by checking RLS coverage and policies, exposed schemas, risky functions, extensions, storage buckets and Supabase advisors, then prioritising the fixes. Use when the user asks if their Supabase project is secure, wants a security review before launch, or asks about RLS gaps.

Read-only. Every execute_sql call here is a SELECT. Fixes are proposed, and are applied only after the user approves each one.

Checks

  1. Run get_advisors for both security and performance, and take its findings as the backbone of the report, with their remediation links.
  2. RLS: from list_tables, list tables in exposed schemas without RLS. With a read-only execute_sql on pg_policies, flag policies that are always true, such as using (true) for anon or authenticated on sensitive tables, and tables that have RLS on but no policies.
  3. Functions: find security definer functions in exposed schemas, which bypass RLS, with a read-only query on pg_proc.
  4. Extensions: list_extensions, and flag extensions installed in the public schema.
  5. Storage: list_storage_buckets and get_storage_config. Flag public buckets that hold user files and missing size or type limits.
  6. Keys: check that the app only uses the publishable or anon key, from get_publishable_keys, in client code when the repo is open.

Report

A prioritised list: critical (data readable or writable by anyone), high, medium and low. Each item gives the finding, evidence and the exact fix SQL. Offer to apply the fixes through the schema-change flow, one approved migration at a time.

Supabase tools it uses

  • get_advisors
  • list_tables
  • execute_sqlAsks first
  • list_extensions
  • list_storage_buckets
  • get_storage_config
  • get_publishable_keys

Tool list from supabase-community/supabase-mcp source.

FAQ

Does it change anything?

No. The audit is read-only; fixes are separate, approved migrations.

What are Supabase advisors?

Supabase's built-in security and performance linter. The audit starts from its findings and adds RLS, function and storage checks.