Treat the pipeline as part of the attack surface and the governance boundary. Control who can change builds, who can inject secrets, and which deployment paths can promote insecure artefacts. If the pipeline is trusted implicitly, it becomes the fastest path from a small coding issue to broad production exposure.
Why This Matters for Security Teams
CI/CD pipelines are not just delivery plumbing. They decide which code is built, which secrets are exposed to builds, which artefacts are promoted, and which runtime configurations are trusted. When that path is weak, a small source control issue can become a production incident without ever touching a user-facing control. That is why current guidance treats pipelines as part of the security boundary, not as a neutral transport layer. NIST’s Cybersecurity Framework 2.0 is useful here because it emphasises governance, identity, and change control across the lifecycle, not only at deployment time. NHIMG research shows how often non-human paths are already the failure point: in The 2024 ESG Report: Managing Non-Human Identities, 72% of organisations said they have experienced or suspect a breach of non-human identities. For CI/CD, that matters because build systems, deploy keys, signing services, and automation tokens are all NHIs with broad reach. In practice, many security teams encounter pipeline abuse only after a compromised token has already been used to promote an insecure artefact into production.How It Works in Practice
The practical goal is to reduce trust in the pipeline and make every privileged step explicit, short-lived, and attributable. That starts with separating source change approval from build execution, then binding each stage to a distinct workload identity rather than a shared credential set. Build jobs should authenticate as machines with scoped identity, not as reusable service accounts that outlive the job. Where possible, use ephemeral credentials issued just for the task, then revoke them automatically when the job ends. A sound operating model usually includes:- Protected branches and signed commits for source integrity
- Isolated build runners with minimal network reach
- Short-lived secrets injected only at runtime, never stored in logs or artefacts
- Artifact signing and verification before promotion
- Policy checks that block deployment when code, dependency, or configuration risk exceeds threshold
Common Variations and Edge Cases
Tighter pipeline control often increases delivery friction, requiring organisations to balance deployment speed against blast-radius reduction. That tradeoff is real, especially for teams that release many times a day or rely on ephemeral preview environments. Best practice is evolving, but the current consensus is that speed should come from automation and policy, not from broad credential reuse. Edge cases usually appear in three places. First, legacy pipelines may depend on long-lived deploy keys that cannot be rotated quickly without downtime. Second, monorepos and multi-team build farms can make it hard to apply different trust levels to different artefacts. Third, external CI services can introduce hidden trust dependencies when artefact signing, secret storage, and runner isolation are managed outside the organisation’s own controls. A useful rule is to classify every pipeline credential by purpose and lifespan. If it can build, it should not automatically deploy. If it can deploy, it should not be able to rewrite source. If it can access secrets, it should only receive them for the exact job that needs them. That approach aligns with the Top 10 NHI Issues and the broader lesson from NHIMG: pipelines fail most often when organisations assume automation is trustworthy simply because it is internal.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 and CSA MAESTRO address the attack and risk surface, while NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-03 | Pipeline secrets and deploy credentials need rotation and short lifespan. |
| NIST CSF 2.0 | PR.AC-4 | CI/CD access must be limited and verified before promotion actions. |
| CSA MAESTRO | AIC-02 | Automated delivery chains need governance over machine-to-machine trust and runtime policy. |
Issue ephemeral pipeline secrets, rotate them aggressively, and revoke any credential tied to a job on completion.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on June 9, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org