The Vibe Coding Security Checklist: Ship Fast Without Getting Hacked
Vibe coding โ building apps primarily through AI assistants like Claude, ChatGPT, and Copilot โ has become the fastest way to go from idea to working product. Entire startups are being built in a weekend. Landing pages, APIs, payment flows, dashboards โ all generated in hours.
But here's the uncomfortable truth: the faster you build, the more security debt you accumulate. And unlike traditional code where bugs are usually logic errors, AI-generated code introduces a unique class of vulnerabilities that are invisible to the naked eye.
We've scanned thousands of vibe-coded apps at VibeGuard. This checklist distills the most common issues we find into an actionable pre-deploy review.
Before You Deploy: The Checklist
๐ 1. Secrets Audit
The #1 issue we see. AI assistants love to hardcode API keys as "examples" that never get replaced.
Search your entire codebase for: - API keys (strings starting with sk_, pk_, api_, key_) - Database connection strings with passwords - JWT secrets as string literals - AWS access keys (AKIA...)
# Quick grep for common secret patterns
grep -rn "sk_live\|sk_test\|api_key.*=.*['\"']" --include="*.ts" --include="*.tsx" --include="*.js" .Rule: If a string looks like a credential, it should come from process.env, not your source code.
๐ค 2. Hallucinated API Check
AI models generate method calls that don't exist. These compile fine (especially in JavaScript) but crash at runtime.
Common hallucinations: - fetch.get() โ fetch doesn't have HTTP method helpers - array.flatten() โ it's .flat() - string.format() โ that's Python, not JavaScript - promise.done() โ jQuery pattern, not native - Object.values().unique() โ .unique() doesn't exist - fs.readFileAsync() โ it's fs.promises.readFile()
Rule: If you didn't write the method call yourself, verify it exists in the MDN docs.
๐ 3. Input Sanitization
AI-generated backends almost never sanitize user input properly. Check every endpoint that: - Builds SQL queries (use parameterized queries, never template literals) - Renders user content in HTML (escape to prevent XSS) - Passes user input to eval(), Function(), or exec() (never do this) - Uses user input in file paths (path traversal attacks)
// โ AI loves to generate this
const query = `SELECT * FROM users WHERE id = ${req.params.id}`;
// โ
What you actually need
const query = 'SELECT * FROM users WHERE id = ?';
const result = await db.query(query, [req.params.id]);๐ 4. Authentication & Authorization
AI assistants often generate authentication that looks complete but has critical gaps: - Missing middleware: Routes that should require auth but don't - Client-side only checks: Auth verified in React but not on the API - JWT stored in localStorage: Vulnerable to XSS (use httpOnly cookies) - No rate limiting: Login endpoints without brute-force protection
Rule: Every API route that returns user-specific data must verify the session server-side.
๐บ 5. Debug Code Cleanup
AI-generated code is littered with console.log statements that can leak sensitive data in production:
// These are in your production code right now
console.log("User data:", userData); // Leaks PII
console.log("Token:", authToken); // Leaks credentials
console.log("Query result:", dbResult); // Leaks database schemaRule: Run a sweep for console.log, console.error, and debugger statements before deploying.
โ ๏ธ 6. Error Handling
The most overlooked issue in vibe-coded apps. AI generates the happy path beautifully but ignores failure modes:
// โ AI's favorite pattern: no error handling
const response = await fetch('/api/data');
const data = await response.json();
// โ
What production code needs
try {
const response = await fetch('/api/data');
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
const data = await response.json();
} catch (error) {
logger.error('Failed to fetch data', { error });
// Handle gracefully
}Rule: Every await should be in a try/catch. Every fetch should check response.ok.
๐งน 7. Dead Code & TODOs
AI assistants leave breadcrumbs everywhere: - // TODO: implement this โ features that were supposed to exist - Unused imports and variables - Commented-out code blocks - Functions that are defined but never called
These aren't security risks per se, but they signal incomplete implementation โ and incomplete implementations often have security holes in the gaps.
The 60-Second Version
If you only have one minute before deploying, do these three things:
1. Search for hardcoded strings that look like API keys or passwords 2. Check your API routes โ does every one that should require auth actually check it? 3. Run VibeGuard โ paste your code and get an instant AโF grade with exact issues
Automate It
Going through this checklist manually works, but it's tedious and you'll miss things under deadline pressure. That's exactly why we built VibeGuard โ it runs this entire checklist (and more) automatically in under 3 seconds.
โ [Scan your code free at vibeg.io](https://vibeg.io/scan) โ 3 free scans per month, no signup needed.
*Building something with AI? We'd love to hear what security issues you've encountered. Drop us feedback in the app โ every report helps us improve detection.*
Scan your code for these issues now
VibeGuard catches all the vulnerabilities described in this article โ automatically, in under 3 seconds.
Scan Your Code Free