TL;DR: AI coding agents are generating much larger pull requests and compressing the time available for review, creating a verification gap where functional code can still be insecure, unreliable, or non-compliant, according to Sonar. The right response is multilayered verification inside the development loop, not trust in the model that produced the code.
NHIMG editorial — based on content published by Sonar: AI coding agents need zero-trust verification, not blind trust
By the numbers:
- When AWS credentials are exposed publicly, attackers attempt access within an average of 17 minutes and as quickly as 9 minutes in some cases.
Questions worth separating out
Q: What breaks when AI coding tools are trusted without strong verification?
A: What breaks first is consistency.
Q: Why do AI coding agents increase software security risk for identity-heavy systems?
A: Because identity-heavy systems depend on correct handling of authentication, authorisation, secrets, and privilege boundaries.
Q: How do security teams know if automated AI evaluation is actually working?
A: Look for stable agreement with human reviewers, low sensitivity to answer order, and consistent scores across repeated tests on the same inputs.
Practitioner guidance
- Embed verification in the inner development loop Run independent security checks before a pull request exists, not only after code is merged, so AI-generated changes are constrained while they are still easy to correct.
- Separate generation from validation Use one control path to create or suggest code and a different control path to assess security, reliability, and maintainability so the same blind spots are not reused twice.
- Prioritise access-control review in AI-assisted code Review authentication, authorisation, and secret-handling logic first because these are the areas where small defects can create disproportionate exposure.
What's in the full article
Sonar's full analysis covers the operational detail this post intentionally leaves for the source:
- How Sonar applies verification across coding, pull requests, and remediation workflows in practice
- What the LLM Leaderboard evaluates beyond functional correctness, including security and maintainability
- How the SonarQube plugin for Codex and the CLI fit into agentic development workflows
- Why SonarQube Advanced Security, Hunter Agent, and remediation tooling are positioned as part of a single verification loop
👉 Read Sonar's analysis of AI coding agents and the verification gap →
AI coding agents and the verification gap: are your controls enough?
Explore further
AI-generated code has created a verification debt problem. The central governance issue is no longer only code quality, but whether organisations can prove the security of code created at machine speed. Traditional review assumes humans can keep pace with changes, yet AI agents can generate and remediate far more output than manual gates were designed to inspect. For IAM and NHI-heavy platforms, that debt is especially risky because small code defects can cascade into broken auth flows, secret exposure, or privilege escalation. The practitioner conclusion is clear: verification must be treated as a first-class control.
A question worth separating out:
Q: Should organisations rely on the same model that generated code to validate it?
A: No. The safest pattern is separation of duties between generation and validation, with independent checks that do not inherit the model’s blind spots. If the same system proposes the code and certifies it, the organisation has not reduced trust, it has concentrated it in one place. That is a governance weakness, not a control.
👉 Read our full editorial: AI coding agents need zero-trust verification, not blind trust