vibe-audit-mcp
by adamblansett
README.md

# vibe-audit
**Zero-dependency CLI and MCP server that audits Next.js, Vite, Supabase, and Stripe repos for RLS leaks, exposed secrets, unverified webhooks, and production blockers in `< 2` seconds.**
Built for **Lovable**, **Cursor**, **Bolt.new**, **Replit**, and **v0** codebases before you launch or connect real customer billing.
---
## Run in 3 Seconds (Zero Install, Zero API Keys)
```bash
npx github:adamblansett/vibe-audit
```
Or audit a specific directory in JSON / Markdown:
```bash
npx github:adamblansett/vibe-audit ./my-app --markdown
npx github:adamblansett/vibe-audit ./my-app --json --fail-on high
```
### Example Terminal Scorecard
```text
vibe-audit v1.0.0 • 42 files scanned
Score: 54/100 (F) — HIGH RISK — HOLD DEPLOY
Findings: 3 critical, 2 high, 2 medium
[CRITICAL] SUPA-001 supabase/migrations/001_init.sql:4
Table 'public.invoices' created without ENABLE ROW LEVEL SECURITY.
Fix: Run `ALTER TABLE public.<table> ENABLE ROW LEVEL SECURITY;` immediately after `CREATE TABLE`...
[CRITICAL] SUPA-004 src/lib/supabase.ts:3
Supabase service_role key referenced in client-exposed variable or bundle.
Fix: Never reference `SUPABASE_SERVICE_ROLE_KEY` under `NEXT_PUBLIC_`, `VITE_`, or browser files...
[CRITICAL] PAY-001 src/app/api/stripe/webhook/route.ts:8
Stripe webhook logic detected without `stripe.webhooks.constructEvent()` signature verification.
```
---
## Use as an MCP Server Inside Claude Code, Cursor, or Codex
Zero runtime dependencies means your coding agent starts it cleanly over `stdio`:
```json
{
"mcpServers": {
"vibe-audit": {
"command": "npx",
"args": ["-y", "--package=github:adamblansett/vibe-audit", "vibe-audit-mcp"]
}
}
}
```
### Exposed MCP Tools
| Tool | Description |
| :--- | :--- |
| **`audit_repository`** | Scans a local directory across all 18 production checks and returns a weighted scorecard (`0–100`), exact `filePath:line` evidence, and copy-paste fixes |
| **`audit_supabase_sql`** | Checks raw SQL schemas/migrations for missing `ENABLE ROW LEVEL SECURITY`, `USING (true)` policies, and missing `WITH CHECK` clauses |
| **`get_fix_recipe`** | Returns exact step-by-step remediation guidance for any rule ID (`SUPA-001`..`OPS-005`) |
---
## Checks (18 Deterministic Rules)
| Category | Rule IDs | What It Catches |
| :--- | :--- | :--- |
| **Supabase & Postgres** | `SUPA-001` – `SUPA-004` | Tables without `ENABLE ROW LEVEL SECURITY`, `USING (true)` policies, `INSERT`/`UPDATE` missing `WITH CHECK`, client-exposed `SERVICE_ROLE_KEY` |
| **Security & Secrets** | `SEC-001` – `SEC-005` | Live API keys (`sk_live_`, `sk-ant-`, `sk-proj-`, `ghp_`, `AKIA`), uncommitted `.env` secrets, CORS `*` + `credentials: true`, unsanitized `dangerouslySetInnerHTML`, shell-interpolated `exec()` |
| **Stripe & Payments** | `PAY-001` – `PAY-002` | Webhooks missing `stripe.webhooks.constructEvent()`, `/success` redirect DB writes without webhook verification |
| **Reliability & Ops** | `REL-001` – `OPS-005` | Empty `catch {}` blocks, backend `fetch()` missing timeouts, Next.js `ignoreBuildErrors: true`, missing `strict: true`, missing tests/CI/`.env.example` |
---
## Companion Tools & Production Rescue
- **Agent Guardrail Skills:** [`adamblansett/production-skills`](https://github.com/adamblansett/production-skills) (`npx skills add adamblansett/production-skills`)
- **App Rescue Cost & Risk Estimator:** [adamblansett.com/tools/app-rescue-estimator](https://adamblansett.com/tools/app-rescue-estimator/)
- **Need a senior engineer to stabilize your MVP?** [48-Hour Codebase Audit ($2,500)](https://adamblansett.com/audit/) · [AI-Built App Rescue](https://adamblansett.com/rescue/)
MIT © 2026 [Adam Blansett](https://adamblansett.com)