When dependency versions are left flexible, a malicious package can enter production through a routine update rather than a visible code change. That breaks the assumption that the build pipeline only consumes trusted software. In practice, pinning, approval workflows, and provenance checks are the controls that stop a compromised package from becoming an application compromise.
Why This Matters for Security Teams
When dependency updates are not pinned, the build is no longer deterministic. A routine patch, transitive dependency refresh, or resolver change can introduce code that was never reviewed, signed off, or tested against the application’s trust assumptions. That matters most in high-trust applications where package installation, CI/CD runners, and deployment tooling already have broad access to secrets and production paths. A single unpinned update can turn software supply chain drift into direct compromise, as seen in incidents covered by NHI Management Group research such as the LiteLLM PyPI package breach.This is not just a software engineering hygiene issue. It is an identity and trust boundary issue, because modern build systems often execute third-party code with the same privileges used to fetch secrets, publish artifacts, or sign releases. NIST’s NIST Cybersecurity Framework 2.0 emphasizes supply chain risk and change control as core governance functions, but many teams still treat dependency drift as low-risk maintenance. In practice, many security teams discover package substitution only after credentials have been exposed or downstream customers have already pulled the tainted release.
How It Works in Practice
Pinned dependencies create a reproducible software bill of materials for the build pipeline. Instead of asking for “latest compatible,” the application locks exact versions, hashes, or signed artifacts so the pipeline consumes the same inputs every time. That reduces the chance that a malicious maintainer action, namespace takeover, or dependency confusion event slips in through a benign-looking update. NHI Management Group’s broader guidance on non-human identity governance is relevant here because the same control failure pattern appears in secrets handling and build identities, as discussed in the Ultimate Guide to Non-Human Identities.Operationally, strong programs usually combine four controls:
Pin direct and transitive dependencies to approved versions, not floating ranges.
Require provenance checks and signature verification before a build can consume a package.
Use approval workflows for dependency bumps so security review happens before merge, not after release.
Scan lockfiles, build manifests, and artifact metadata so updates are traceable back to an owner and source.
This is especially important when build agents hold access to artifact repositories, cloud credentials, or signing keys. If a compromised package runs inside that environment, it can read secrets, alter outputs, or poison downstream pipelines. The practical lesson is that pinning is not only about version stability; it is about constraining what the pipeline is allowed to trust at runtime. These controls tend to break down in fast-moving monorepos with automated merge bots and permissive refresh policies, because version changes can land faster than review can detect supply chain risk.
Common Variations and Edge Cases
Tighter pinning often increases maintenance overhead, requiring organisations to balance update velocity against release safety. That tradeoff is real, especially in polyglot environments where lockfile semantics differ across ecosystems and some packages intentionally float patch versions for compatibility. Best practice is evolving, but current guidance suggests that “fully unpinned” is the risky outlier, not the default mature state.Edge cases matter. Security-critical libraries, deployment tooling, and anything with release-signing or secrets access should usually be pinned more tightly than low-risk application libraries. For ephemeral experimentation environments, shorter-lived flexibility may be acceptable if the environment cannot reach production secrets and is rebuilt from trusted images. But even then, the build identity should be scoped narrowly and the source should still be verified. The risk rises sharply when organisations rely on broad wildcard ranges, automatic dependency bots without policy gates, or ad hoc manual updates that bypass review. NHI Management Group’s research notes that the Schneider Electric credentials breach is a reminder that compromised trust paths often surface first through identity exposure rather than obvious application errors.
There is no universal standard for this yet, but the practical baseline is clear: pin what touches trust boundaries, verify what enters the pipeline, and treat every dependency change as a security decision, not just a maintenance task.
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, OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and 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-01 | Unpinned deps let untrusted software enter trusted build paths. |
| OWASP Agentic AI Top 10 | A2 | Autonomous build agents can amplify supply-chain drift and tool misuse. |
| CSA MAESTRO | T2 | Covers supply-chain trust in agentic and automated software workflows. |
| NIST AI RMF | GOVERN | Governance is needed for trusted but dynamically changing software inputs. |
| NIST CSF 2.0 | PR.IP-3 | Configuration and change control address unmanaged dependency drift. |
Constrain agent tool access and require policy checks before dependency changes land.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 2, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org