OX Security’s Analysis of 300+ Repositories Details 10 Critical Anti-Patterns that Violate Accepted Best Practices and Lead to “Insecurity by Dumbness”
TL:DR
- 10 critical anti-patterns identified – from “Comments Everywhere” to “Return of Monoliths” – each violating fundamental software engineering best practices
- Vulnerability density mirrors human code – but AI removes every natural bottleneck that controlled what reaches production
- “Insecure by dumbness” – Non-technical users deploying production systems without security expertise, creating preventable risks at unprecedented scale
- Why code review has collapsed as a viable security strategy in the AI era
AI coding tools have revolutionized software development, enabling non-technical users to build functional applications at unprecedented speed. But according to new research from OX Security, this revolution comes with a hidden cost: we’re facing a security crisis driven not by worse code, but by the sheer velocity at which vulnerable systems now reach production.
The Real Problem Isn’t What You Think
After analyzing over 300 repositories, OX research team discovered something surprising. AI-generated code doesn’t contain more vulnerabilities per line than human-written code. The security issues arise from what the research team calls “insecurity by dumbness”—AI tools behaving like an army of talented but inexperienced junior developers, lacking the architectural judgment and security awareness that comes with experience.
“Functional applications can now be built faster than humans can properly evaluate them,” explains Eyal Paz, VP of Research at OX Security. “The problem isn’t that AI writes worse code, it’s that vulnerable systems now reach production at unprecedented speed, and proper code review simply cannot scale to match the new output velocity.”
The 10 Critical Anti-Patterns
The research identified ten systematic behaviors in AI-generated code that directly contradict established software engineering best practices:
Comments Everywhere (90-100% prevalence): AI tools generate excessive inline comments that dramatically increase computational burden and ironically make code harder to review and maintain.
By-The-Book Fixation (80-90%): While following conventions sounds good, AI rigidly adheres to standard patterns even when more innovative solutions would be more effective.
Over-Specification (80-90%): Instead of building reusable components, AI creates hyper-specific, single-use solutions that can’t be adapted for other purposes.
Avoidance of Refactors (80-90%): AI excels at generating new code but never goes back to improve architecture or refactor existing implementations—a critical skill for maintaining healthy codebases.
Bugs Déjà-Vu (70-80%): By violating code reuse principles, AI causes identical bugs to appear repeatedly throughout codebases, requiring the same fix multiple times.
“Worked on My Machine” Syndrome (60-70%): AI lacks awareness of deployment environments, generating code that runs perfectly in development but fails in production.
Return of Monoliths (40-50%): AI defaults to tightly-coupled monolithic architectures, reversing a decade of progress toward more maintainable microservices.
Fake Test Coverage (40-50%): Rather than validating actual logic, AI inflates coverage metrics with meaningless tests that give false confidence.
Vanilla Style (40-50%): Instead of leveraging proven libraries and SDKs, AI often reimplements functionality from scratch, introducing unnecessary risk.
Phantom Bugs (20-30%): AI over-engineers for improbable edge cases, causing performance degradation and wasting resources on scenarios that will never occur.
Real-World Consequences
These aren’t just theoretical concerns. Recent security breaches at companies like Replit, Lovable, and Tea App demonstrate how these anti-patterns materialize into real incidents, impacting millions of users and organizations worldwide.
What Organizations Need to Do Now
Traditional approaches to code security won’t work in an AI-accelerated world. Here’s what needs to change:
Abandon code review as your primary security mechanism. It simply cannot scale to match AI’s output velocity. You need security built into the development process itself, not bolted on at the end.
Redefine roles and responsibilities. Position AI for implementation work while humans focus on architecture, security oversight, and the kind of judgment calls that require experience and context.
Embed security directly into AI workflows. Build security instruction sets into your AI coding processes so secure patterns are generated from the start, not fixed after the fact.
Adopt AI-native security tools. Traditional security tools were designed for human development pace. They’re fundamentally inadequate for the velocity AI enables.
Independent analyst James Berthoty notes, “This report does an excellent job covering the emerging risks of AI-generated code. Many of these issues are shipping short-term features without long-term considerations, which is exactly how the most severe security vulnerabilities are introduced.”
What Does This Means for Your Team?
AI coding tools aren’t going away, nor should they. The productivity gains are too significant to ignore. But we need to fundamentally rethink how we approach security in this new paradigm. The era of building fast and reviewing later is over. In a world where functional code can be generated faster than it can be properly evaluated, security must be proactive, embedded, and designed for AI velocity from day one.
The “Army of Juniors” isn’t the problem—it’s how we’re deploying them without proper supervision and security guardrails. It’s time to evolve our practices to match the new reality of AI-accelerated development.
The full report is now available for download here.


