reference
Guides
In-depth, plain-language explainers on AI-generated code security — the vulnerability patterns LLMs repeat, supply-chain attacks, secret hygiene, and what scanners can and can't find. Written by the Vibe-Code Audit team.
7 Security Mistakes AI Coders Keep Making
AI code generators repeat the same flaws: SQL injection, XSS, hardcoded secrets, missing auth checks. Learn the patterns and how to catch them before you ship.
read the guide → 2026-10-11Supply-Chain Attacks in the AI-Coding Era
AI assistants hallucinate package names that attackers register. How slopsquatting, typosquatting and dependency confusion work—and how to defend your builds.
read the guide → 2026-10-11Secret Hygiene Before Release: Stop API Key Leaks
API keys leak via client-side code, git history, chat logs and AI prompts. This pre-release secret scan finds them before you ship — and shows how to rotate.
read the guide → 2026-10-11What Code Scanners Can't Find
Scanners catch known patterns fast, but logic bugs and novel attacks need human eyes. An honest guide to the limits of automated security scanning.
read the guide → 2026-11-14What Happens When Your .env File Is Publicly Exposed?
An exposed .env file hands attackers your database password, API keys and session secrets in one request. How the leak happens and the exact recovery order.
read the guide → 2026-11-14How an Exposed .git Folder Lets Attackers Download Your Source Code
When /.git is reachable, attackers reconstruct your entire repository — source, history and secrets buried in old commits. How it works and how to close it.
read the guide → 2026-11-14Which Security Headers Is Your Website Missing — and What Does Each One Actually Do?
Content-Security-Policy, HSTS, X-Frame-Options and Referrer-Policy in plain language: what attack each one blunts, and a safe order to add them.
read the guide → 2026-11-14Why Your Supabase Service Role Key Must Never Appear in Frontend Code
The Supabase service role key bypasses Row Level Security entirely. How to tell the two keys apart, test whether yours leaked, and recover safely.
read the guide → 2026-11-14What to Do in the First Hour After an OpenAI API Key Leaks From Your App
A leaked OpenAI key is spent by strangers within hours — on your bill. The first-hour playbook: revoke, replace, set hard limits, find the leak path.
read the guide → 2026-11-14Stripe Secret Key in Client-Side Code: How Bad Is It, Exactly?
Stripe's publishable key is meant for browsers; the secret key is your business in a string. How generated checkout code mixes them up, and the recovery.
read the guide → 2026-11-14How to Fix SQL Injection in AI-Generated Code (Not Just Detect It)
A remediation guide for the string-built query: converting f-string and concatenated SQL to parameterized queries, and proving the fix with the attack string.
read the guide → 2026-11-14NoSQL Injection: How a MongoDB Login Falls to a Single $ne Operator
Sending a $ne operator as a password is your login working as written. Why JSON body parsing turns request data into query operators, and the casting fix.
read the guide → 2026-11-14SSRF in AI-Generated Code: When Your App Fetches Any URL a User Gives It
Link previews, image importers and PDF fetchers that take a user URL are SSRF waiting to happen — including the cloud metadata endpoint. The rules that fix it.
read the guide → 2026-11-14Server-Side Template Injection in Flask Apps Built With AI
render_template_string with user input turns a greeting into remote code execution via Jinja2's object graph. How generated Flask code falls into SSTI.
read the guide → 2026-11-14Why pickle.loads and yaml.load Turn User Data Into Code Execution
Python pickle, unsafe YAML, PHP unserialize and Java readObject share one design flaw: crafted data runs code. Where generated code reaches for them.
read the guide → 2026-11-14JWT alg=none and Key Confusion: How Attackers Forge Any User's Token
Accepting 'none', or verifying RS256 tokens with an HMAC secret, turns your JWT library into a login-as-anyone machine. The pinned-algorithm fix.
read the guide → 2026-11-14How to Fix CORS Errors Without Opening Your API to Every Website
Access-Control-Allow-Origin: * silences the browser error by removing the protection. What credentialed CORS actually risks, and the allow-list pattern.
read the guide → 2026-11-14Debug Mode in Production: What One Stack Trace Hands an Attacker
DEBUG=True, debug consoles and verbose error pages leak paths, versions, environment values and sometimes a remote console. The pathways and the fix.
read the guide → 2026-11-14Why AI-Generated Login and API Endpoints Ship Without Rate Limits
Generated auth code almost never throttles attempts, so credential stuffing runs at machine speed. Where limits belong and what numbers to start with.
read the guide → 2026-11-14GraphQL Introspection and Batching: The Two Settings AI Starters Leave On
Introspection hands attackers your entire schema as a map; batching turns one request into a hundred operations. The production configuration that closes both.
read the guide → 2026-11-14Prototype Pollution in JavaScript: How One JSON Body Poisons Every Object
Merging user JSON with keys like __proto__ mutates Object.prototype itself, flipping defaults across the whole process. The key-blocking fix and a quick test.
read the guide → 2026-11-14Path Traversal: How a Download Endpoint Serves Files It Never Meant to Share
../ is three characters that turn a file-download feature into a read-anything primitive — source code, .env, /etc/passwd. The resolve-and-verify fix.
read the guide → 2026-11-14Command Injection: shell=True, os.system and child_process.exec in Generated Code
Any code path where user text reaches a shell is remote code execution with extra steps. The argument-array fix and the allow-list rule.
read the guide → 2026-11-14Mass Assignment: How Passing req.body to Your Model Lets Users Promote Themselves
User.create(req.body) applies every field the client sends — including isAdmin, role and balance. Why AI code loves the shortcut, and the allow-list fix.
read the guide → 2026-11-14Open Redirects: How Your Real Domain Becomes Someone Else's Phishing Link
A ?next= parameter that accepts any URL lets attackers send victims to your trusted domain, which forwards them to a phishing clone. The relative-path fix.
read the guide → 2026-11-14Prompt-Injection Sinks: The Exact Code Shapes That Let Text Become Instructions
Prompt injection is a code pattern before it is a model failure: user text and tool outputs concatenated into system prompts. The sink shapes and fixes.
read the guide → 2026-11-14When LLM Output Is Rendered as HTML: The Stored XSS Nobody Escaped
Chatbots that render model text with innerHTML hand the model a script-injection channel into every viewer's browser. The rendering rules that prevent it.
read the guide → 2026-11-14RAG Poisoning: How One Planted Document Rewrites Your Chatbot's Answers
Retrieval-augmented chatbots trust the documents they retrieve. An attacker who can add one document inherits the bot's voice. Ingestion controls that help.
read the guide → 2026-11-14Production Source Maps: You Are Probably Shipping Your Original Source Code
A .map file reconstructs your un-minified source — comments, variable names, internal URLs and occasionally secrets — for anyone who asks. How to check.
read the guide → 2026-11-14Secrets in Dockerfiles: Why ARG and ENV Bake Keys Into Your Image Forever
A secret passed as a Docker build ARG or set with ENV lives in the image's layer history, readable by anyone who can pull the image. The recovery path.
read the guide → 2026-11-14Race Conditions in Checkout and Balance Code: The Double-Spend Your Tests Never Catch
Read-balance-then-write logic passes every sequential test and fails under two simultaneous requests: double-spends and double-redemptions. The atomic fixes.
read the guide → 2026-11-14Web Cache Poisoning and Deception: Making Your CDN Serve the Attack to Everyone
When a cache stores a response shaped by an unkeyed input, one attacker's request becomes every visitor's page. The key discipline that prevents both.
read the guide → 2026-11-14DOM Clobbering: How a Form Field Named 'config' Silently Replaces Your JavaScript Objects
Browsers expose named form elements as properties of window and document — markup with id='config' can shadow the globals your code trusts.
read the guide → 2026-11-14Math.random() Is Not a Token Generator: Weak Randomness in Reset Links and Session IDs
Tokens built from Math.random or Python's random module are predictable — the state can be recovered from a few outputs. The CSPRNG replacements.
read the guide → 2026-11-14Session Cookies Without HttpOnly, Secure and SameSite: What Each Missing Flag Costs You
Three flags decide whether a session cookie can be stolen by script, sniffed on the network, or sent on cross-site forgeries. What each flag prevents.
read the guide → 2026-11-14Second-Order Injection: The Payload That Waits in Your Database Until It Reaches a Sink
Second-order injection stores the payload — a display name, an imported record — and detonates it in an admin panel or export. The output-side discipline.
read the guide →These guides are informational explainers, not security guarantees. Scan your own code before every deploy.