TL;DR: Two AI coding agents using the same model produced very different outcomes in a controlled study, with the security-first workflow generating zero active SAST findings across 50 projects while the baseline produced 45, according to Symbiotic Security. The result shifts the focus from code generation speed to governance of guardrails, scanning, and remediation in AI-assisted development.
At a glance
What this is: Symbiotic Security’s controlled benchmark found that a security-first AI coding agent produced zero active SAST findings across 50 projects, while a baseline agent produced 45.
Why it matters: For IAM and security teams, the finding shifts attention from model capability to the controls embedded around AI coding agents, including guardrails, review gates, and post-generation scanning.
By the numbers:
- The deterministic scanner found 45 active vulnerabilities in Claude Code generated projects.
- Symbiotic Code projects recorded zero active SAST findings across 50 scanned projects.
- The LLM judge gave Symbiotic Code an overall security score of 8.62 versus 5.58 for Claude Code.
Context
AI coding agents are now part of the software supply chain, because they can generate, refactor, and connect code faster than many teams can review it. That changes the control problem from developer productivity to governance of what the agent is allowed to do before, during, and after code generation.
The article’s central issue is not whether AI can write working code, but whether the workflow surrounding the agent embeds enough security to prevent vulnerable patterns from being normalised into production code. For teams running human, machine, and agentic development flows together, this becomes an identity and control question as much as a code-quality question.
Key questions
Q: What is the failure mode when AI coding agents generate code without security guardrails?
A: The failure mode is insecure code becoming the default implementation path before anyone applies review or remediation. When an agent optimises only for task completion, it can introduce weak auth flows, unsafe input handling, and risky dependencies at generation time. The control gap is not human negligence alone, but the absence of security constraints inside the agent workflow itself.
A: Because post-build review assumes insecure design decisions are still easy to reverse after code exists. A security-first workflow changes the agent’s behaviour before the first line is written, so threat awareness, approved patterns, and scanner feedback shape the output rather than merely judge it. That reduces the chance that vulnerable code ever reaches the review queue.
Q: What do organisations get wrong about scanning AI-generated code?
A: The common mistake is treating more scanning as a complete answer. In reality, high-volume findings create noise unless teams can prioritise exploitability, exposure, and business impact. Organisations also miss the governance layer, where AI tools and agents need ownership, permission boundaries, and auditable actions.
Q: How should organisations govern AI coding agents in the SDLC?
A: Treat them as privileged non-human identities with named owners, narrow task scope, and explicit offboarding. Governance should align access to the exact development activity, not to a broad team role or permanent environment trust. That is the difference between using the agent safely and leaving it as an unowned execution path.
Technical breakdown
Why AI coding agents need security guardrails before generation
A coding agent is not just a text generator. It is a workflow system that can plan tasks, select dependencies, write files, and make implementation choices with only the prompt as guidance. If security is applied only after code is produced, the agent has already shaped the architecture, the attack surface, and often the insecure defaults. The article’s benchmark shows why pre-implementation threat awareness matters: the difference was not the model, but the harness around it. In practice, guardrails have to influence planning, not merely review the output.
Practical implication: move security constraints into the agent’s planning stage, not just the final review stage.
How post-generation scanning changes the control model for AI code
Deterministic scanning changes AI coding from a trust exercise into an evidence-backed workflow. A SAST engine such as Opengrep or Trivy can identify injection paths, unsafe file handling, missing auth checks, and other defects that a language model may not recognise as risky in context. But scanning only helps if the agent is required to act on the findings and if false positives are triaged with code context rather than dismissed by default. That creates a closed loop: generate, scan, interpret, remediate, then re-scan. The control point is not one scan, but enforced iteration.
Practical implication: require scanner findings to feed back into the agent’s remediation loop before code is considered complete.
Why security-first prompts outperform generic implementation prompts
The article shows that the same model can produce radically different security outcomes when the instructions change. A generic coding workflow optimises for task completion. A security-first workflow explicitly models threat vectors, injects security tasks into the todo list, and treats organisational guardrails as constraints on code generation. That means the real unit of governance is the agent policy plus tooling stack, not the base model alone. For practitioners, this is a reminder that AI coding risk is a system-design problem, not a model-selection problem.
Practical implication: evaluate the entire agent workflow, including guardrails and task ordering, rather than assuming model choice is the main control.
NHI Mgmt Group analysis
AI coding agents introduce a governance problem, not just a development acceleration problem. The article shows that identical models can produce different security outcomes when the agent harness changes, which means the risk sits in workflow design, not simply in model capability. That is the right framing for any team allowing AI to generate application code at scale, because the agent becomes part of the software control plane. Practitioners should treat the agent as a governed code-producing identity, not a neutral assistant.
Security guardrails have to shape generation, not merely inspect its output. The benchmark’s strongest signal is that pre-planning security tasks, enforcing org guardrails, and scanning after implementation reduced vulnerable code dramatically. That pattern matters because many current controls assume remediation happens after code exists and after a developer notices the problem. In AI-assisted development, that assumption is too late. The decisive issue is whether the workflow can constrain the first draft of code before insecure patterns become embedded.
AI coding workflows are beginning to overlap with NHI governance. These agents operate inside repositories, CI/CD, and secret-bearing environments, so they need explicit authorisation boundaries, observability, and accountability for what they can create or modify. That makes agent governance adjacent to machine identity management, especially where agents can touch auth flows, APIs, or configuration. Security teams should govern coding agents as privileged non-human actors with bounded scope and auditability.
Secure-by-default agent design is becoming a software assurance requirement. The article’s result suggests that code security can no longer be delegated to human review alone when agents can generate working features in minutes. The practical implication is that development programmes need measurable controls for agent planning, scanner feedback, and remediation closure. Teams that cannot observe or constrain those steps will inherit the agent’s blind spots as production risk.
From our research library:
- Claude Code-assisted commits leaked secrets at a rate of 3.2%, more than double the human-only baseline of 1.5%, with peaks reaching 31 secrets per 1,000 commits in August 2025, according to the State of Secrets Sprawl 2026.
- Read next: AI Agent Observability, Audit and Incident Response Guide
What this signals
Security-first coding agents create a new assurance baseline for software teams. The benchmark result suggests that the relevant control is not whether an agent can write code, but whether its workflow enforces guardrails, scanning, and remediation closure before code enters the delivery pipeline. Teams that adopt AI coding at scale should expect their assurance model to move from developer review to agent governance.
Agent governance now overlaps with machine identity and privileged automation. A coding agent that can modify repositories, authentication paths, or secret-bearing files behaves like a governed non-human actor, not a passive assistant. That means authorisation scope, auditability, and lifecycle controls become part of secure software delivery, especially where the same workflow can touch production-adjacent assets.
Claude Code-assisted commits leaked secrets at a rate of 3.2%, more than double the human-only baseline of 1.5%, with peaks reaching 31 secrets per 1,000 commits in August 2025, according to the State of Secrets Sprawl 2026. That broader pattern reinforces the article’s message: AI-assisted development needs preventive controls, not just after-the-fact cleanup.
For practitioners
- Embed security into agent planning Require AI coding agents to identify threat vectors, sensitive components, and security tasks before they write code so insecure defaults do not become the first draft.
- Run deterministic scanning on every generated project Make SAST results a mandatory gate for agent-produced code and force the agent to remediate findings before the work is marked complete.
- Define org-level guardrails for code generation Codify approved libraries, authentication patterns, logging rules, and data-handling constraints so the agent cannot improvise on high-risk implementation choices.
- Triage findings with code-aware review Use a separate review step for scanner findings that checks the surrounding code context before suppressing false positives or accepting a fix.
- Measure security outcomes per agent workflow Track active findings, suppression rates, and re-opened issues by agent, model, and repository so you can compare workflows rather than rely on anecdotes.
Key takeaways
- The article shows that secure code generation depends as much on the agent workflow as on the underlying model.
- The strongest outcome came from planning-time guardrails, deterministic scanning, and context-aware triage, not from a better prompt alone.
- Teams adopting AI coding agents should govern them as privileged automation and require measurable security closure before code ships.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | ASI02 — Tool Misuse | The article centres on how agent workflow and tool use shape secure code generation. |
| ASI03 — Identity & Privilege Abuse | The agent acts as a privileged non-human actor inside development workflows and repositories. | |
| Recommendation — Constrain coding agents so tool use, file writes, and remediation steps stay within approved security boundaries. Limit agent privileges and scope to the minimum repositories, commands, and secrets it actually needs. | ||
| OWASP Non-Human Identity Top 10 | NHI-05 — Overprivileged NHI | Coding agents can touch sensitive code paths and need explicit scope limits like other NHIs. |
| NHI-10 — Human Use of NHI | Developers are using an agentic system to make code changes on their behalf. | |
| Recommendation — Review coding-agent access against NHI-05 and remove any repository or secret access it does not require. Define when humans may delegate coding tasks to agents and require accountability for agent-made changes. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | The workflow depends on tightly governed permissions for repositories, scanners, and sensitive code paths. |
| Recommendation — Apply PR.AA-05 to keep agent permissions aligned with the smallest viable set of development entitlements. | ||
Key terms
- AI Coding Agent: An AI coding agent is software that writes, edits, reviews, or tests code with limited human prompting. It operates as an agentic system that can plan actions, call tools, and modify development artifacts, so its identity, permissions, and audit trail must be governed like any other privileged software actor.
- Deterministic SAST: Static application security testing that returns the same findings for the same code and rule set. Determinism matters because teams use the output to gate releases, support audits, and compare changes over time without uncertainty introduced by probabilistic scoring or model drift.
- AI guardrails: AI guardrails are policy and technical controls placed around an AI service to shape what it can accept, generate, and expose. In practice they combine moderation, access control, data protection, rate limiting, logging, and change management so the service behaves within an organisation’s rules.
- Security-First Workflow: A security-first workflow is an implementation process that treats security as part of generation, not a separate review step. For AI coding agents, it means threat awareness, policy constraints, and automated validation are embedded before, during, and after code creation.
Deepen your knowledge
The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and secrets management. It helps security and identity teams build the controls needed to govern privileged automation and agentic workflows.
Published by the NHIMG editorial team on August 19, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org