⚙ Application Security

Software Supply Chain Security and SBOMs

Software supply chain security protects everything that goes into building and delivering software — source code, third-party dependencies, build tools, and distribution channels — not just the code a team writes itself. Because a typical application is mostly open-source components pulled from public registries, an attacker who compromises any link in that chain can reach thousands of downstream users at once. Defending the supply chain has become as important as defending the application's own code.

What the Software Supply Chain Includes

The supply chain is every step and input between a developer's idea and the software a user runs. Key elements include:

  • First-party source code and its version-control history.
  • Third-party dependencies, including transitive ones pulled in automatically by direct dependencies.
  • Build systems and CI/CD pipelines that compile, package, and sign artifacts.
  • Package registries and container registries that distribute the results.
  • Developer credentials and machines, which are frequent initial targets.

Each link is a potential point of compromise. The danger of transitive dependencies is especially acute: a project may directly depend on a dozen packages but indirectly rely on hundreds, most of which its authors have never reviewed.

Common Supply Chain Attacks

Attackers target the supply chain because a single compromise yields enormous reach. Recurring patterns include:

  • Dependency compromise: taking over a legitimate, popular package — through stolen maintainer credentials or a malicious contribution — and publishing a version containing malware.
  • Typosquatting: publishing a malicious package with a name close to a popular one (for example reqeusts instead of requests) to catch typos.
  • Dependency confusion: tricking a build into pulling a malicious public package in place of an intended private one, covered in depth in dependency confusion and package security.
  • Build system compromise: injecting malicious code during the build so that even a clean source repository produces a poisoned artifact.

Because the malicious code arrives through a trusted channel and often runs with the same privileges as the application or the build, these attacks bypass many traditional defenses.

The Software Bill of Materials (SBOM)

You cannot secure what you cannot see, and most teams underestimate how much third-party code they ship. A Software Bill of Materials (SBOM) is a formal, machine-readable inventory of every component in a piece of software, including versions, suppliers, and license information — much like an ingredients list on food packaging.

An SBOM enables a team to answer a critical question quickly: "Are we affected by the newly disclosed vulnerability in component X, and where?" Without an inventory, that question can take days of manual investigation; with one, it is a lookup.

Two widely used SBOM formats dominate:

  • SPDX, an ISO-standardized format originally focused on license compliance.
  • CycloneDX, designed specifically with security and vulnerability use cases in mind.

A minimal CycloneDX component entry looks like this:

{
  "components": [
    {
      "type": "library",
      "name": "example-lib",
      "version": "2.4.1",
      "purl": "pkg:npm/example-lib@2.4.1",
      "licenses": [{ "license": { "id": "MIT" } }]
    }
  ]
}

The package URL (purl) gives each component a precise, ecosystem-aware identifier, which automated tools use to match components against vulnerability databases.

Build Provenance and Integrity

An SBOM says what is in an artifact; provenance proves how and where it was built. Provenance is signed metadata that records the source commit, the build system, and the build parameters that produced an artifact. Consumers can verify this metadata to confirm an artifact came from the expected pipeline and was not swapped or tampered with.

The SLSA framework (Supply-chain Levels for Software Artifacts) defines increasing levels of build integrity, from simply generating provenance to requiring hardened, isolated, non-falsifiable build environments. Achieving stronger integrity is greatly helped by reproducible builds, which let independent parties rebuild the source and confirm they get a bit-for-bit identical result. Cryptographic code signing then binds artifacts and provenance to a verifiable identity.

Practical Defenses for Development Teams

Supply chain security is achievable with a layered, mostly automatable set of practices:

  1. Pin and lock dependencies. Use lockfiles that record exact versions and cryptographic hashes so builds are deterministic and unexpected updates are blocked.
  2. Verify integrity. Check hashes and signatures on downloaded packages, and prefer registries that support signed publishing.
  3. Generate and consume SBOMs. Produce an SBOM for every release and scan it continuously against vulnerability feeds.
  4. Scan dependencies automatically. Integrate Software Composition Analysis into CI so vulnerable or malicious components fail the build.
  5. Harden the build. Run builds in isolated, ephemeral environments with least-privilege credentials and no unnecessary network access.
  6. Vet new dependencies. Review a package's maintenance health, popularity, and permissions before adopting it, and minimize the total dependency count.

Embedding these steps into the development lifecycle turns supply chain security from an occasional audit into a continuous, enforced property of every build.

Key Takeaways

  • Software supply chain security protects code, dependencies, build systems, and distribution — not just first-party code — because a single compromise can reach countless downstream users.
  • Common attacks include dependency compromise, typosquatting, dependency confusion, and build-system tampering, all of which arrive through trusted channels.
  • An SBOM is a machine-readable inventory (commonly SPDX or CycloneDX) that lets teams instantly assess exposure to a newly disclosed vulnerability.
  • Provenance and frameworks like SLSA prove how an artifact was built, and signing binds it to a verifiable identity.
  • Practical defenses — pinned lockfiles, integrity verification, SBOMs, dependency scanning, and hardened builds — are automatable and belong in every pipeline.
supply-chainsbomdependenciesprovenanceappsec

Frequently asked questions

What is software supply chain security?

Software supply chain security protects everything that goes into building and delivering software, including source code, third-party dependencies, build tools, and distribution channels, not just the code a team writes itself. Because a typical application is mostly open-source components pulled from public registries, an attacker who compromises any link in that chain can reach thousands of downstream users at once. Defending the supply chain has become as important as defending the application's own code.

What is an SBOM (software bill of materials)?

A software bill of materials is a formal, machine-readable inventory of every component in a piece of software, including versions, suppliers, and license information, much like an ingredients list on food packaging. Its main value is letting a team quickly answer whether they are affected by a newly disclosed vulnerability in a component, and where. Without an inventory that question can take days of manual investigation; with one it is a lookup.

What is the difference between SPDX and CycloneDX?

Both are widely used, machine-readable SBOM formats. SPDX is an ISO-standardized format that was originally focused on license compliance, while CycloneDX was designed specifically with security and vulnerability use cases in mind. Both let automated tools identify components, often through a package URL, and match them against vulnerability databases.

What is a software supply chain attack?

A supply chain attack compromises a trusted link between a developer and users rather than attacking the target directly, so the malicious code arrives through a channel that is already trusted. Common patterns include taking over a popular dependency and publishing a malicious version, typosquatting a package name, dependency confusion, and injecting code during the build so that even clean source produces a poisoned artifact. Because the code often runs with the same privileges as the application or build, these attacks bypass many traditional defenses.

What is build provenance and the SLSA framework?

Provenance is signed metadata that records the source commit, the build system, and the build parameters that produced an artifact, letting consumers verify it came from the expected pipeline and was not swapped or tampered with. SLSA, which stands for Supply-chain Levels for Software Artifacts, is a framework that defines increasing levels of build integrity, from simply generating provenance to requiring hardened, isolated, non-falsifiable build environments. Reproducible builds and code signing strengthen these guarantees further.

How do I secure my software supply chain?

Use a layered, mostly automatable set of practices: pin and lock dependencies with cryptographic hashes so builds are deterministic, verify the integrity of downloaded packages, generate and continuously scan an SBOM for every release, and integrate Software Composition Analysis into CI so vulnerable components fail the build. Harden builds by running them in isolated, ephemeral environments with least-privilege credentials, and vet new dependencies for maintenance health and permissions before adopting them. Embedding these steps into the pipeline makes supply chain security a continuous, enforced property of every build.

Try it hands-on

K0G is an open toolkit of browser-based security utilities — hashing, encoding, JWT, certificates, crypto and more, all running locally in your browser.

Explore the tools →