Join our Newsletter — 33% off our NHI Course
Home FAQ Governance, Ownership & Risk When should organisations use dependency exclusions or overrides…
Governance, Ownership & Risk

When should organisations use dependency exclusions or overrides for transitive packages?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated August 27, 2026 Domain: Governance, Ownership & Risk

Organisations should use exclusions or overrides when a nested package is unnecessary, vulnerable, or pulling in an incompatible version. Exclusions remove specific dependencies from a tree, while overrides force a known safe version across the build. Both controls work best when paired with scanning and change review so fixes do not create new compatibility issues.

Why This Matters for Security Teams

Dependency exclusions and overrides are not just build hygiene. They are a control point for reducing exposure from transitive packages that security teams did not choose directly but still inherit. When a package tree pulls in a vulnerable library, an abandoned component, or a conflicting version, the build can become unsafe even if the top-level dependency looks clean. That is why the issue belongs in secure software supply chain governance, not only in development troubleshooting.

Current guidance from NIST SP 800-53 Rev 5 Security and Privacy Controls treats software integrity and configuration control as operational duties, and NHI Mgmt Group’s Ultimate Guide to NHIs shows why this matters: 79% of organisations have experienced secrets leaks, and 77% of those incidents caused tangible damage. The same pattern appears in package ecosystems, where a nested dependency can introduce secret exposure, runtime instability, or a security bypass without any change to the application’s own code.

Security teams often get this wrong by treating exclusions as a permanent fix rather than a controlled exception. In practice, many teams encounter the real failure only after a transitive package has already widened the attack surface or broken the release pipeline.

How It Works in Practice

Use an exclusion when a transitive dependency is unnecessary for the application to function, or when removing it eliminates a known risk without harming behaviour. Use an override when the dependency is required, but the build must be pinned to a safe, compatible version. The key distinction is simple: exclusions remove; overrides replace. Both should be tracked as explicit security decisions, not ad hoc build edits.

In mature release pipelines, teams usually apply these changes after software composition analysis flags a vulnerable tree, then confirm whether the dependency is actually used at runtime. If it is not, exclusion is often cleaner. If it is used, override the version and test for compatibility. This is especially important in ecosystems where parent packages lag on patching or where transitive dependencies are locked to older branches. NIST’s configuration management guidance supports this kind of controlled change, because the security objective is not only to remove risk but to prevent unreviewed drift.

  • Exclude only when the package is truly unused or non-essential.
  • Override only to a version that has been tested in your environment.
  • Document the reason, expiry date, and owner for every exception.
  • Re-scan after every change to catch hidden compatibility or security regressions.

This pattern matters because transitive package risk is often invisible until a build fails, an application crashes, or a vulnerability scanner surfaces a buried component. NHIMG research on LiteLLM PyPI package breach and Hard-Coded Secrets in VSCode Extensions shows how third-party packages can turn a dependency decision into a broader compromise path. These controls tend to break down when teams lack lockfile discipline or when multiple build systems resolve dependencies differently across environments.

Common Variations and Edge Cases

Tighter dependency control often increases maintenance overhead, requiring organisations to balance rapid remediation against compatibility risk. That tradeoff is most visible when a vulnerable transitive package is deeply embedded in a framework, a shared library, or a monorepo with many downstream consumers. In those cases, a blunt override can stop the vulnerability but create runtime breakage, while an exclusion can remove a package that some edge path still needs.

Best practice is evolving, but current guidance suggests treating overrides as temporary risk reduction, not a substitute for upstream fixes. If the package is patched upstream, the override should be revisited quickly. If the package is unmaintained, the more durable answer may be replacement rather than repeated pinning. Teams should also watch for ecosystems where lockfiles, vendoring, or package manager behaviour can override local policy. That is where a change can look safe in one environment and fail in another.

In practice, dependency exclusions and overrides are most effective when paired with scanning, code review, and a clear exception workflow. They are less effective in fast-moving polyglot repositories, where the same component may be resolved by different tools and the approved version can drift silently across pipelines. The control is sound, but the environment has to be disciplined enough to keep it true.

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 address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-63, NIST Zero Trust (SP 800-207) and NIST AI RMF set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-03Transitive package fixes often require safe credential and secret handling.
NIST CSF 2.0PR.IP-2Dependency overrides are a secure configuration management activity.
NIST SP 800-63Package compromise can lead to credential misuse and identity abuse.
NIST Zero Trust (SP 800-207)SC-7Unexpected transitive packages can widen trust boundaries and lateral movement risk.
NIST AI RMFRisk-based review is needed when dependency changes affect build integrity.

Document dependency risk decisions and verify they reduce harm without creating new failure modes.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on August 27, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org