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.
npx agentmods add rules/coldtatooine/vuln-skill-pack/supabase-securitygit clone --depth 1 https://github.com/coldtatooine/vuln-skill-packWrote 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.
[](https://agentmods.dev/rules/coldtatooine/vuln-skill-pack/supabase-security)<a href="https://agentmods.dev/rules/coldtatooine/vuln-skill-pack/supabase-security"><img src="https://agentmods.dev/badge/rules/coldtatooine/vuln-skill-pack/supabase-security.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00588 |
| Opus 5 | $0.00000 | $0.00294 |
| Sonnet 5 | $0.00000 | $0.00118 |
| Haiku 4.5 | $0.00000 | $0.00059 |
Grade A, and why
supabase-security 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 32 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Supabase Security Footguns
The Supabase client runs in the browser and talks to the database directly, so RLS is the security boundary — not your application code.
1. Row Level Security (RLS) — the whole ballgame
- RLS off = the table is fully readable/writable by anyone with the anon key (which ships to the browser). Every API-exposed table MUST have RLS enabled.
- Permissive policy is the real risk. Common broken policy:
USING (true), or one that checks authentication (auth.role() = 'authenticated') but not ownership → any logged-in user reads every row (IDOR at the DB layer). - Correct ownership:
USING (auth.uid() = user_id). Verify bothUSING(read) andWITH CHECK(insert/update) — a missingWITH CHECKlets a user write rows they can't read. - Check policies for all operations: SELECT, INSERT, UPDATE, DELETE. A table with only a SELECT policy may still be freely deleted.
2. The service_role key
service_rolebypasses RLS entirely — a full-access admin key. Server-side only. Never in client code, never under a public env prefix, never in the browser bundle. Exposure = Critical, rotate immediately.- Use
anonkey in the browser;service_roleonly in trusted server contexts.
3. Trusting client-set columns
- The client can set any column not blocked by a policy.
role,is_admin,credits,tenant_id,pricemust be protected byWITH CHECKor set server-side. - Privilege escalation: user updates their own
roletoadminbecause the UPDATE policy only checksauth.uid() = user_id.
4. Storage buckets
- Public buckets serve every object to anyone with the URL. Buckets holding private files must be private with storage RLS policies (separate from table RLS — check explicitly).
5. Auth & other
- Open signup + auto-confirm can let attackers create accounts freely.
security definerfunctions / RPC run with the definer's privileges — audit them; they can bypass RLS by design.- Keep the project JWT secret private — leaking it lets an attacker forge any user's token.
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.
- 4d ago First seen · 32 lines · 0 tokens per session scan A 2dac734bbdc9
supabase-security is a cursor rule published in the GitHub repository coldtatooine/vuln-skill-pack (2 stars, last pushed 9d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 588 tokens. 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-08-31.
Other cursor rules, from other repositories
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
as-contract-cast-smell
// ❌ WRONG — bypasses the family ContractSerializer seam const contract = JSON.parse(raw) as Contract; const contract = JSON.parse(raw) as Contract .
no-backward-compatibility
Do not add backward-compatibility shims or migration scaffolding.
aws-rds-best-practices
AWS RDS PostgreSQL best practices - database configuration, connection management, authentication, backup, and performance optimization standards.
database
Database rules — apply when working with database schemas, queries, migrations, or ORM models.
database
Cursor rule "database" from ItamarZand88/awesome-agent-conventions, covering database best practices, prisma setup, prisma models, prisma queries and supabase setup.