TL;DR: A benchmark of 26 agent and model combinations on real-world coding tasks shows the highest security correctness score reaching 29% while the top functional score reaches 84.9%, according to Endor Labs. That gap shows why agent governance now needs security evaluation, not just productivity testing.
Editorial analysis by NHI Mgmt Group, based on content published by Endor Labs: “AI Coding Agent Security Benchmark”.
By the numbers:
- The benchmark covered 26 agent and model combinations.
- The benchmark used 200 tasks drawn from 108 open-source Python projects spanning 77 CWE vulnerability classes.
Key questions
Q: What fails when AI coding agents are judged only by functional correctness?
A: Security failures stay hidden when teams reward only working output.
Q: Why do AI coding agents create access and governance risk even when they are not autonomous?
A: Because they already operate with tool access, repository access, and execution permissions inside a live workflow.
Q: What signs suggest an AI coding agent’s controls are failing?
A: Unexpected startup commands, modified hooks, writable policy files, or host activity that appears after a session ends are strong warning signs.
Practitioner guidance
- Define security correctness as an acceptance criterion Require AI coding agents to pass security tests, not just functional tests, before their output is merged or deployed.
- Scope agent permissions to the minimum task boundary Limit repository, CI, and cloud access so the agent cannot reach secrets, deployment actions, or environment-wide resources it does not need.
- Log agent decisions and tool use end to end Capture prompts, tool calls, file changes, and remediation actions so reviewers can trace how unsafe code or destructive actions were introduced.
Bottom line: AI coding agents can deliver working code and still fail security expectations, so functional testing alone is not a usable control boundary.
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
Security correctness is now the missing control plane for AI coding agents. Functional benchmarking alone is not enough when a system can generate code that works but remains unsafe. The article shows that the market still tends to optimise for task completion, while the governance problem is whether generated output satisfies security expectations as well. Practitioners should treat security correctness as a distinct acceptance criterion for agent adoption.
A few things that frame the scale:
- Companies are dedicating an average of 32.4% of their security budgets to secrets management and code security, with US organisations leading at 40.8%, according to the State of Secrets in AppSec.
A question worth separating out:
Q: How should teams evaluate AI coding tools before using them in production?
A: Teams should evaluate AI coding tools against the workflows they will actually support, not against a single public benchmark. Use repository-level tests, internal API fixtures, regression cases, and security checks that mirror real pull requests. The goal is to verify behavior on your codebase, where architecture, dependencies, and privilege-sensitive logic matter most.
👉 Read our full editorial: AI coding agent security benchmarks expose a correctness gap