Package resolution is the process a package manager uses to decide which artifact satisfies a dependency request. It becomes a security control when registry trust, version precedence, and scope rules determine whether internal or public code is allowed into the build.
Expanded Definition
Package resolution is the decision layer that selects which dependency artifact a package manager will install when multiple candidates exist. In NHI and software supply chain contexts, that decision is not just operational convenience. It becomes a control point for registry trust, version precedence, namespace scope, and whether internal packages can be displaced by public ones.
Definitions vary across vendors because some tools treat resolution as a purely deterministic lookup, while others fold in policy checks, lockfile enforcement, and provenance validation. For governance, the important distinction is that resolution happens before code executes, so it shapes the trust boundary for build pipelines and AI agent runtimes that auto-install libraries or plugins. That makes it adjacent to dependency pinning, but not identical to it. Pinning constrains version choice; resolution decides which artifact source wins when more than one match exists. NIST guidance on software and supply chain controls, including NIST SP 800-53 Rev 5 Security and Privacy Controls, is often used to anchor this decision to approved sources and integrity checks.
The most common misapplication is assuming a lockfile alone prevents unsafe resolution, which occurs when registry precedence or scope rules still allow an attacker-controlled package to satisfy the request.
Examples and Use Cases
Implementing package resolution rigorously often introduces build friction, requiring organisations to weigh faster dependency acquisition against tighter source control, deterministic builds, and slower exception handling.
- An internal package name exists in both a private registry and a public registry, and resolution must prefer the private source to avoid dependency confusion.
- A build agent installs plugins on demand, and resolution must enforce an allowlist so only signed or approved artifacts can be pulled during CI/CD.
- A team uses lockfiles to freeze versions, but resolution still needs registry pinning so a compromised mirror cannot substitute a different artifact hash.
- An AI agent attempts to install a tool dependency at runtime, and policy requires the resolver to reject packages outside the organisation’s scoped namespace.
- A breach write-up such as the LiteLLM PyPI package breach is used to review how package selection, distribution trust, and consumer assumptions can fail when supply chain checks are weak.
For broader context on why package choice matters in modern NHI-heavy environments, the Ultimate Guide to NHIs — The NHI Market frames how machine identities, secrets, and software delivery often intersect in the same automation paths.
Why It Matters in NHI Security
Package resolution becomes an NHI security issue because build systems, deployment bots, and AI agents routinely act with credentials, tokens, and privileged registry access. If resolution is weak, those identities can be leveraged to import untrusted code, leak secrets, or bypass internal dependency standards. That is why this term sits close to secret hygiene, supply chain integrity, and Zero Trust enforcement rather than traditional developer convenience.
NHI Mgmt Group reports that 96% of organisations store secrets outside of secrets managers in vulnerable locations including code, config files, and CI/CD tools, which makes dependency workflows especially sensitive when resolution can reach external ecosystems. In practice, the issue is not only what is installed, but which identity and policy path allowed that artifact to be accepted. A resolver that silently prefers public packages can turn a routine build into a compromise path even when the application code is unchanged.
Organisations typically encounter the consequences only after a dependency incident, at which point package resolution becomes operationally unavoidable to address.
Related resources from NHI Mgmt Group
- How should teams reduce risk from malicious npm package installs?
- When does a compromised developer package become a major security risk?
- When should teams treat a package compromise as a cloud security event?
- How should security teams protect npm and package publishing workflows from identity compromise?