Rob builds a deliberately broken Next.js app called Leak Cast with six planted security bugs plus one safe decoy, then runs four approaches at it: free scanners (GitLeaks, Trivy), Claude Code's built-in /security-review, Cloudflare's new open-source security skill, and a plain one-sentence prompt with no tooling. Cloudflare's skill was the only one to name all six bugs (~5 min, 38 cents) and the only one that tried to prove an exploit, but a bare prompt still found five of six in 34 seconds for under a cent. The lesson: scanners and AI reviewers catch different classes of problems, so you need both, and the real gap in AI-written code is ownership/row-level checks rather than textbook bugs.
- AI coding agents handle textbook security well but routinely forget to check whether a record actually belongs to the logged-in user; a researcher found over 170 Lovable-built apps leaking data because database row rules were never set up.
- The test app contained three classic bugs (SQL injection, a committed-then-deleted secret key, an outdated Next.js with a middleware bypass) and three agent-style bugs (cross-company reads, anyone can delete any post, an export dumping all companies' data), plus a safe decoy to penalize false positives.
- GitLeaks and Trivy each caught only what lives outside the code — a key three commits back in Git history, and the vulnerable dependency — scoring 2 of 6 between them, and neither read the code to find the SQL injection.
- Claude Code's /security-review found 4 of 6 in 84 seconds for 16 cents, but it only reviews the latest diff by default, skips rate limiting by design, and its docs say it isn't hardened against prompt injection.
- Cloudflare's skill maps the app, dispatches 'hunters' per attack class, and uses separate verifier agents because a hunter grading its own homework will validate everything it outputs; it named all 6 bugs and proved the SQL injection against a dummy database.
- Cloudflare's approach costs real money at scale — the 38-cent run was incomplete, proving bugs needs locked-down sandboxes, and Cloudflare itself says a single run finds roughly half the bugs so it should be run several times.
- A plain prompt — 'review the code base for security vulnerabilities, name the file, and what an attacker gets' — found 5 of 6 in 34 seconds for under a cent, though the app was small enough for the model to read in one pass.
- All three AI tools flagged an unplanted bug: the session password was hardcoded in source by the AI agent that helped build the app, letting anyone with the code forge an admin login — and GitLeaks missed it.
- Recommended layering: level one now (GitLeaks over full history plus a pre-commit hook, Dependabot/Trivy, a review prompt before shipping, recurring mistakes baked into AGENTS.md/CLAUDE.md); level two per pull request (/security-review on trusted PRs, scanners in CI, header checks); level three before launch or when touching auth/billing (Cloudflare skill in a sandbox run multiple times, an AI pen tester against staging, and ideally a human professional).
The clearest explanation of what makes Cloudflare's skill architecturally different — separate hunter and verifier agents — and a transferable rule for any agent workflow.
If a hunter is allowed to grade its own homework, it will confidently validate everything it outputs. This is why I'll often go as far to use a completely different model when checking another agent's work.
The control run nearly matched the purpose-built tooling at a fraction of the time and cost, with an honest caveat about why that won't hold on larger apps.
Review the code base for security vulnerabilities, name the file, and what an attacker gets. If you're going to take one thing from this video, just remember this one prompt.
Security is your problem, your responsibility, it's not the tool, it's not the agent.
The agent got the textbook parts right and it still went and hardcoded the password that protects every session.
Scanners and then AI review tools catch different things and you need to have both.