TL;DR: Claude Opus 4.6 improves reasoning but also raises code risk, with higher issue density, more complex output, and a 55% increase in vulnerability density that makes automated verification necessary, according to Sonar. Manual review alone no longer scales when AI coding assistants can introduce subtle defects faster than teams can inspect them.
NHIMG editorial — based on content published by Sonar: LLMjacking: How Attackers Hijack AI Using Compromised NHIs
By the numbers:
- Sonar reports that vulnerability density in code generated by Opus 4.6 has increased by 55% compared with the previous version.
- Sonar says critical bugs in Opus 4.6 output increased by 336%, from 11 to 48 per million lines of code.
- Sonar’s analysis shows issue density rose by 21%, from 15.15 to 18.33 issues per thousand lines of code.
Questions worth separating out
Q: How should security teams govern AI-generated code in production environments?
A: Security teams should treat AI-generated code as normal production code with extra provenance risk.
Q: Why do AI coding assistants create more risk than a standard IDE?
A: They can move code off the local machine, call external tools, and act on instructions with limited human review.
Q: What do teams get wrong about AI-generated documentation and code review?
A: They often assume documentation or review output is proof of oversight.
Practitioner guidance
- Implement mandatory verification gates for generated code Require static analysis, secret scanning, and targeted security tests before any AI-generated change can merge or deploy.
- Limit agent permissions in development pipelines Constrain what code agents can edit, which branches they can touch, and which build or deployment actions they can trigger.
- Prioritise review of high-risk change types Escalate any generated changes that touch access control, secret management, dependency updates, or request handling.
What's in the full report
Sonar’s full analysis covers the operational detail this post intentionally leaves for the source:
- Benchmark breakdowns comparing Claude Opus 4.5 and 4.6 across code quality, issue density, and complexity metrics
- Specific examples of vulnerability classes that increased in the newer model output, including path traversal and resource leaks
- SonarQube deployment options for IDE, cloud, server, and MCP-based agent integrations
- The AI Code Assurance workflow details that show how generated code is verified before human review
👉 Read Sonar’s analysis of Claude Opus 4.6 and AI-generated code risk →
AI-generated code quality is slipping under agentic workflows?
Explore further
AI-generated code has become a governance problem, not just a productivity problem. The article’s central signal is that faster code creation does not remove the need for security proof. In practice, model output can accelerate bad patterns as easily as good ones, which means SDLC governance must assume machine-generated code is higher variance than human-authored code. Practitioner conclusion: organisations need verification controls that are mandatory, repeatable, and independent of developer trust.
A question worth separating out:
Q: How do organisations govern autonomous coding tools without slowing delivery too much?
A: Organisations should scope the tool, not just the user. Give agents limited edit rights, narrow deployment authority, and auditable checkpoints for multi-file or high-impact changes. That approach preserves speed while preventing autonomous actions from crossing into production without evidence that the change is safe.
👉 Read our full editorial: Claude Opus 4.6 raises the cost of trust in AI-generated code