Join our Newsletter — 33% off our NHI Course

What should IAM and security teams do when an AI coding tool can act on behalf of the developer?

Treat the tool as part of the delegated access path and require controls around file changes, terminal execution, and external tool calls. The governance question is not only whether the human is authenticated, but whether the action itself is authorised at runtime.

What changes when an AI coding tool can act on the developer’s behalf?

An AI coding tool that can edit files, run commands, or call external services is no longer just a suggestion engine. It becomes a delegated actor inside the development workflow, so IAM and security teams need to decide what the tool may do, under which identity, and with what limits. That shifts the control question from user login alone to runtime authorisation and blast-radius management.

The practical consequence is that the tool can create, modify, and execute with enough authority to cause real change, especially when it is connected to a terminal, source control, cloud APIs, or package registries. Teams should treat those capabilities as privileged pathways, not convenience features, because the security outcome depends on how tightly the actions are scoped, logged, and revocable.

That is why delegated access matters here: the tool may be operating under human credentials, an agent credential, or a short-lived exchange token, and each option changes how you bound the session, prove intent, and recover from misuse. RFC 8693: OAuth 2.0 Token Exchange is useful here because it formalises delegation and on-behalf-of flows that are closer to what these tools actually do than simple user login models.

What controls matter most for developer action, terminal use, and external tools?

File changes, terminal execution, and external tool calls are three different risk surfaces. File changes affect code integrity and release quality, terminal execution can cross into host-level impact, and external tool calls can move secrets or data outside the local trust boundary. The right control set is therefore not one generic approval step, but separate guardrails for each action type.

For file changes, the key question is whether the tool can write outside an approved workspace, introduce hidden dependency changes, or alter security-sensitive code paths. For terminal use, the important constraint is whether commands are allowlisted, previewed, or require explicit confirmation before execution. For external calls, teams should know which services are reachable, what data can be sent, and whether the tool can invoke anything that changes production state.

Practitioners often underestimate how quickly a coding assistant becomes an access aggregation point. If it can read secrets from context, reuse tokens, or chain calls across IDE, terminal, and CI/CD, the tool can cross control boundaries that were previously separated by human attention. Token exchange and delegated access should therefore be designed around narrow scope, short duration, and clear provenance, not just successful authentication.

How should IAM and security teams operationalise delegated coding access?

Start by defining the tool’s allowed action set before deciding how it signs in. The most useful split is between read-only assistance, local workspace changes, command execution, and remote or destructive actions. Once those tiers are clear, map them to separate approval, logging, and revocation rules so that a higher-risk action does not inherit the same access as a low-risk suggestion.

Then require traceability that answers four questions: who initiated the request, what context the tool used, which action it attempted, and whether a human or policy gate approved it. That evidence matters because delegated activity is only governable if you can reconstruct what the tool did and why. For broader implementation guidance on secure AI coding workflows, AI Coding Agents Security Guide is the most direct internal reference.

At programme level, IAM teams should decide whether the tool uses human credentials, dedicated agent credentials, or a brokered identity pattern. The governance preference is usually for constrained, tool-specific access rather than shared developer sessions, because that makes offboarding, incident response, and privilege review much more precise. Agentic AI Identity Guide is especially relevant when the tool is acting on behalf of a person rather than merely suggesting code.

Risk and Threat Considerations

When a coding tool can execute commands or call external systems, the main risk is not just accidental misuse, it is delegated privilege abuse. A prompt injection, poisoned repository content, or over-scoped token can turn a helpful assistant into a path for destructive change, secret exposure, or unauthorized remote action.

Failure mechanism: The tool inherits access that is broader than the specific task requires, then uses that access at runtime without sufficient approval, command filtering, or environment separation. In practice, that can let an attacker influence the tool through code, prompts, or connected services and cause actions the developer did not intend.

Impact: The result can be code tampering, credential leakage, cloud or repository abuse, and production-side damage with poor attribution. The closer the tool sits to source control, terminals, and external APIs, the more important it is to limit what it can touch and to preserve an auditable trail of every action.

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, OWASP Non-Human Identity Top 10 and OWASP API Security Top 10 address the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Agentic AI Top 10 ASI03 — Identity & Privilege Abuse AI coding tools acting on behalf of developers create delegated privilege risk.
ASI02 — Tool Misuse Terminal execution and external tool calls are the core misuse surface here.
Recommendation — Restrict agent actions to the minimum approved runtime privileges. Gate tool calls with allowlists, confirmations, and execution logging.
OWASP Non-Human Identity Top 10 NHI-05 — Overprivileged NHI Developer-facing coding tools can inherit excessive permissions and overreach.
NHI-07 — Long-Lived Secrets These tools often rely on tokens or secrets that outlive the task session.
Recommendation — Reduce the tool’s scope and remove any access not needed for the task. Replace persistent secrets with short-lived, task-bound credentials.
NIST SP 800-53 Rev 5 AC-6 — Least Privilege Delegated coding actions should be limited to the minimum required access.
IA-9 — Identification and Authentication (Service) The tool may authenticate as a service or agent rather than a human user.
Recommendation — Apply least privilege to every tool and session capability. Use service-style authentication for non-human runtime access paths.
OWASP API Security Top 10 API5 — Broken Function Level Authorization External tool actions need explicit function-level authorisation at runtime.
Recommendation — Authorize each sensitive tool function before execution.

Practitioner Guidance

What to prioritise: Treat terminal execution and external tool invocation as the highest-risk capabilities, then decide whether the tool should have them at all. If the answer is yes, make those actions explicit, scoped, and separately reviewable rather than bundling them into a generic “developer assistant” policy.

What to verify: Confirm that the tool cannot silently expand its own permissions through inherited sessions, cached secrets, or overly broad API scopes. The control is working only if the action is constrained at the moment it is performed, not just when the tool is first enrolled.

What good looks like: The developer can delegate a narrow task, but the organisation can still say exactly which files were changed, which commands ran, which external calls were made, and what approval path existed for each.

Practitioner takeaway: The security objective is not to block AI assistance, it is to ensure that any delegated coding action remains bounded, attributable, and reversible before it can affect code, systems, or secrets.