BEFORE YOU GO LIVE
DOCTRINE No. 05Web Vulnerabilities

Your AI wrote the vulnerability in — 86% of the time

AI-generated code compiles, runs, and demos beautifully — and most of it cannot defend against a basic cross-site scripting attack. The model optimized for "works", not for "hostile input".

The numbers are brutal. When over 100 large language models were put through security testing, 86% produced code that failed to defend against cross-site scripting, and 88% were open to log injection. One in five referenced packages that don't exist — and attackers now register those phantom names as malware and wait for your npm install. It's called slopsquatting. Meanwhile AI-assisted commits leak secrets at roughly double the baseline rate, and a scan of 1,400 vibe-coded production apps found hundreds with exposed secrets and live PII — bank details included.

None of this shows up in your demo, because your demo only ever feeds the app friendly input. The attacker's first move is unfriendly input: a <script> tag in a name field, a newline in a log line, a package name your model hallucinated. Trust nothing that crosses your boundary.

Two checks from this doctrine

Real value, not a teaser — two of the 5 checks in full. The rest are in the one-pager.

Validate every input server-side.Client-side validation is a courtesy, not a control — anyone with curl skips it. Enforce type, length, and format on the server for every field, no exceptions.
Escape every output.XSS lives where user input is rendered back to a page. Use your framework's auto-escaping everywhere; never build HTML by string concatenation. Add a Content-Security-Policy as the backstop.
The full Doctrine No. 05: Input Validation one-pager has all 5 checks — 3 more beyond the two above — laid out as a branded, printable page you can run down before you ship. Get it for $5 →
Every input is hostile until validated, every output dangerous until escaped — the AI assumed neither.
The full one-pager

Doctrine No. 05: Input Validation

All 5 checks on one branded, printable page — the run-it-yourself list for web vulnerabilities before you go live. Instant PDF download, yours to keep.

Get this doc — $5 Or get all 23 docs + the checklist — $29 →

Secure checkout by Stripe · instant download · 30-day no-questions refund.