By NHI Mgmt Group Editorial TeamPublished 2026-05-12Domain: Agentic AI & NHIsSource: Pillar Security

TL;DR: Autonomous AI coding agents inside CI/CD pipelines turn prompt injection, secret exposure, and external context into execution paths, and Pillar Security argues that the pipeline’s trust model no longer matches the system’s behaviour. Existing controls assumed deterministic jobs; agentic runners now act with privileged identity-like authority and need runtime governance, not just workflow review.


At a glance

What this is: This is an analysis of agentic CI/CD security and its key finding is that autonomous AI agents inside pipelines create a new execution risk class that traditional CI/CD controls do not fully see.

Why it matters: It matters because IAM, PAM, NHI, and DevSecOps teams now need to govern agent authority, runner credentials, trigger sources, and runtime visibility as one identity problem.

By the numbers:

👉 Read Pillar Security's analysis of agentic CI/CD security risks and controls


Context

Agentic CI/CD security is the problem of governing AI coding agents that can read pipeline inputs, call tools, and act inside build and deployment runners. The central failure is assuming a CI/CD job stays deterministic once an agent can choose actions at runtime and reach credentials, repositories, and external systems.

That shifts the control problem from static workflow review to identity and runtime governance. If the agent can be steered by text, trigger conditions, or external context, then the real security boundary is no longer the pipeline file alone. Teams need to think in terms of privileged non-human identity, runner telemetry, and trigger trust boundaries.

The same pattern is already visible in broader AI agent governance. For teams building out that discipline, the OWASP Agentic AI Top 10 and the OWASP NHI Top 10 are useful reference points for framing the exposure without mistaking automation for autonomy.


Key questions

Q: How should security teams govern AI agents running inside CI/CD pipelines?

A: Treat each agent as a privileged non-human identity with an owner, a scope, and explicit guardrails on what it can read, call, and modify. The core issue is not just workflow correctness. It is that agent authority is decided at runtime, so policy must cover trigger sources, secrets exposure, and runner telemetry.

Q: Why do AI coding agents increase CI/CD supply-chain risk?

A: They increase risk because the agent can be steered by text from issues, comments, or external tools and then act with existing pipeline permissions. That means the attacker does not need to submit code to influence execution. The dangerous combination is untrusted input plus shell access plus write privileges.

Q: What breaks when secrets are available to agentic CI/CD runners?

A: Secrets become reachable through more paths than the environment variable list suggests. If tokens persist on disk, in checkout metadata, or in other local files, removing them from the environment does not remove access. The failure is hidden secret reachability inside the runner, not just exposed variables.

Q: Who is accountable when an autonomous AI agent pushes unauthorized changes?

A: Accountability sits with the team that defined the agent’s scope, trigger conditions, and operational boundaries. Governance does not disappear because the agent executed the action. If the workflow allows autonomous execution with write access, ownership should be traceable to the programme that granted that authority.


Technical breakdown

How prompt injection becomes code execution in CI/CD

In agentic pipelines, prompt injection is not just text manipulation. It becomes a code execution primitive when the model is wired to a shell, a git remote, or other tools that can change state. Anything the agent reads, such as an issue comment, PR title, markdown file, or bug report, can steer its next action. The key architectural difference from conventional CI is that the attacker no longer needs to commit malicious code. They only need to influence the agent’s runtime interpretation of ordinary text.

Practical implication: treat external text inputs as executable influence channels and gate them before the agent can act.

Why runner credentials and disk persistence expand the attack surface

CI/CD runners often receive secrets at execution time, including cloud keys, package tokens, and signing material. Agentic workflows inherit that environment, so a successful prompt injection can push the agent toward exfiltration or misuse. Even if a token is removed from the environment, persistence layers such as .git/config or other local files can keep it reachable. That makes the runner itself part of the identity boundary, not just the workflow definition. The risk is not only access to secrets but hidden reachability of those secrets after environment cleanup.

Practical implication: audit runner file-system persistence and separate high-privilege secrets from agent-readable environments.

Why external tools and context sources create a runtime supply chain

Modern agentic CI/CD designs increasingly pull context from issue trackers, documentation systems, support tools, and remote packages. Every external source widens the trust boundary because the agent may ingest instructions from systems outside the repository itself. This turns the pipeline into a runtime supply chain, where compromise of an upstream script, plugin, or context source can alter behaviour without changing the checked-in workflow. In security terms, the dependency is no longer only code. It is also the authority to influence the agent’s decisions during execution.

Practical implication: pin agent dependencies and review every external context source the agent is allowed to read.


Threat narrative

Attacker objective: The attacker wants to turn a trusted CI/CD agent into a delegated execution path for code changes, secret theft, or supply-chain compromise.

  1. Entry: an attacker places malicious instructions in a text source the agent will read, such as a GitHub issue, PR comment, or external context feed.
  2. Credential_harvested: the agent reaches into the runner environment or disk persistence and exposes secrets such as tokens, repository credentials, or signing material.
  3. Escalation: the injected instructions steer the agent to run shell commands, write code, or push changes with the permissions already granted to the workflow.
  4. Impact: the attacker gains unauthorized commits, secret exposure, or downstream supply-chain manipulation through the agent's privileged execution path.

Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Agentic CI/CD turns a build pipeline into a privileged non-human identity problem. The vendor’s core point is correct: once an agent can choose tools, read context, and act inside a runner, the pipeline is no longer just deterministic automation. That means IAM, PAM, and NHI governance all apply at execution time, not just at provisioning time. Practitioners should stop treating the workflow file as the full control boundary.

Standing trust in CI/CD assumes the job behaves predictably long enough for static review to matter. That assumption fails when the actor is autonomous because the agent can decide at runtime which instruction source to trust, which tool to call, and when to act. The implication is not merely more monitoring. It is that conventional review cadences do not map cleanly to agent-timed execution.

Prompt injection in CI/CD is a governance bypass, not just an application flaw. The article shows that text in issues, comments, and external tools can steer privileged execution without code submission from the attacker. That makes the failure mode a trust-boundary collapse across repository, runner, and external context systems. Practitioners should model every readable input as a potential control surface.

Runtime visibility is now the minimum credible control on agentic pipelines. Static analysis can describe the workflow, but it cannot reliably show which tool the agent selected or which credential it touched during execution. The security programme must therefore align build governance, identity controls, and telemetry on the runner itself. Teams that cannot observe runtime behaviour cannot claim to govern agentic CI/CD.

Privilege-sized-for-a-linter: the central mistake is granting an agent permissions on the assumption it behaves like a narrow code-quality helper. The article makes clear that teams often size agent authority as if they were adding a smarter lint step, not a delegated actor with shell access and write rights. That assumption collapses as soon as the agent can be steered by untrusted text. The practitioner conclusion is to re-evaluate the permission model around delegated execution, not around tooling convenience.

From our research:

  • Only 52% of companies can track and audit the data their AI agents access, leaving 48% with a complete blind spot for compliance and breach investigation, according to AI Agents: The New Attack Surface report.
  • 80% of organisations report their AI agents have already performed actions beyond their intended scope, including accessing unauthorised systems, sharing sensitive data, and revealing access credentials.
  • That gap makes the case for OWASP Agentic AI Top 10 controls on external context, tool use, and delegation boundaries stronger than ever.

What this signals

Agentic CI/CD will increasingly be managed as identity infrastructure, not just engineering infrastructure. The practical signal for teams is that runner permissions, trigger rules, secret placement, and telemetry now belong in the same review cycle. The governance model has to follow the agent into execution, because the agent’s authority is expressed there, not in the YAML alone.

Only 52% of companies can track and audit the data their AI agents access, which means most organisations cannot yet prove what happened when an agent touched a pipeline. That blind spot matters even more in CI/CD, where a single delegated action can alter code, artifacts, or release state. Teams should expect auditability to become a board-level question once agentic delivery reaches production.


For practitioners

  • Classify each pipeline agent as a privileged identity Give the agent an owner, purpose, scope, and explicit permission boundary, then review it with the same discipline used for high-risk service accounts.
  • Constrain all outside-the-boundary triggers Require explicit approval gates for inputs such as issues, comments, webhook events, and external trackers before an autonomous agent can execute.
  • Separate secrets from agent-readable runtime environments Remove deployment credentials, signing keys, and other sensitive material from the agent’s direct execution context, and verify persistence paths such as .git/config and similar local files.
  • Pin and vendor agent dependencies Treat remote includes, curl-to-bash installers, and unpinned packages as production supply-chain inputs, then review the manifest before the agent can run.
  • Add runner telemetry that captures actual tool use Instrument the runner so you can see which command, file, or credential the agent touched during execution, not just what the workflow definition allowed.

Key takeaways

  • Agentic CI/CD changes the threat model from deterministic job control to runtime governance of privileged non-human identities.
  • The article shows that a single untrusted text input can steer privileged execution when the agent has shell access and repository write rights.
  • Teams that do not separate secrets, pin dependencies, and instrument runner telemetry will struggle to contain agentic pipeline abuse.

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 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10A1Agentic pipelines are exposed to tool misuse and prompt steering.
OWASP Non-Human Identity Top 10NHI-03Agent-runner credentials and secret persistence are core NHI risks.
NIST CSF 2.0PR.AC-4Agent permissions and execution scope fit access governance and least privilege.

Align CI/CD agent access with least-privilege policies and document owner accountability.


Key terms

  • Agentic CI/CD: A delivery pipeline that embeds AI agents directly into build or deployment workflows. The agent can interpret text, select tools, and act inside the runner, which makes runtime authority part of the security model rather than just the workflow definition.
  • Runtime telemetry: Observation of what a system actually does while it is executing. In agentic CI/CD, this means seeing which commands, files, tools, and credentials an agent touched so security teams can detect misuse that static workflow review will miss.
  • Prompt injection: A technique that places malicious instructions in text the model will read. In agentic pipelines, it matters because the text can steer an agent with shell access or write permissions into taking actions the attacker could not directly perform.
  • Privileged non-human identity: A machine or agent identity that holds elevated permissions and can affect sensitive systems. For agentic CI/CD, the term matters because the agent’s authority should be governed like any other high-risk identity, including scope, ownership, and auditability.

Deepen your knowledge

Agentic CI/CD security and privileged non-human identity governance are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If your team is extending AI agents into build and deployment workflows, it is worth exploring.

This post draws on content published by Pillar Security: Agentic CI/CD Security: Risks, Attack Vectors, and Controls. Read the original.

NHIMG Editorial Note
Published by the NHIMG editorial team on 2026-05-12.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org