Join our Newsletter — 33% off our NHI Course

Why do coding agents complicate zero trust assumptions in software development?

Coding agents complicate zero trust because authorized actions can still become unsafe after the session starts. An agent may begin with valid permissions, ingest untrusted content, and then act on injected instructions or access sensitive files before attempting external communication. Security teams need continuous verification of intent, context, and action sequence, not just trust at login or configuration time.

Why This Matters for Security Teams

Coding agents are not just faster developers. They are execution-capable systems that can read files, call tools, and modify repositories after a session has already been approved. That changes the trust model. zero trust assumes every request must be evaluated continuously, but many development workflows still rely on a trusted workspace, trusted prompts, and trusted repository access once a login succeeds. That assumption breaks as soon as an agent processes untrusted code, docs, tickets, or web content.

NHIMG research shows how quickly this becomes operational risk. In the Amazon Q AI Coding Agent Compromised case, the problem was not simply access, but how instructions and context were manipulated mid-workflow. This aligns with the broader findings in the OWASP Agentic Applications Top 10 and the NIST AI Risk Management Framework, both of which emphasize runtime risk and context, not just initial authentication. In practice, many security teams encounter unsafe agent behaviour only after the agent has already touched source code, secrets, or CI/CD steps, rather than through intentional testing.

How It Works in Practice

The core issue is that a coding agent’s behaviour is goal-driven, not pre-scripted. A developer may authorize the agent to fix a bug, but the path the agent takes can change based on repository content, prompt injection, tool output, or retrieved context. Traditional RBAC can say the agent may access a repo, but it cannot determine whether the next action is safe. That is why current guidance suggests moving from static permissions to runtime policy evaluation, where each action is checked in context before it executes.

Practically, security teams should treat the agent as a workload identity with narrowly scoped, short-lived access. A useful pattern is just-in-time credential issuance for the specific task, plus automatic revocation when the task ends. Where possible, bind access to workload identity rather than reusable secrets, using standards such as SPIFFE or OIDC-backed workload tokens. Policy engines such as OPA or Cedar can then evaluate whether the agent may read a file, open a network connection, or invoke a build step based on the current prompt, target resource, and trust level of the input.

  • Separate human approval from machine execution so an approved session does not become open-ended access.
  • Use short TTL secrets and per-task tokens instead of long-lived API keys in the agent runtime.
  • Constrain tool access to the minimum set needed for the current task, not the full developer role.
  • Log each agent action sequence so prompt injection and tool chaining can be investigated later.

NHIMG’s Analysis of Claude Code Security and the CSA MAESTRO agentic AI threat modeling framework both point toward the same operational truth: the agent must be governed at the moment it acts, not just when it starts. These controls tend to break down in monorepos with broad build permissions and shared CI runners because a single agent action can cascade into code, package, and deployment changes.

Common Variations and Edge Cases

Tighter runtime controls often increase latency and developer friction, so organisations must balance safety against throughput. That tradeoff is real, especially in fast-moving engineering teams that want agents to edit code, run tests, and open pull requests with minimal interruption. Best practice is evolving, and there is no universal standard for how much autonomy is acceptable in every development lane.

Edge cases appear when coding agents are connected to ticketing systems, dependency managers, or production-adjacent secrets stores. In those environments, a single malicious prompt can pivot from code review into credential exposure or CI/CD abuse. The risk is higher when secrets live in files, environment variables, or shared pipelines instead of managed vaults. NHIMG’s Ultimate Guide to NHIs — 2025 Outlook and Predictions notes that 90% of IT leaders say proper NHI management is essential for zero-trust implementation, and that matters even more when the workload itself is autonomous.

Security teams should also distinguish between trusted internal code and untrusted external content. Pull request comments, README files, dependency metadata, and copied snippets can all carry instructions the agent will follow unless the system explicitly filters or contextualizes them. The practical takeaway from NIST SP 800-207 Zero Trust Architecture is that trust must be re-earned continuously, but with coding agents that trust decision has to include the next token, not just the next login.

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, CSA MAESTRO and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST AI RMF and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Agentic AI Top 10 A01 Covers prompt injection and unsafe agent actions in coding workflows.
CSA MAESTRO TRUST Addresses runtime trust decisions for autonomous agent behaviour.
NIST AI RMF GOVERN Requires accountability and risk controls for AI systems in operation.
NIST Zero Trust (SP 800-207) 3.4 Zero trust requires continuous verification of subject and device context.
OWASP Non-Human Identity Top 10 NHI-03 Short-lived credentials and secret handling are central to agent identity risk.

Issue ephemeral credentials for coding agents and revoke them immediately after task completion.