TL;DR: A benchmark of five popular AI coding agents found 69 vulnerabilities across 15 generated applications, with recurring failures in authorization, business logic, SSRF, missing CSRF protection, and absent security headers, according to Tenzai. The result is that AI-assisted development increases delivery speed without reliably adding security judgment, so testing and explicit guardrails now matter more than prompt polish.
NHIMG editorial — based on content published by Tenzai: Bad Vibes, comparing the secure coding capabilities of popular coding agents
By the numbers:
Questions worth separating out
Q: What breaks when AI coding agents are allowed to ship code without security constraints?
A: Teams get working software that can still carry old, well-known vulnerabilities back into production.
Q: Why do AI coding agents struggle with authorization and business logic?
A: Because those controls depend on context, not just syntax.
Q: How can security teams tell whether AI-generated code is actually safe?
A: They should look for security regression evidence, not just test pass rates.
Practitioner guidance
- Mandate control verification before merge Require every AI-generated application to pass a control checklist covering CSRF, security headers, rate limiting, authentication, authorization, and input validation before code reaches a protected branch.
- Separate functional testing from security assurance Test whether the app works, then test whether it resists abuse.
- Review identity and authorization logic by hand Do not rely on agent-generated access control for role checks, ownership checks, or exception handling.
What's in the full report
Tenzai's full research covers the detailed benchmark setup and the per-agent failure analysis this post intentionally leaves at the summary level:
- Per-agent breakdown of which coding system produced each vulnerability class and where the failures clustered
- Code examples showing the specific authorization, SSRF, and business logic mistakes observed in the generated applications
- The testing approach used to validate exploitability, including static analysis and dynamic proof-of-concept checks
- The appendix prompts and application scenarios used to reproduce the benchmark across the five agents
👉 Read Tenzai’s benchmark of secure coding capabilities in popular AI coding agents →
AI coding agents and insecure code: what should teams do now?
Explore further
AI coding agents are now a governance problem, not just a developer productivity tool. The benchmark shows that agents can generate functioning software while still omitting the controls that make software safe in production. That shifts the risk discussion from code quality alone to lifecycle governance, because security intent is being lost at the point of implementation. Practitioners should treat generated code as untrusted until controls are independently validated.
A question worth separating out:
Q: Should organisations trust prompt engineering to make coding agents safer?
A: No. Better prompts can help when the secure pattern is obvious, but they do not reliably solve ambiguous security problems such as business logic, authorization, or control omission. Organisations need guardrails, code review, and security test gates because prompt quality is not a substitute for assurance.
👉 Read our full editorial: AI coding agents keep shipping vulnerable code across apps