Use immutable pinning, trusted provenance checks, and pull request review for every executable dependency in the pipeline. Mutable tags and indirect package references should be treated as unapproved access paths until they are bound to a known commit or signed release. That reduces the chance that a compromised upstream artefact can execute inside your build environment.
Why This Matters for Security Teams
Dependency compromise is no longer just a software supply chain issue. When a build system accepts unpinned packages, mutable tags, or transitive references without verification, it creates an execution path for attackers to influence code before it ever reaches production. That makes CI pipelines a high-value target for credential theft, backdoor insertion, and poisoned build artefacts. Current guidance increasingly treats provenance and integrity as first-class security controls, not optional developer convenience.
The practical concern is that CI often has broader access than application runtime, including signing keys, artifact registries, and deployment credentials. If a malicious dependency is allowed into the pipeline, the build environment can become the place where trusted output is silently contaminated. NIST SP 800-53 Rev 5 Security and Privacy Controls is a useful baseline for thinking about this through the lens of configuration management, supply chain protection, and least privilege. In practice, many security teams encounter dependency risk only after a compromised package has already been cached, built, or promoted, rather than through intentional review of the software intake path.
How It Works in Practice
Effective prevention starts before the package manager resolves anything. Security teams should require immutable version pinning, verified source integrity, and controlled approval for every executable dependency, including transitive ones. That means treating a dependency reference as untrusted until it is tied to a known commit, signed release, or approved artefact in a trusted repository.
A workable control set usually includes:
- Pin direct dependencies to exact versions or commit hashes, then block floating ranges and mutable tags.
- Verify provenance using signed releases, checksums, or attestations from the build origin.
- Scan dependency trees continuously so indirect packages are reviewed with the same rigor as direct imports.
- Separate dependency admission from build execution so approval happens in a controlled gate, not inside the pipeline job.
- Restrict CI service identities so a compromised dependency cannot reach secrets, registries, or deployment permissions.
For software chains that support it, provenance frameworks and signed build metadata help teams distinguish a legitimate package update from a hijacked publishing event. Where available, policy engines should reject unsigned artefacts and unknown publishers by default. The NIST SP 800-53 Rev 5 Security and Privacy Controls family maps well to this approach because it reinforces supply chain protection, access control, and secure configuration as operational controls rather than documentation exercises. These controls tend to break down when build teams rely on ad hoc package mirrors, shared caches, and exception-based approvals because provenance checks no longer represent the package that actually executes.
Common Variations and Edge Cases
Tighter dependency controls often increase build friction, requiring organisations to balance delivery speed against the risk of admitting untrusted code. That tradeoff is especially visible in polyglot repositories, legacy package ecosystems, and environments with heavy transitive dependency use.
Best practice is evolving for generated code, internal packages, and vendor-provided SDKs. Some organisations sign every internal artefact and enforce provenance at publish time, while others only gate external packages. There is no universal standard for this yet, so the right model depends on the blast radius of the CI environment and the maturity of the software supply chain program. The OWASP Top 10 for Large Language Model Applications is not a dependency control standard, but it illustrates a useful parallel: untrusted inputs become dangerous when they are allowed to influence execution without validation. That same principle applies to build-time artefacts and scripts.
Edge cases also matter for monorepos, lockfile regeneration, and emergency hotfixes. If a pipeline can regenerate manifests automatically, teams need a separate approval rule for the changed lockfile itself, not just the source code diff. Where external publishing systems are unreliable or unsigned, security teams may need to quarantine updates until a trusted maintainer republishes them. The guidance becomes weaker in air-gapped or heavily mirrored environments because the organisation may lose visibility into the original source of the artefact and has to compensate with stronger internal attestations.
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 MITRE ATLAS address the attack and risk surface, while NIST CSF 2.0, NIST AI RMF and NIST AI 600-1 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | PR.DS-6 | Protected data and artefact integrity are central to blocking tampered dependencies. |
| OWASP Agentic AI Top 10 | CI systems increasingly execute autonomous tooling that can consume malicious inputs. | |
| NIST AI RMF | Supply chain integrity and governance principles support controlled dependency intake. | |
| MITRE ATLAS | Adversarial manipulation of model and code supply chains follows the same trust abuse pattern. | |
| NIST AI 600-1 | GenAI systems depend on trusted software inputs and controlled tool execution paths. |
Treat pipeline automation as an execution surface and restrict what untrusted inputs can trigger.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 18, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org