audit-supabase

audit-supabase is a command for Claude Code from ayalaphiscan/web-security-guard. It costs 77 tokens per session (1,252 once invoked), scanned A, original, MIT.

A security and privacy audit for a Supabase project, a hosted database and login service. It checks table access rules, permissions, functions, file storage, authentication, and keys, including tests with different user accounts.

In plain words
What is it for?
Use it to inventory exposed database and API features, test access as anonymous and logged-in users, and produce a report with evidence and safe results.
Why use it?
It helps find cases where users can read or change data they should not access without altering real production data or exposing secrets.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the web-security-guard plugin — 15 skills, 4 commands shipped together

Good fit Use it to inventory exposed database and API features, test access as anonymous and logged-in users, and produce a report with evidence and safe results.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ayalaphiscan/web-security-guard/audit-supabase
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/ayalaphiscan/web-security-guard

Made for: Claude Code.

Or install web-security-guard, the plugin that ships this one along with the rest of its 15 skills, 4 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for audit-supabase

README.md
[![agentmods](https://agentmods.dev/badge/commands/ayalaphiscan/web-security-guard/audit-supabase/github.svg)](https://agentmods.dev/commands/ayalaphiscan/web-security-guard/audit-supabase)
Your own site
<a href="https://agentmods.dev/commands/ayalaphiscan/web-security-guard/audit-supabase"><img src="https://agentmods.dev/badge/commands/ayalaphiscan/web-security-guard/audit-supabase/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for audit-supabase

Your own site · 80×15
<a href="https://agentmods.dev/commands/ayalaphiscan/web-security-guard/audit-supabase"><img src="https://agentmods.dev/badge/commands/ayalaphiscan/web-security-guard/audit-supabase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,252 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00077 $0.01252
Opus 5.5 $0.00031 $0.00501
Sonnet 5.5 $0.00015 $0.00250
Haiku 4.5 $0.00008 $0.00125

Measured 1mo ago against content hash 4f9680598b6d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

audit-supabase scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/audit-supabase.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Esegui un audit di sicurezza del progetto Supabase collegato al progetto della cartella di lavoro. Se non c'è una cartella connessa, chiedila con request_cowork_directory (in Claude Code: lavora nella cartella corrente o chiedi il percorso). Usa le skill supabase-sicuro, api-sicura e privacy-posizione. Rispondi nella lingua dell'utente.

Regole

  • In produzione si fanno solo letture: query sui cataloghi, oppure prove dentro un blocco che finisce sempre con raise exception 'DRY RUN OK', così ogni modifica si annulla.
  • Non modificare dati reali.
  • Non stampare chiavi o segreti.
  • Nelle prove in produzione restituisci solo conteggi o sì/no, mai il contenuto delle righe: i dati delle persone (messaggi, posizioni, dati dell'art. 9) non devono finire nel report. Impersona account di prova dedicati, non persone reali.
  • Prima di provare scritture, controlla che nessun trigger chiami l'esterno (http, pg_net, dblink): il rollback non annulla una richiesta già partita né l'avanzamento delle sequenze.
  • Se c'è un Postgres locale, le prove che scrivono si fanno lì, ripetendo le migrazioni della repository.

Inventario

  1. Tabelle e viste esposte (public e altri schemi esposti all'API), con RLS sì/no e le policy (pg_policies).
  2. Permessi di anon e authenticated su ogni tabella, anche per colonna.
  3. Funzioni chiamabili (has_function_privilege) con security definer/invoker e search_path.
  4. Bucket di storage (pubblici o no, tipi e dimensioni ammessi) e policy di storage.objects.
  5. Impostazioni di Auth visibili (/auth/v1/settings) e quelle da controllare nella dashboard.
  6. Chiavi presenti nel frontend: devono essere solo publishable/anon.
  7. Security Advisor e Performance Advisor.

Prove, ognuna in due direzioni (chi deve riesce, chi non deve viene fermato):

  • lettura di righe altrui: profili privati, messaggi, notifiche, richieste, posizioni;
  • scrittura a nome di altri: insert e update con il proprietario cambiato;
  • colonne privilegiate: verificato, piano, ruolo, contatori, stato;
  • RPC con l'id di un altro utente;
  • cosa vede anon, cioè solo con la chiave pubblica;
  • storage: sovrascrivere o cancellare file altrui, caricare HTML o SVG in un bucket pubblico;
  • posizioni: esatte o arrotondate nel database, oracoli di distanza;
  • enumerazione: email o nickname esistenti, elenchi completi di utenti.

Report: salvalo come supabase-audit.md negli outputs e presentalo con present_files (in Claude Code: scrivilo nella cartella del progetto). Deve contenere:

  • un riepilogo per gravità (Critica, Alta, Media, Bassa);
  • per ogni problema: l'oggetto SQL o il file, la prova fatta e il risultato, perché è pericoloso in parole semplici, e la correzione come migrazione SQL pronta, con grant espliciti e RLS;
  • la lista di ciò che è stato controllato e va bene.

Alla fine chiedi se applicare le correzioni. Se sì, scrivi le migrazioni nella repository, provale prima in locale o a vuoto, poi applicale e ricontrolla gli advisor.


English: audit the Supabase project linked to the working folder's project (ask for the folder with request_cowork_directory if missing), using the supabase-sicuro, api-sicura and privacy-posizione skills; reply in the user's language.

Rules: production is read-only, apart from test blocks that always end with raise exception 'DRY RUN OK'. Never modify real data or print keys. Production tests return only counts or booleans, never row contents, and impersonate dedicated test accounts; first check that no trigger calls out (http, pg_net, dblink), which a rollback cannot undo. Run write tests on a local Postgres replaying the repo's migrations when one is available.

Inventory: exposed tables and views with their RLS and policies; anon/authenticated grants, including per column; callable functions with definer/invoker and search_path; storage buckets and policies; visible Auth settings and the ones to check in the dashboard; keys in the front-end; the advisors.

Read the full file on GitHub · 52 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 52 lines · 77 tokens per session scan A 4f9680598b6d

Subscribe to this mod's changes

audit-supabase is a command published in the GitHub repository ayalaphiscan/web-security-guard (4 stars, last pushed 1mo ago), licensed MIT. It adds 77 tokens to every session and 1,252 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-24.

Related

audit-supabase compared with commands from other repositories

audit-supabase next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
audit-supabaseayalaphiscan/web-security-guardCommand41mo agoMITA77Claude Code
psql-queryoliver-kriska/claude-elixir-phoenixCommand5803d agoMITA16Claude Code
symfony-migrationsdev-toolings/superpowers-symfonyCommand23723d agoMITA14Claude Code
database-setupimsaif/design-with-claudeCommand11yesterdayMITA36Claude Code
notebook-queryMarcosNahuel/antigravity-plugin-ccCommand341mo agoMITA74Claude Code
data-flow-analysissigistry/marketplaceCommand36d agoMITA11Claude Code
review-data-modelhollandkevint/data-product-operatorCommand5yesterdayMITA17Claude Code