EngineeringApril 25, 2026·2 min read

Supply Chain Attacks: How Attackers Compromise Your Code Before You Write It

The most effective way to compromise thousands of applications at once is not to attack them individually. It is to compromise something they all depend on. Supply chain attacks target the packages, libraries and build systems that developers trust without checking.

Four attack vectors

1. Dependency confusion. An attacker publishes a package on a public registry such as npm or PyPI with the same name as a company's private internal package. If the build system is not configured to prefer the private source, it can pull the public, malicious version.

2. Typosquatting. An attacker publishes a package with a name one character off from a popular one: lodahs instead of lodash. A developer mistypes once, and the malicious package runs code during installation.

3. Maintainer compromise. An attacker takes over a maintainer's account, or earns maintainer rights over time, and publishes a new version of a trusted package containing malicious code. The XZ Utils backdoor disclosed in 2024 (CVE-2024-3094) was the second kind: a contributor spent years building trust in a compression library that most Linux distributions ship before inserting a backdoor.

4. Build pipeline poisoning. An attacker compromises the build system itself and injects malicious steps. In the SolarWinds attack disclosed in 2020, a backdoor was inserted into signed, official software updates. SolarWinds estimated that fewer than 18,000 customers installed an affected update.

How SCA and SBOM generation close these gaps

Software Composition Analysis (SCA) checks every direct and transitive dependency against vulnerability databases. Once a compromised package version has been catalogued, SCA flags it in every project that uses it. SCA does not detect a malicious version that nobody has reported yet, which is why pinned versions, lockfiles and a private registry configuration matter as well.

A Software Bill of Materials (SBOM) is an inventory of the components in your application. When a new compromise is announced, you can search your SBOMs to find out which products are exposed in minutes instead of auditing codebases by hand. The EU Cyber Resilience Act asks manufacturers to draw up an SBOM in a commonly used, machine-readable format as part of its vulnerability handling requirements, which apply from 11 December 2027.

Spoorder generates SBOMs in CycloneDX 1.7 and SPDX 2.3 formats and shows EPSS scores for vulnerable dependencies, so you can see which one is most likely to be exploited.

Ready to scan your application?

Free health check: HTTPS, TLS and security headers for one URL, in about a minute. Free account, no credit card.

Scan your app free →
← Back to blog