Skip to content
Back to skills

Supabase Review

ASecurity

Supabase security audit: checks RLS on all tables, correct auth.uid(), indexes on FK columns, no select('*'), secured Edge Functions. Sources: NIST SP 800-63B, OWASP.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 14, 2026
developmentgosqldatabasesecurityperformance

Works with

  • cli

Security analysis

A100/100

Scanned November 14, 2026

npx -y skills add samsam007b/claude-code-standards-kit --skill supabase-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Supabase Review?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Supabase Review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/samsam007b-supabase-review/badge)](https://www.skillsdirectory.com/skills/samsam007b-supabase-review)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: supabase-review
description: Supabase security audit: checks RLS on all tables, correct auth.uid(), indexes on FK columns, no select('*'), secured Edge Functions. Sources: NIST SP 800-63B, OWASP.
tags: [supabase, security, rls, postgresql, auth, database]
model: sonnet
---

# /supabase-review: Supabase Security & Quality Audit

## When to use

- Before every PR touching the DB or migrations
- Full audit of the Supabase schema
- Review of a new table or RPC
- Verification of auth and RLS for a feature

## Absolute rules (blocking)

### RLS
- [ ] **Every table has RLS enabled**: `ALTER TABLE x ENABLE ROW LEVEL SECURITY`
- [ ] **`(select auth.uid())`** in USING/WITH CHECK, NEVER bare `auth.uid()` (-40% performance on large queries)
- [ ] Separate policy for SELECT / INSERT / UPDATE / DELETE
- [ ] Publicly readable tables: explicit `USING (true)` policy + never public writes

### Auth (NIST SP 800-63B)
- [ ] Sessions invalidated server-side on logout (not just client-side)
- [ ] MFA available for sensitive actions
- [ ] JWT tokens not persisted in localStorage (HttpOnly cookie preferred)
- [ ] Refresh token rotation enabled

### SQL migrations
- [ ] Idempotent: `IF NOT EXISTS` everywhere
- [ ] Rollback possible (no `DROP` without an alternative `CREATE`)
- [ ] RPCs with `p_` prefix on all parameters
- [ ] Financial RPCs: `p_idempotency_key UUID DEFAULT NULL` mandatory
- [ ] Indexes on all FK columns (`CREATE INDEX IF NOT EXISTS`)

### App-side queries
- [ ] Never `select('*')`: use explicit field selectors
- [ ] No `supabase.from()` in UI components: go through services
- [ ] `createServerSupabaseClient()` in each server method (not in the constructor)

### Edge Functions
- [ ] Auth verified on the first line via `supabase.auth.getUser()`
- [ ] Rate limiting on public functions
- [ ] Secrets in Supabase env vars, never hardcoded

## Output format

```
## Supabase Review: [scope]

### 🔴 Blocking (fix before merge)
- [problem] → [fix]

### 🟡 Important (fix this week)
- [problem] → [fix]

### 🟢 Suggestions
- [improvement]

### Corrective SQL
[migrations/RPCs to apply]
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.