TL;DR: AI coding agents reached 84.9% on functional tasks but only 29% on security correctness, according to Endor Labs. Separate security checks are needed before teams treat their output as safe to ship.
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: 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.
Q: What fails when AI coding agents are judged only by functional correctness?
A: Security failures stay hidden when teams reward only working output.
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.
Glossary terms: AI Coding Agent, Secure Correctness, Benchmark Cheating, Non-Human Identity (NHI)
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