Articles / Dependency and Supply-Chain Risk in the Pipeline
DevSecOps · Supply Chain

Dependency and Supply-Chain Risk in the Pipeline

Open a typical application's dependency tree and the picture is humbling: the code your team wrote is a thin layer on top of hundreds or thousands of packages pulled from public registries, each with its own authors, its own dependencies, and its own transitive tail. You did not write most of what you ship, and you did not vet most of what you run. The supply chain is not a component of your attack surface — for most applications, it is the attack surface, and the pipeline is where it enters.

The dependency problem has two faces. The first is known vulnerabilities: a package you depend on has a disclosed flaw, and you are exposed until you update. This is the tractable half — scanners can compare your dependencies against vulnerability databases and tell you. The second, harder face is malicious dependencies: a package that is not vulnerable but hostile by design, published to be installed and to run its payload during your build or in production. The same trust that lets you reuse the ecosystem's work lets an attacker's code ride in alongside it.

How malice enters the tree

Upstream authorsthousands, unmetPackage registryDependency treeresolvedYour buildruns it all on trustSBOMthe discovery stepTyposquat, hijackedmaintainer ormalicious updateenters the tree
Most of your code arrives from strangers — malice enters upstream; the SBOM is where you see it.

Attackers have industrialised getting bad packages into good builds. Typosquatting publishes a package a character away from a popular one, hoping for a typo. Dependency confusion exploits resolvers that prefer a public package over your private one of the same name. And account or maintainer compromise subverts a legitimate, trusted package at the source — the most dangerous variant, because the package you already depend on simply turns malicious in an update you would otherwise apply without a second thought. Each of these has produced real incidents; none requires breaching your perimeter.

Why it matters: A dependency runs with your application's privileges and, during a build, with your pipeline's secrets. A single malicious transitive package — buried levels deep, that no human chose — can execute in the most trusted context you have.
  • Maintain an SBOM. A software bill of materials — a complete inventory of what you actually ship, including transitive dependencies — is the prerequisite for answering 'are we affected?' when the next upstream flaw lands.
  • Scan dependencies continuously, not once. New vulnerabilities are disclosed against packages you already use; a scan at build time and on a schedule catches the ones that appear after you shipped.
  • Pin and lock versions. Lockfiles and digest-pinning mean you get the exact package you reviewed, not whatever the registry serves next — defeating a whole class of substitution attacks.
  • Defend against confusion and squatting. Scope private packages, control resolver priority, and be deliberate about which registries you trust for which names.
  • Reduce the tree. Every dependency is trust extended to strangers; fewer, well-chosen dependencies are less to vet and less to be surprised by.

The SBOM is the discovery step

When a widely-used package is found to be vulnerable or malicious, the organisations that respond in hours are the ones that can instantly answer 'do we use it, where, and in what?' — and the ones that cannot are still grepping repositories days later, unsure if they are exposed. That difference is entirely the SBOM. An accurate, current inventory of your dependencies turns the next supply-chain event from a frantic investigation into a targeted query. It is the least glamorous artifact in the pipeline and the one that decides your incident response.

Trust, but inventory

You cannot audit the source of every transitive package, and pretending otherwise is not a strategy. What you can do is know exactly what you depend on, watch it for newly-disclosed and newly-malicious components, pin it so it cannot change underneath you, and keep the tree small enough to reason about. The supply chain will keep being attacked because it is efficient for attackers; the defenders who cope are the ones who treat their dependency tree as inventory to be managed, not background to be ignored.

Test for it — in practice
  • Generate or open your application's dependency tree and count the transitive packages you did not directly choose. That number is the code you are running on trust.
  • Pick a widely-used package and try to answer, quickly, whether your organisation uses it and where. If you cannot, you lack the SBOM that the next supply-chain incident will demand.

Answering these for one app is a start; maintaining a current SBOM and continuously screening dependencies across every service is what our assessment and tooling provide.

You cannot assess, patch or trust dependencies you have never enumerated — and the transitive package no one chose is the one that bites. Supply-chain defence is a discovery discipline first: you can't secure what you haven't discovered you depend on.

Keep reading
Shift-Left That Developers Actually Accept