Unverified inputs can turn build systems into code execution paths for an attacker. A tampered package, script, or image may introduce trojaned logic at build time, leak secrets through logs, or alter deployment behavior after release. Once malicious content enters the pipeline, the compromise can spread to downstream consumers and production systems.
Why This Matters for Security Teams
When CI/CD accepts unverified artifacts or scripts, the pipeline stops being a controlled delivery path and becomes an execution surface. That matters because build systems often hold broad credentials, access to signing keys, and trust from downstream deployment tools. A single poisoned dependency, helper script, or container layer can compromise source integrity, release integrity, and operational trust at the same time.
This is not only a software supply chain issue. It is also an identity and privilege problem, because pipelines frequently run with standing access that is broader than the developers who triggered them. Controls such as source integrity checks, artifact provenance, and restricted execution align closely with NIST SP 800-53 Rev 5 Security and Privacy Controls, especially where organisations need to prove what was built, by whom, and from what inputs.
Practitioners often assume that a signed repository or trusted runner is enough, but the real failure usually happens one step earlier, when the pipeline fetches and executes content that has never been validated against policy.
How It Works in Practice
Unverified external content becomes dangerous because CI/CD systems are designed to automate trust decisions at speed. A package manager may pull a dependency from a public registry, a build job may download a shell script from a release page, or a deployment step may consume an image tag that was never pinned to a digest. If the pipeline does not verify origin, integrity, and policy, the system will execute whatever arrives first.
Good practice is to control the full path from source to release:
- Pin dependencies to trusted versions and check cryptographic hashes where possible.
- Require signed commits, signed tags, or equivalent provenance evidence for build inputs.
- Verify container images and artifacts before promotion, not only after deployment.
- Run build jobs with minimal credentials and isolate sensitive steps from untrusted code.
- Treat external scripts as code, with the same review, approval, and logging requirements.
For software supply chain assurance, the CISA software bill of materials guidance and SLSA provenance model are useful references for making artifact lineage and build integrity auditable. Where organisations already use policy-as-code, this should extend to build-time admission checks, not just runtime deployment gates. Best practice is evolving, but the direction is consistent: validate before execution, and preserve evidence that validation occurred.
These controls tend to break down in polyglot pipelines that mix private registries, ad hoc scripts, and manually approved exceptions because trust becomes fragmented across tools and no single policy engine sees the whole execution chain.
Common Variations and Edge Cases
Tighter artifact validation often increases build friction, requiring organisations to balance delivery speed against assurance. That tradeoff becomes sharper in fast-moving release pipelines, open-source-heavy projects, and partner-integrated build chains where external content changes frequently.
There is no universal standard for every pipeline pattern yet. For example, some teams can enforce strict allowlists and signature verification on all dependencies, while others need exception paths for legacy packages, air-gapped release processes, or vendor-supplied scripts. Current guidance suggests that exceptions should be explicit, time-bound, and logged, rather than handled as informal workarounds.
Edge cases also appear when the pipeline itself is multi-tenant or agentic. An AI-assisted developer workflow may fetch tools, generate scripts, or invoke build actions on behalf of a user, which raises the same verification problem in a new form: the system must distinguish approved automation from untrusted generated content. That intersection matters because agentic tools can amplify a small trust failure into repeated execution across many jobs.
For organisations handling sensitive data or regulated software, this also intersects with NIST CSF supply chain governance and, where relevant, OWASP guidance on AI and agentic risk. The practical rule is simple: if a pipeline step can execute code from outside the trusted boundary, that step needs provenance, policy, and least privilege, not assumptions.
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, NIST AI RMF and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | GV.SC | Supply chain governance covers trusted inputs and artifact provenance. |
| NIST AI RMF | GOVERN | AI-assisted pipelines need accountability and documented risk ownership. |
| OWASP Agentic AI Top 10 | A08 | Agentic tool use can execute untrusted actions in build workflows. |
| OWASP Non-Human Identity Top 10 | NHI-3 | Pipeline identities and automation tokens need controlled issuance and rotation. |
| NIST SP 800-53 Rev 5 | SI-7 | Integrity controls detect or prevent tampered code, scripts, and artifacts. |
Assign ownership for generated or agent-invoked build actions and require policy review.