You built an app with an AI tool, clicked through the happy path, and now you're wondering if it's safe for real humans. The answer is no, not until you run a specific 12-point inspection. A new guide from DEV.to argues that vibe coding is fine for prototypes but breaks down when real data, money, or users enter the picture. The core issue isn't that AI is stupid; it's that models fill in unspoken assumptions with the most optimistic scenario, leaving critical security holes for anyone who isn't the developer.
The Assumption Gap
AI models write code based on what you asked for, not what you meant. If you ask for a page that displays an order, the model assumes whoever requests order 1002 owns order 1002. It cannot predict that a stranger will change a number in the URL. Veracode data indicates that AI-generated code introduces risky security flaws in 45% of tests, while the OWASP Top 10:2025 lists Broken Access Control as the number one threat. This checklist targets exactly those failure modes: secrets, access control, input validation, and dependency hygiene.
Secrets and Browser Leaks
The first two checks focus on secrets. A common failure is pasting API keys directly into code files, which then get committed to Git. The guide provides a Node script to scan your project for patterns like Stripe keys (sk_live_) or database URLs. Even worse is the NEXT_PUBLIC_ trap in Next.js. If you rename a server-side secret to NEXT_PUBLIC_STRIPE_SECRET_KEY to fix an undefined error, you inadvertently inline that secret into the JavaScript bundle sent to every browser. The fix is moving logic to server actions so the browser never sees the key.
The IDOR Problem
Broken access control, or Insecure Direct Object Reference (IDOR), is the most critical check. Generated code often authenticates the user but fails to authorize ownership. If Emily is signed in, she can often view Jamesβs order simply by changing the ID in the URL. The test involves creating two accounts, logging in as one, and attempting to fetch data belonging to the other. A secure endpoint returns a 404 (not found) rather than a 403 (forbidden) to avoid leaking the existence of other users' data. For Supabase users, this means ensuring Row Level Security (RLS) is enabled on every exposed table.
Input Validation and Abuse
Real users are not polite. They send wrong types, extra fields, and malformed JSON. The guide tests endpoints with a price of 1 cent, an unauthorized 'admin' role, and non-JSON strings. A common failure is the server crashing with a 500 error that leaks stack traces or database errors to the client. The solution is strict input validation at the door, returning a polite 400 error for bad data. The provided scripts use fetch and regex to detect if internal details like prisma or TypeError are leaking in the response body.
Key Takeaways
- AI code assumes happy paths; you must test for malicious or careless users.
- Never put secrets in browser bundles; use server-side routes for sensitive logic.
- Check for IDORs by verifying user A cannot access user B's data via URL manipulation.
- Rotate any secrets committed to Git history immediately; deleting the line is not enough.
- Use Node 20+ scripts to automate these 5-minute checks before every launch.
The Bottom Line
Vibe coding accelerates creation but delays security debt. Until you manually verify access controls and secret hygiene, your AI-generated app is just a pretty facade with unlocked doors.