They should govern pipelines as privileged systems with explicit access boundaries, secret handling rules, and artifact integrity checks. A pipeline is not just automation, it is a trusted path into production. If attackers can alter builds or steal pipeline credentials, they can turn delivery tooling into an exposure channel.
Why CI/CD Pipelines Need Privilege Boundaries, Not Just Automation
When a pipeline can deploy, sign, publish, or mutate infrastructure, it behaves like a high-trust system and should be treated that way. The practical question is not whether the pipeline is automated, but whether its authority is bounded, observable, and recoverable when credentials, runners, or build steps are compromised.
That means organisations need to define what the pipeline may touch, which identities it may use, and which steps require stronger controls than ordinary build execution. A pipeline that can reach production, release artifacts, or third-party package registries is part of the security boundary, so its permissions and trust assumptions must be explicit.
Artifact integrity is just as important as access control. If build outputs can be altered, substituted, or promoted without provenance, the delivery system becomes a channel for tampering rather than a safeguard.
How Attackers Turn Delivery Tooling into an Exposure Channel
CI/CD abuse usually starts with one of three breakpoints: secret exposure, workflow poisoning, or compromised trust in a build dependency. Once an attacker controls a token, runner, or maintainer path, they can often observe variables, modify steps, or inject code into a release path without needing broad environment access.
That is why pipeline risk is rarely confined to the pipeline itself. A leaked token can expose repository secrets, a compromised action can exfiltrate cloud credentials, and a malicious build step can create a durable foothold in downstream systems. SLSA is useful here because it frames build provenance and artifact integrity as first-class controls, not optional hardening.
The attack path often depends on trust that has become too broad over time. Reused credentials, long-lived secrets, and unchecked third-party actions all expand the blast radius, especially when the same pipeline can promote code across environments or publish signed artifacts.
What Organisations Should Put in Place First
Start by separating build authority from deployment authority. Pipelines should use the minimum credentials needed for each stage, with short-lived access where possible and no standing secrets in jobs that do not require them. Build, test, publish, and deploy should not all inherit the same privilege set.
Next, protect the trust inputs that make a pipeline executable. That includes pinned dependencies, protected branches, reviewer-controlled workflow changes, and strict handling for signing keys, publishing tokens, and cloud credentials. A useful implementation reference is NHIMG’s CI/CD Pipeline Identity Security Guide, which focuses on federation, token permissions, and build trust boundaries.
Finally, treat secrets and artifacts as separate control problems. Secret storage, rotation, and disclosure detection address one failure mode; artifact signing, checksum verification, and provenance verification address another. NHIMG’s Guide to the Secret Sprawl Challenge is directly relevant when the main weakness is credentials left in the wrong place or left valid too long.
Risk and Threat Considerations
CI/CD becomes dangerous when the pipeline can authenticate as a trusted publisher, a deployer, or a secrets-bearing automation path. In that state, compromise is not limited to code delivery, because the attacker may also gain access to production credentials, signing material, or downstream administrative interfaces.
Failure mechanism: Attackers typically exploit excessive pipeline privilege, exposed secrets, untrusted third-party actions, or poisoned workflow inputs to run arbitrary steps, steal credentials, or replace build outputs with attacker-controlled artifacts.
Impact: The result can be silent release tampering, cloud or registry compromise, credential reuse across environments, and a supply-chain incident that propagates beyond the original repository.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
SLSA, NIST SP 800-53 Rev 5 and OWASP ASVS set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| SLSA | Supply-chain Levels for Software Artifacts | CI/CD trust depends on build provenance and artifact integrity. |
| Recommendation — Adopt provenance and verification requirements before promoting build outputs. | ||
| NIST SP 800-53 Rev 5 | IA-5 — Authenticator Management | Pipeline secrets and tokens need lifecycle control to limit exposure. |
| IA-9 — Service Identification and Authentication | CI/CD jobs, runners, and deployment services authenticate as non-human actors. | |
| AC-6 — Least Privilege | Pipelines should only receive the permissions needed for each stage. | |
| Recommendation — Rotate and revoke pipeline credentials on a short lifecycle. Authenticate pipeline services with scoped non-human identities. Split build, test, publish, and deploy permissions by stage. | ||
| OWASP ASVS | V15 — Secure Coding and Architecture | Workflow and build trust boundaries are part of application architecture hardening. |
| Recommendation — Design pipeline trust boundaries as part of secure architecture. | ||
Practitioner Guidance
What to verify: Confirm that each pipeline stage has its own identity, its own allowed actions, and its own credential scope. If a test job can also publish or deploy, the control design is already too loose.
Decision rule: If a pipeline secret can authenticate outside the build system, treat it as a production credential and prioritise rotation, scope reduction, and provenance checks before expanding pipeline features.
What good looks like: Workflow changes require review, secrets are short-lived and revocable, artifacts are signed and verified, and failed integrity checks stop release promotion automatically.
Practitioner takeaway: The core objective is not to make delivery slower, but to make every high-trust pipeline action constrained enough that compromise produces a limited, detectable blast radius rather than a production-wide exposure.
Related resources from NHI Mgmt Group
- How do organisations reduce false positives in secret detection pipelines?
- What should organisations do when CI/CD pipelines carry application risk forward?
- What do organisations get wrong about machine secrets in CI/CD pipelines?
- What should teams do when AI agents become part of the attack surface?