Subscribe to the Non-Human & AI Identity Journal

CI/CD privilege boundary

A CI/CD privilege boundary is the point where untrusted repository content meets elevated execution rights. If that boundary is weak, a build or review workflow can become a route from ordinary contribution activity to token exposure, repository compromise, or supply-chain publishing.

Expanded Definition

A CI/CD privilege boundary is the control line between ordinary code contribution and the elevated permissions used by build agents, deployment jobs, signing steps, release automation, and artifact publishing. In NHI security, the boundary matters because repositories, runners, secrets stores, and cloud identities often intersect there, creating a high-value path for token theft or workflow abuse.

Definitions vary across vendors on whether the boundary is the pull request event, the runner runtime, the deployment approval gate, or the secret injection point. NHI Management Group treats it as the first moment untrusted repository content can influence an execution context that can access secrets or production systems. That distinction is important because the risk is not just code execution, but authority transfer.

Standards work is still evolving, but the OWASP Non-Human Identity Top 10 frames this as a privileged identity exposure problem, not merely a DevOps hygiene issue. The most common misapplication is treating a pull request review as a safe control when the same workflow still exposes tokens, signing keys, or cloud roles to attacker-influenced inputs.

Examples and Use Cases

Implementing a CI/CD privilege boundary rigorously often introduces friction, because stronger isolation can slow releases and require more explicit approvals, but that tradeoff is usually preferable to granting broad automation rights by default. The boundary should be visible in how jobs are authenticated, what secrets they can reach, and which repository events can trigger privileged execution.

  • A GitHub Actions workflow runs on pull requests from forks without access to production secrets, while a separate protected workflow handles releases after review. See NHIMG’s CI/CD pipeline exploitation case study for how weak separation becomes a compromise path.
  • A build job uses short-lived credentials only after an approval gate, rather than storing long-lived cloud keys in runner variables. This aligns with the principle behind OWASP Non-Human Identity Top 10 guidance on secret exposure and privileged automation.
  • An organisation isolates release signing into a dedicated workflow that cannot be modified by the same commit that triggers it, reducing the chance of self-authorising malicious changes. NHIMG’s Reviewdog GitHub Action supply chain attack illustrates why action integrity matters.
  • A deployment pipeline uses distinct identities for test, staging, and production, so a compromise in lower environments does not automatically cross into production publishing.
  • An internal monorepo permits contribution from many developers, but only a narrow release job can access artifact signing material and registry publish rights.

Why It Matters in NHI Security

CI/CD privilege boundaries matter because pipeline identities are often overpowered, under-monitored, and tightly connected to secrets, artifacts, and cloud control planes. When the boundary is weak, an attacker does not need direct production access; they only need a path to influence a job that already has it. NHIMG research shows that only 44% of organisations are currently using a dedicated secrets management system, which means many pipelines still rely on ad hoc secret handling at the exact point where privilege should be constrained.

The operational consequence is broader than a single leaked token. A compromised runner, poisoned dependency, or malicious workflow change can expose signing keys, cloud credentials, or registry access and then persist through downstream automation. That is why NHI security teams treat the boundary as part of identity governance, not just CI configuration. The Guide to the Secret Sprawl Challenge is especially relevant where secrets are copied into pipeline variables, shared across jobs, or left recoverable after execution.

Organisations typically encounter this term only after a build runner, release workflow, or package publish event has already been abused, at which point the privilege boundary becomes operationally unavoidable to define and enforce.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-02 Covers secret exposure and privileged NHI paths inside CI/CD workflows.
NIST CSF 2.0 PR.AC-4 Least privilege and access control apply directly to pipeline identities.
NIST Zero Trust (SP 800-207) Zero trust requires each pipeline action to be explicitly authenticated and authorised.

Reduce pipeline secret exposure and constrain workflow identities to the minimum needed.