Blog · ← All posts
Vibe Code Security Cheat Sheet: The Checks, the Score and the Fix Loop
Published: November 27, 2026 · Reviewed: November 27, 2026 · 6 min read
Start free: run your first audit on the Vibe-Code Audit home page — paste code or enter a URL, no install, no credit card. See pricing for Pro.
The short version
AI coding assistants ship fast, and they ship the mistakes too: a leaked Stripe key in a comment, a SQL query built by string interpolation, user data poured into innerHTML, an auth check commented out during debugging and never restored. A vibe code audit is a security review built for that output. This cheat sheet is the method on one page: what gets checked in code and on a live site, how the 0–100 score is calculated, the 16 advanced pattern families Pro adds, and the workflow that turns a finding into a fix. Everything below is drawn from the scanner itself (version 2.5.0), not from generic advice.
What gets checked in pasted code
- Exposed secrets. A pattern set covering the keys AI builders leak most: the first 15 secret patterns run on the free tier, the full set on Pro. Each secret finding carries a blast-radius note and a rotation runbook.
- SQL injection. Queries built with f-strings, format calls or plain concatenation — the shapes models produce when a parameterised query was one import away.
- Cross-site scripting. innerHTML assignment, dangerouslySetInnerHTML, and document.write: user data reaching the page without escaping.
- Eval usage. eval() on anything an attacker can influence is remote code execution waiting for its input — including LLM output fed straight into eval.
- Hardcoded credentials in code. Passwords and keys written as literals, separate from the secret-pattern sweep because they often wear no recognisable prefix.
- Disabled auth checks. The commented-out guard: an authentication or authorisation check neutralised in a comment and shipped.
- CORS wide open. A wildcard cross-origin policy on an app that also carries credentials.
- Debug mode enabled. Debug flags left on in code headed for production.
- Missing webhook signature verification. A webhook handler that trusts the body without checking the signature — anyone can POST a payment that never happened.
- SSTI. render_template_string and its cousins: user input compiled as a template.
On a live site the audit adds security-header checks, probes for exposed .env and .git paths, and a same-domain broken-link crawl. And wherever the code names dependencies, the SlopSquat Shield verifies them against the live npm and PyPI registries, catching the hallucinated, newborn and typosquatted packages that models invent with complete confidence.
The score, exactly
Score = 100 minus the sum of finding weights, floored at 0. Weights: CRITICAL 25 · HIGH 10 · MEDIUM 4 · LOW 1. Grades: A — clean ≥ 90 · B — minor issues ≥ 75 · C — needs attention ≥ 50 · D — significant risk ≥ 25 · F — critical risk below 25. The weights are the triage: one CRITICAL costs as much as twenty-five LOWs, so fix order is severity order, and a report's Top Risks ranking says where to start.
The 16 advanced pattern families (Pro)
JWT key confusion (jku/x5u/kid/alg-confusion) · deserialization gadget chains · second-order injection · DOM clobbering · advanced SSTI engines · GraphQL abuse · cache poisoning and deception · request smuggling · build-artifact secret leaks · TOCTOU races · LLM prompt-injection sinks · insecure LLM output handling · RAG poisoning · tool-call injection · advanced prototype pollution · unguarded image-generation calls (image-gen API calls with no moderation hook in the calling scope). These are the families basic pattern matching walks past: each one is a way AI-generated code fails that only shows up when you model how the pieces interact.
The fix loop
- Scan before deploy. Paste the code or point the audit at the live site. Minutes, not a sprint ticket.
- Fix in severity order. CRITICAL first. Every finding arrives with a plain-language explanation and fix guidance.
- Use the fix prompt. Each finding ships a copy-paste prompt written for your AI builder, so the tool that wrote the flaw gets precise instructions to remove it.
- Re-scan. A finding absent from a later scan is listed as no longer detected on rescan — which is evidence, honestly labelled, not proof of a fix. Read the diff yourself on anything CRITICAL.
One limit, stated on the product itself: the scanner checks common patterns and is not a penetration test. It is the gate AI-generated code should pass before deploy, and the checklist at launch audit turns this page into a pre-ship routine.
Frequently asked questions
What is a vibe code security cheat sheet?
It is the whole Vibe-Code Audit method on one page: what the scanner checks in pasted code and on a live site, the severity weights behind the 0–100 score, the 16 advanced pattern families, and the fix workflow every finding feeds. It is a reference for running an audit or reading a report, drawn from scanner version 2.5.0.
What does Vibe-Code Audit check?
In pasted code: exposed secrets, SQL injection shapes, cross-site scripting patterns (innerHTML, dangerouslySetInnerHTML, document.write), eval usage, hardcoded credentials, commented-out auth checks, wide-open CORS, debug mode, missing webhook signature verification and SSTI. On a live site: security headers, exposed .env and .git paths, and a same-domain broken-link crawl. It also verifies dependencies against the live npm and PyPI registries to catch hallucinated, newborn or typosquatted packages.
How is the 0–100 score calculated?
The score starts at 100 and subtracts a weight per finding: CRITICAL 25, HIGH 10, MEDIUM 4, LOW 1, floored at 0. The grade follows: A (clean) at 90 or above, B (minor issues) at 75, C (needs attention) at 50, D (significant risk) at 25, and F (critical risk) below 25.
What are the 16 advanced pattern families?
The Pro Advanced Patterns engine checks: JWT key confusion, deserialization gadget chains, second-order injection, DOM clobbering, advanced SSTI engines, GraphQL abuse, cache poisoning and deception, request smuggling, build-artifact secret leaks, TOCTOU races, LLM prompt-injection sinks, insecure LLM output handling, RAG poisoning, tool-call injection, advanced prototype pollution, and unguarded image-generation calls with no moderation hook.
Is a vibe code audit a penetration test?
No. Vibe-Code Audit scans common patterns in the code and surfaces you give it; it does not attack a live system, chain exploits, or prove reachability the way a penetration test does. A clean score means none of the checked patterns were found in what was scanned — the right pre-deploy gate for AI-generated code, not a substitute for a pentest on a high-value target.