Is Your AI-Generated App Secure? A 5-Minute Check for Vibe Coders
You built an app in a weekend with Cursor, Lovable, or v0. Here's what AI coding tools quietly get wrong about security — and how to find and fix it in 5 minutes, free.
· 6 min read
You described an app, an AI wrote it, and a few hours later it was live. That's the magic of vibe coding — and it's real. But there's a catch nobody mentions in the demo videos: code that looks right and runs fine can still be wide open to attackers.
This isn't fearmongering. When Veracode analyzed AI-generated code in 2025, it found about 45% of samples failed security tests by introducing an OWASP Top 10 vulnerability, and that models failed to defend against cross-site scripting in 86% of cases. The AI optimizes for "does it work," not "is it safe."
The 5-minute version
1. Secrets end up somewhere public
The most common — and most expensive — mistake. AI tools happily wire up a Stripe, OpenAI, or Supabase key and, without meaning to, put it somewhere the whole internet can read:
- A key prefixed with
NEXT_PUBLIC_in a Next.js app gets bundled into the JavaScript your browser downloads — anyone can open DevTools and copy it. - A Supabase service-role key (the one that bypasses all your row-level security) pasted into client code, letting a stranger read and write your entire database.
- An API key committed to a public GitHub repo — bots scrape new commits within seconds.
If a key like sk_live_… (Stripe), sk-… (OpenAI), or sk-ant-… (Anthropic) sits anywhere a visitor can reach it, treat it as already leaked: rotate it now, then remove it from the code.
2. The "security" isn't actually enforced
AI-generated apps love to look secure without being secure:
- Supabase tables created with Row-Level Security turned off — every row is public, even though the UI only shows "your" data.
- A Next.js
middleware.tsused as the auth gate. Middleware is for redirects, not a security boundary — data fetched in a Server Component or route handler still needs its own check.
3. Classic vulnerabilities, copied from training data
Because models learn from millions of imperfect examples, they reproduce the classics:
dangerouslySetInnerHTMLorinnerHTML =with user input → cross-site scripting (XSS).eval()oros.system()on user input → code or command injection.- Missing security headers, permissive CORS, and exposed
.envfiles.
How to check yours in 5 minutes
You don't need to become a security engineer. You need two scans:
- Your live URL — catches what's exposed on the running site: leaked keys in the bundle, missing headers, misconfigurations, XSS.
- Your GitHub repo — catches secrets in the code and history, unsafe patterns, and vulnerable dependencies.
Scan your app for these issues — free
Paste a URL or GitHub repo. Results in about a minute. No signup, no install.
Run a free scan →Trust runs both in one pass (10,000+ live-site checks, 22 secret types, plus code and dependency analysis) and gives you plain-language fixes. And if you code inside Cursor or Claude Code, you can run it without leaving your editor via the MCP integration.
Shipping fast is a superpower. Spending five minutes to make sure you didn't also ship your Stripe key is just good sense.