By NHI Mgmt Group Editorial TeamDomain: AI SecuritySource: Symbiotic SecurityPublished June 8, 2026

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: This study compares two AI coding agents under identical prompts and model conditions, finding that a security-first harness produced zero active vulnerabilities while the baseline agent produced 45.

Why it matters: It matters because AI coding agents are becoming part of software delivery pipelines, and IAM, secrets, and secure development controls must extend to the agent workflow itself, not just the human developer.

By the numbers:

👉 Read Symbiotic Security's analysis of secure AI code generation and benchmark results


Context

AI coding agents now sit inside the software supply chain, which means their output has to be governed like any other production-grade development activity. If the agent can choose patterns, libraries, and implementation details, then the security model cannot stop at the human prompt or the final code review.

The identity angle is indirect but real: when agents write code that handles authentication, secrets, and privileged workflow logic, they influence how human and machine identities are protected in downstream systems. The key governance question is no longer whether an agent can generate working code, but whether the agent workflow enforces security constraints before insecure patterns are committed.

The study’s starting point is typical of the current market: many teams are experimenting with AI-assisted coding before they have a mature control layer around it.


Key questions

Q: How should security teams govern autonomous coding agents in software delivery pipelines?

A: Treat the agent, its sandbox, and its tool access as a single governed execution path. Require per-run identity, scoped credentials, signed triggers, and human approval before merge. The key is not to stop automation, but to ensure every autonomous action has a bounded lifecycle, a clear owner, and an auditable trail from trigger to release.

Q: Why do AI coding agents create security risk even when they use the same model?

A: Because the model is only one part of the system. The harness determines whether the agent plans securely, uses approved libraries, validates output, and runs checks before handoff. Two agents can produce very different risk profiles from the same model when one is guided by guardrails and the other is not.

Q: What breaks when AI-generated code is reviewed without security gates?

A: What breaks is the assumption that a clean-looking diff is a safe diff. AI-generated code can hide unsafe defaults, dependency issues, and weak validation that basic review misses. Without CI-enforced tests and security checks, the merge process becomes a distribution channel for defects rather than a control point.

Q: How do you know if an AI coding agent is actually improving security?

A: Measure active findings, severity mix, policy violations, and the proportion of scanner results that are resolved before code is accepted. A genuine security improvement shows up as fewer high-severity findings, fewer unsafe patterns in identity-sensitive code, and less manual rework after the agent completes a task.


Technical breakdown

Why agent harness design shapes code security outcomes

AI coding agents do not just generate text, they execute a workflow. The harness determines whether security is treated as a planning constraint, an implementation rule, or a post-hoc review. In this study, the security-first agent added threat analysis, secure design tasks, guardrail enforcement, scanning, and triage around the same model. That matters because the model’s baseline capability is only one input to the final code quality. The rest is orchestration, which is where governance actually lives.

Practical implication: treat the agent harness as a control plane and review its guardrails, not just the model choice.

Why deterministic scanning changes the security baseline

Deterministic SAST tools such as Opengrep and Trivy provide repeatable findings against concrete code patterns, which makes them useful for AI-generated code. They do not prove code is secure, but they do expose whether the generation workflow systematically avoids common mistakes such as injection, cleartext transmission, or unsafe file handling. In practice, the value is less about one scan and more about whether the agent runs scans automatically as part of its own completion criteria. That turns security from a manual afterthought into a built-in acceptance condition.

Practical implication: require automated scanning in the generation loop, not only in downstream CI.

How security guardrails influence coding agent behaviour

Guardrails are policy constraints that shape what the agent is allowed to write. They can include parameterized query rules, logging restrictions, secrets handling expectations, and approved authentication libraries. The study shows that when guardrails are applied during generation, the agent can preserve feature delivery while reducing active findings. This is especially relevant for identity-sensitive code paths where insecure defaults create downstream IAM, PAM, and secrets exposure risks. The technical point is simple: policy enforcement has to happen before code is finalised, not after deployment.

Practical implication: encode secure patterns as enforced rules in the agent workflow and approved libraries list.


NHI Mgmt Group analysis

Security-first coding agents are becoming a governance problem, not just a productivity tool. The study shows that identical prompts and identical models can produce radically different security outcomes when the agent harness changes. That means the control surface is the workflow around the model, not the model alone. For identity teams, the implication is that agent-generated code should be governed as part of the software delivery trust boundary, especially where authentication, secrets, and privilege logic are involved. The practitioner conclusion is that AI coding agents need control design, not just model selection.

Secure-by-default generation is really policy-enforced software assembly. The strongest signal in the study is not that one agent wrote better code, but that it was forced to think about threats, guardrails, and post-generation verification before completion. That aligns with NIST AI RMF GOVERN and MANAGE functions, where accountability and risk treatment sit inside the operating model. For AI-assisted development programmes, the practical conclusion is that security policy must be machine-readable enough to shape code generation in real time.

Identity-sensitive code paths deserve special treatment in agent workflows. When AI agents generate authentication flows, secrets handling, or access-control logic, small mistakes become systemic exposure. That is where the boundary between AI governance and IAM governance becomes operationally important. The study reinforces that secure code generation is not a general code-quality issue alone, but a control issue for the systems that manage credentials, sessions, and privileged actions. The practitioner conclusion is to apply stricter review to identity-bearing code than to ordinary application scaffolding.

OWASP Agentic Applications Top 10 is now relevant to coding agents as well as runtime agents. Even when an AI system is not autonomous in the classic sense, it can still introduce insecure patterns, unsafe dependencies, and weak default decisions into software supply chains. The study makes the case for treating AI coding agents as governed software actors with measurable failure modes. The practitioner conclusion is to map agent workflows to threat models before they are allowed to generate production code.

Security triage has to keep pace with AI-generated code volume. A workflow that can produce dozens of projects quickly only helps if false positives are separated from real findings with context-aware review. Otherwise, teams either ignore scanner noise or miss true risk hidden inside accepted output. The study suggests a named concept worth tracking: generation-time control debt, where security issues accumulate because policy and validation are postponed until after code is already accepted. The practitioner conclusion is to reduce that debt at generation time, not in cleanup.

What this signals

Generation-time control debt: teams that let AI agents write code without enforced security planning, scanning, and triage will accumulate avoidable remediation work. The operational lesson is that security controls must be embedded in the agent workflow, not layered on after the code is accepted.

Identity, secrets, and access-control logic deserve a higher review threshold when they are generated by an agent. Those code paths shape downstream authentication and privilege behaviour, so a small implementation mistake can become a broad governance issue.

For AI-assisted engineering programmes, the next control question is whether secure patterns are machine-enforceable at the point of generation. That maps cleanly to the NIST AI Risk Management Framework and to the wider software supply chain discipline, not just to developer training.


For practitioners

  • Require security planning before code generation Make threat identification and security-sensitive component mapping a mandatory step in the coding agent workflow before any files are written. Use that step to force early decisions on authentication, secrets handling, input validation, and logging.
  • Enforce guardrails as policy, not advice Define approved libraries, parameterization rules, logging limits, and secrets handling requirements in a form the agent must follow during generation. Do not rely on a later code review to catch violations that the agent could have avoided.
  • Run deterministic scanning before completion Require SAST and dependency scanning to run automatically when the agent finishes a task, and block completion until critical or high-severity findings are resolved or formally reviewed.
  • Triage scanner output with code-aware review Use a dedicated review path for flagged findings so the team can distinguish true positives from context-specific false positives without suppressing real risk. This is especially important when agents emit inline exceptions or comments around scanner findings.

Key takeaways

  • The core issue is not whether AI coding agents can write working code, but whether the agent workflow enforces security before code is accepted.
  • Symbiotic Security's study shows that the same model can produce either 45 active vulnerabilities or none, depending on the harness around it.
  • Teams should move scanning, guardrails, and code-aware triage into the generation loop if they want AI-assisted development to reduce risk rather than redistribute it.

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 address the attack and risk surface, while NIST AI RMF, NIST CSF 2.0, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10Agentic workflows can introduce insecure code patterns and tool misuse.
NIST AI RMFGOVERNThe article is about governance of AI-assisted development workflows.
NIST CSF 2.0PR.IP-1Secure development processes and testing map to the agentic build pipeline.
NIST SP 800-53 Rev 5SA-11Security testing and evaluation are central to validating generated code.
CIS Controls v8CIS-16 , Application Software SecurityThe study directly concerns secure application development practices.

Apply agentic AI controls to constrain code generation, tool use, and output validation before handoff.


Key terms

  • AI Coding Agent Governance: The rules and oversight structures that define what a coding agent may do, why it may do it, and who is accountable for the outcome. It sits above security tooling and focuses on delegation, approval, auditability, and rollback rather than threat prevention alone.
  • Generation-time control: Generation-time control is security enforcement applied while an AI assistant is producing output, not after the code enters the repository. It matters because machine-speed coding compresses the window for review and makes delayed detection far less effective.
  • 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.
  • Runtime Guardrail: A control applied while an AI agent is operating, not just during configuration or review. Guardrails can block dangerous tool calls, require approval for sensitive actions, or stop data leakage before it reaches systems or users.

What's in the full report

Symbiotic Security's full article covers the operational detail this post intentionally leaves for the source:

  • Prompt design examples across five languages that show how the benchmark avoided bias toward insecure implementations
  • The exact scanner workflow using Opengrep and Trivy, including how findings were classified and suppressed
  • The 16 metric LLM-judge scoring model and how each security dimension was scored against generated code
  • The repository link and reproducibility notes for teams that want to rerun the study against their own agent workflows

👉 The full Symbiotic Security article covers the benchmark design, scanner methodology, and per-metric score breakdown.

Deepen your knowledge

NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, agentic AI identity, machine identity security, and secrets management. It is suitable for practitioners who need to connect AI-assisted development to identity and access control discipline.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 19, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org