Join our Newsletter — 33% off our NHI Course

What do teams get wrong when choosing open-source dependencies?

Teams often rely on convenience, community popularity, or a quick search result instead of verifying what the package actually contains. They may skip checking the source repository, contributor history, issue activity, or unresolved security problems. That shortcut creates blind trust in dependencies and makes it easier for attackers to exploit malicious uploads or package impersonation.

What teams overlook when they choose dependencies

Teams often treat dependency selection as a convenience decision instead of a security decision. The mistake is not just picking a popular package, it is assuming popularity implies maintenance, integrity, and safe provenance. A dependency can be useful and still be a weak trust choice if its ownership, release process, or history is opaque.

That is why the evaluation should extend beyond function and install count. Look at whether the package has an active source repository, credible maintainers, clear release discipline, and a track record that matches the risk of putting it into production.

One useful signal is whether the package lives in a supply chain ecosystem that already sees malicious uploads and impersonation attempts, which is why sources such as OpenSSF matter for teams comparing packages. In practice, the right question is not “is this library common?” but “would I still trust it if an attacker tried to imitate it tomorrow?”

Why source, maintainer, and security history matter

Good dependency selection depends on evidence, not assumptions. Teams should verify the repository behind the package, who can publish updates, whether maintainers are responsive, and whether prior issues or advisories were handled promptly. That matters because many package attacks succeed by exploiting blind trust in a package name, a search result, or a neglected maintainer profile.

The source history also tells you something about continuity. A package that has not been updated in a long time, has unresolved security reports, or has sudden maintainer turnover deserves more scrutiny than one with stable ownership and a visible review trail.

Where the dependency is part of a software delivery pipeline, the risk becomes more concrete, because the package can introduce code, transitive dependencies, or build-time behaviour into the trust boundary. For practical supply chain examples, see LiteLLM PyPI package breach and Nx Package Attack, 2,300+ Credentials Leaked, both of which show how malicious packages can turn trust in a dependency into direct exposure.

Security history also includes whether the package has been linked to secret leakage or repository abuse. A package should be judged as part of a broader ecosystem, not as a standalone artifact with no operational consequences.

How to choose dependencies with less blind trust

Teams make better choices when they treat each dependency as an ongoing trust relationship. That means checking package provenance, scanning the upstream repository, reviewing contributor behaviour, and understanding what the package will be allowed to do once installed. A package that is easy to adopt but hard to verify is usually too expensive in hidden risk.

It also helps to distinguish between functionality and dependency depth. Two packages may solve the same problem, but one may have fewer transitive dependencies, clearer release controls, and a smaller blast radius if something goes wrong. That makes it the safer option even if it is slightly less convenient.

  • Prefer packages with transparent ownership and visible maintenance activity.
  • Check whether the package is impersonation-prone, abandoned, or unusually broad in scope.
  • Review transitive dependency depth before approval.
  • Require a documented reason when a package is chosen mainly because it is popular.

For teams that want to compare choices against a security-minded ecosystem, FIRST is useful as a source of incident-response and coordination context, while NIST Cybersecurity Framework 2.0 is helpful when dependency decisions need to fit a broader governance and risk programme. The practical aim is to make the selection process defensible before the package ever reaches production.

Risk and Threat Considerations

Dependency choice becomes a security issue when teams accept packages they have not actually inspected. That creates exposure to malicious uploads, package impersonation, and compromised maintainers, and it can also spread risk through transitive dependencies long after the original selection decision.

Failure mechanism: Attackers exploit trust in package names, search ranking, and stale maintainer relationships, then deliver code or updates that look legitimate enough to be adopted without deep review.

Impact: The result can be secret theft, build compromise, repository access loss, or downstream supply chain exposure across every system that consumes the dependency.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK address the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
CIS Controls v8 CIS 3 — Data Protection Dependencies can expose secrets and code paths that need controlled protection.
CIS 4 — Secure Configuration of Enterprise Assets and Software Choosing dependencies depends on vetted software sources and hardened build configuration.
CIS 16 — Application Software Security Open-source dependency choice is a core application-security supply chain concern.
Recommendation — Protect dependency artifacts and related secrets throughout development and build pipelines. Use approved sources and harden software installation paths before adding dependencies. Vet third-party libraries and validate their provenance before adoption.
NIST CSF 2.0 GV.SC — Cyber Supply Chain Risk Management Dependency selection is a supply chain trust and vendor-risk decision.
PR.DS — Data Security Malicious dependencies can expose secrets, source, and build data.
Recommendation — Assess supplier provenance and package trust before introducing third-party code. Limit sensitive data exposure to packages and pipelines that truly need it.
MITRE ATT&CK T1195 — Supply Chain Compromise Malicious dependency uploads and impersonation are classic supply chain compromise paths.
T1588 — Obtain Capabilities Attackers obtain malicious packages and tooling to seed downstream compromise.
Recommendation — Hunt for tampered packages and validate dependency integrity before deployment. Monitor for acquisition and staging of malicious packages used in supply chain attacks.

Practitioner Guidance

What to verify: Before approving a dependency, verify who publishes it, how releases are signed or reviewed, whether security issues are actively handled, and whether the package has a plausible maintenance history. If any of those are unclear, treat the package as higher risk even if it is widely used.

Decision rule: If two packages appear functionally equivalent, favour the one with clearer provenance, lower transitive complexity, and a more credible security record. Popularity alone is a weak decision criterion when the package will run inside a trusted build or production environment.

Practitioner takeaway: The safest dependency is not the most common one, it is the one whose provenance, maintenance, and abuse potential you can defend under scrutiny.