AI coding agents (Claude Code, Cursor, Windsurf) are incredible at getting a full-stack app working on localhost:3000 in an afternoon.

Wait until you look at what actually gets committed to production.

Today I ran a static security audit across 8 recently updated public Next.js + Supabase + OpenAI repositories on GitHub.

### The Results:

  • 6 out of 8 repositories (75%) had exploitable security findings.
  • 5 out of 8 scored a Grade F.
  • 288 total security issues across just 8 projects.

### The Top 3 AI Coding Agent Blind Spots:

1. Supabase Tables With Zero Row Level Security (VSB-DB-001 & VSB-DB-002)

When an AI scaffolds your database migrations, it writes CREATE TABLE statements—and consistently forgets ALTER TABLE ... ENABLE ROW LEVEL SECURITY.
Even worse: when a developer hits a permission error and tells the agent "fix it", the agent often enables RLS and writes CREATE POLICY "allow_all" ON users USING (true)—making the error disappear while leaving the entire table open to the public NEXT_PUBLIC_SUPABASE_ANON_KEY in Chrome DevTools.

2. Unauthenticated Next.js App Router Mutations (VSB-AUTH-001 & VSB-AUTH-004)

Agents routinely generate POST, PATCH, and DELETE handlers in app/api/.../route.ts that write directly to the database without verifying a session—or they trust userId directly from await req.json() instead of the server session (classic IDOR).

3. Leaked Client Secrets & Unbounded AI Endpoints (VSB-CLIENT-001 & VSB-AI-001)

Prefixing server keys (SUPABASE_SERVICE_ROLE_KEY, OPENAI_API_KEY) with NEXT_PUBLIC_ or VITE_ to make client components work, and leaving LLM routes with no rate limit or max_tokens cap.

### How to Test Your Own Repo Locally in 3 Seconds
**
We open-sourced **VibeFoundry
—three 100% local, offline, MIT-licensed CLI tools, Agent Skills (SKILL.md), and MCP servers built to close the gap between "it works on localhost" and production-grade software:

1. Vibe-Shield v2.0 (85-Rule Security Scanner, Attack-Surface Mapper & MCP Skill Auditor)

 bash npx -y @vibefoundry/vibe-shield@latest scan . Check out my GitHub Repo: 

GitHub logo avivgerz-hue / vibe-shield

60-rule static security scanner, MCP server & skill poisoning auditor for AI-generated codebases (Claude Code, Codex, Cursor).

🛡️ vibe-shield

The security gate for AI-written code.

Your agent ships fast. It also ships NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_KEY, a DELETE route with no session check, and a CREATE TABLE with no Row Level Security — because it was optimising for "it works".

vibe-shield is a static security scanner built for that failure mode, plus an Agent Skill that makes Claude Code, Codex, Cursor and Windsurf audit before they say "done".

npm version npm downloads CI node license zero dependencies rules self-scan

npx -y @vibefoundry/vibe-shield scan

vibe-shield terminal preview


v2.0.0: eight defensive vectors

The v2 catalogue covers client exposure; auth and route protection; database/RLS; AI and web sinks; infrastructure; dependency hygiene; secrets and cryptography; and agent/MCP integrity. The new hardening checks include production source maps, insecure JWT settings, explicit and omitted cookie flags, locally absent security headers, container users, lifecycle scripts, lockfiles and weak cryptography. Run rules for the complete catalogue.

The scanner produces a heuristic attack-surface inventory of route methods, observed guard signals…