Back to glossary

Software Bill of Materials (SBOM)

A software bill of materials (SBOM) is a machine-readable inventory of the components, versions, and dependency relationships inside a piece of software.

Also known as SBOMs, software BOM, SBOM generation

A software bill of materials (SBOM) is a machine-readable inventory of the components inside a piece of software: each package's name, version, identifier, hash, and license, plus the dependency edges between them. Generators build an SBOM from lockfiles, build output, or binaries, usually in CycloneDX or SPDX format, so buyers, regulators, and scanners can see what software contains.

An SBOM records what its generator could see, and generators see different things. We generated SBOMs for one Node.js project with three direct dependencies using npm, pnpm, cdxgen, and cyclonedx-npm, and got between 75 and 100 components. None of the 10 documents listed any of the 28 C libraries compiled into a 16 MB binary the project loads at runtime. Our position: generate an SBOM for every release and keep it, because it is the only durable record of what you resolved. Treat each SBOM as a claim with a scope, though. Check how and when it was generated, and analyze the packages themselves for security, because a malicious package looks perfectly normal in an SBOM.

What is an SBOM?

#

An SBOM is a structured list of what a piece of software is made of, written so that machines can query it. Executive Order 14028, signed in May 2021, supplied the definition that most later rules reuse. It defines an SBOM as "a formal record containing the details and supply chain relationships of various components used in building software" (NTIA, quoting EO 14028 §10(j)).

The word "record" matters. An SBOM is a document about software, produced by a tool at one moment, not a property of the software itself. Two parts of it carry most of the value. The inventory names each component precisely enough to look it up, usually by Package URL (PURL), such as pkg:npm/express@5.1.0. The dependency graph records which component pulls in which, including every transitive dependency that nobody chose directly. In asset-management terms, the SBOM is the software layer of an inventory: it answers "what code runs where" the way a hardware inventory answers "what machines run where."

Here is one real component entry, produced by npm 12.2.1's built-in generator for the test project we use throughout this page. The project depends on express@5.1.0, sharp@0.34.3, and, as a dev dependency, typescript@5.9.2:

JSON
{
  "type": "library",
  "name": "@img/sharp-libvips-linux-x64",
  "version": "1.2.0",
  "scope": "optional",
  "purl": "pkg:npm/%40img/sharp-libvips-linux-x64@1.2.0",
  "licenses": [{ "license": { "id": "LGPL-3.0-or-later" } }],
  "hashes": [{ "alg": "SHA-512", "content": "656dc53d...31213d4e" }]
}

Every field here is correct, and the entry still describes one component where there are really 29. The section on native code below shows why.

What must an SBOM contain?

#

The current US baseline is CISA's 2026 Minimum Elements for a Software Bill of Materials, released July 29, 2026 with the NSA, the FBI, and 15 international agencies. It replaces the NTIA's 2021 minimum elements, which defined 7 data fields. The 2026 version defines 17 data fields and 6 practices. Nine fields describe the SBOM itself: author, author signature, data format name and version, generation context, timestamp, tool name and version, and SBOM version. Eight describe each component: producer, name, version, identifiers, hash value, hash algorithm, license, and dependency relationships. Among the practices, Coverage now asks for all components "including transitive dependencies," with no minimum depth. The 2021 baseline settled for top-level components plus enough detail to find the rest. The guidance is nonbinding, and it names SPDX and CycloneDX as the machine-processable formats. CISA's 2025 draft first proposed the hash, license, tool, and generation-context fields.

The two formats now overlap far more than most comparison pages admit. Both carry licenses, hashes, dependency relationships, and vulnerability data. The real differences are governance, data model, and which tools emit current versions:

PropertyCycloneDXSPDX
Steward and standardOWASP and Ecma TC54, published as ECMA-424Linux Foundation; SPDX 2.2.1 is ISO/IEC 5962:2021
Current release (October 2026)1.73.0.1, with 3.1 in release candidate; most generators still emit 2.3
Dependency modelFlat component list plus a dependencies adjacency listElements linked by typed relationship objects
Vulnerability and VEX dataNative vulnerabilities array with VEX analysis statesSPDX 3.0 Security profile
License dataSPDX license IDs and expressions per componentDeclared vs concluded license, down to file level
Who emits itnpm, pnpm, cdxgen, cyclonedx-npm, cyclonedx-py, Socketnpm, pnpm, BuildKit, Socket

Our verdict: default to CycloneDX for security pipelines, because current generators emit it, VEX lives in the same document, and PURL identity maps directly to registry packages. Use SPDX when a customer, regulator, or Linux distribution asks for it, or when file-level license provenance is the point. If you serve both audiences, produce both from the same generator run. Our CycloneDX and SPDX glossary entries compare the formats field by field.

SBOM types: when the inventory is taken

#

CISA's Types of SBOM document names six kinds by when they are produced: Design, Source, Build, Analyzed, Deployed, and Runtime. A Source SBOM comes from manifests and lockfiles, before anything is built. A Build SBOM comes from the build that produces a releasable artifact. An Analyzed SBOM comes from inspecting a finished artifact, such as a container image or binary, after the fact. Runtime SBOMs instrument the running system. CISA's own description of Source SBOMs warns that they can include components that never run and miss components that load dynamically.

The 2026 minimum elements turn this into a minimum element, generation context, which CycloneDX stores in metadata.lifecycles. The field is self-reported, and our test shows how loosely generators fill it. npm 12.2.1 labels a node_modules-based SBOM build and a --package-lock-only SBOM pre-build, which is a reasonable distinction. cdxgen 12.9.0 labeled its output build even though it was derived from the lockfile and listed 20 platform packages that were never installed. A consumer that trusts the label will compare documents that answer different questions.

We think every release needs two SBOMs. A pre-build SBOM from the lockfile is what you review before a dependency change lands. A build or analyzed SBOM of the shipped artifact is what you hand to customers and regulators. Keep both, keyed to the release, because a registry that later removes a bad version cannot rewrite them.

How do you generate an SBOM?

#

You generate an SBOM by running a generator against one of three inputs: a lockfile, an installed dependency tree, or a built artifact such as a container image. These are the commands we ran for this page, with versions current as of October 2026:

Bash
# npm 12.2.1: reads node_modules by default
npm sbom --sbom-format cyclonedx > npm.cdx.json
npm sbom --sbom-format cyclonedx --omit dev > npm-prod.cdx.json
npm sbom --sbom-format cyclonedx --package-lock-only > npm-lock.cdx.json

# pnpm 12.15.0
pnpm sbom --sbom-format cyclonedx > pnpm.cdx.json

# OWASP CycloneDX tools: cyclonedx-npm 6.0.1, cdxgen 12.9.0
npx @cyclonedx/cyclonedx-npm --output-file cyclonedx-npm.cdx.json
npx @cyclonedx/cdxgen -t js -o cdxgen.cdx.json .

# Python: run cyclonedx-py 7.5.0 from its own venv against the app's interpreter
cyclonedx-py environment app/bin/python -o app.cdx.json

For container images, BuildKit can attach an SPDX SBOM at build time with docker buildx build --attest type=sbom. By default it scans only the final image stage, so build-time tools and earlier stages are excluded (Docker docs).

Generation can execute code, and that deserves more attention than it gets. Some generators resolve or install dependencies to fill gaps, and an install runs lifecycle scripts. When we ran cdxgen as root in our test container, it printed an environment audit warning that code executed "during SBOM generation" would run "with full system privileges." Socket's socket cdxgen wrapper defaults to --lifecycle pre-build, which disables cdxgen's --install-deps "to avoid arbitrary code execution during the scan" (docs). npm now helps here too. Since npm v12 shipped with install scripts off by default, our npm install skipped sharp's install script and printed a warning instead of running it.

The generator is also part of your supply chain. In the Trivy GitHub Actions compromise in March 2026, an attacker force-pushed 75 of the 76 version tags of aquasecurity/trivy-action, the official action for a scanner that also generates SBOMs. Every pipeline that referenced a poisoned tag ran an infostealer before the real scan, with the job's CI secrets in reach. Pin SBOM generators like any other dependency: by exact version for packages and by full commit SHA for CI actions.

Why do SBOM tools disagree on the same project?

#

SBOM tools disagree because each one reads a different source and applies different rules about what counts. We installed the test project with npm 12.2.1 on Linux x64 and ran every configuration from the previous section against the same lockfile and the same node_modules:

Generator and modeReadsComponentsUninstalled platform packagesNative packages actually installedDev dependency
npm sbomnode_modules7802Included
npm sbom --omit devnode_modules7702Excluded
npm sbom --package-lock-onlyLockfile100222Included
pnpm sbompnpm store and lockfile7802Included
cyclonedx-npmnpm's installed tree80 entries, 78 unique PURLs02Included
cdxgenLockfile100222Included
cdxgen --required-onlyLockfile7500Excluded

The figure and table show the same counts. All seven SBOMs share the same 75 production JavaScript packages. The rest is policy. Lockfile readers list every package the lockfile could install on any machine. Here that means 20 @img/sharp-* builds for macOS, Windows, musl, ARM, ppc64, s390x, and WebAssembly, plus @emnapi/runtime and tslib for the WebAssembly build, none of which exist on this Linux x64 machine. Tree readers list only what is installed.

cdxgen --required-only makes the most consequential cut. It drops optional dependencies, and the only two optional packages that were actually installed are the two that contain native code: @img/sharp-linux-x64 and @img/sharp-libvips-linux-x64. cdxgen deserves credit for one thing, though. It was the only generator that declared its own gap, with a CycloneDX compositions entry of "aggregate": "incomplete". cyclonedx-npm is the opposite case. It emits one entry per install path, so content-type@2.1.0 appears three times, once each under body-parser, type-is, and negotiator. That matches the disk exactly and inflates naive counts.

Smaller differences add up as well. npm emits CycloneDX 1.5, cyclonedx-npm emits 1.6, and pnpm and cdxgen emit 1.7. npm and cdxgen attach the lockfile's SHA-512 to each component, while pnpm and cyclonedx-npm attach it to the registry tarball reference. A diff between two SBOMs from different tools is mostly a diff between tools.

We expect this gap to grow. Shipping prebuilt binaries as per-platform optional dependencies, the model esbuild popularized and sharp uses, lets packages deliver native code without an install script. With install scripts now blocked by default in pnpm 10 and npm 12, more packages will move to it, and every one of them widens the gap between a lockfile SBOM and an installed one.

What an SBOM cannot see

#

An SBOM cannot see code that its generator's input does not describe. Three kinds of code fall outside that input: native code bundled inside packages, tools that run without touching your lockfile, and malicious intent.

Native code inside packages

#

The @img/sharp-libvips-linux-x64 entry shown earlier is a single 16,642,544-byte shared library, libvips-cpp.so.8.17.1. readelf shows it links only against system libraries such as libc, because everything else is compiled in statically. The package's own versions.json lists what it contains:

JSON
{
  "aom": "3.12.1",
  "cairo": "1.18.4",
  "expat": "2.7.1",
  "freetype": "2.13.3",
  "glib": "2.85.1",
  "harfbuzz": "11.2.1",
  "heif": "1.20.1",
  "png": "1.6.50",
  "rsvg": "2.60.0",
  "tiff": "4.7.0",
  "vips": "8.17.1",
  "webp": "1.5.0",
  "xml2": "2.14.4",
  "zlib-ng": "2.2.4"
}

The 28 libraries include parsers for XML, TIFF, PNG, and SVG, formats that untrusted input reaches directly. None of the 10 SBOMs we generated mentions any of them. An SBOM-driven vulnerability scan of this project can only ever match advisories against @img/sharp-libvips-linux-x64@1.2.0.

Python has the same problem, and is ahead on fixing it. PEP 770, final since April 11, 2025, reserves .dist-info/sboms/ inside wheels so a package can describe what it bundles. Its rationale is blunt: "These software components can't be described using Python package metadata" (PEP 770). Pillow 13.0.0, uploaded to PyPI on October 16, 2026, ships PEP 770 SBOMs. We downloaded the manylinux x86_64 wheel for CPython 3.13 and looked inside:

Shell Session
$ unzip -l pillow-13.0.0-*.whl | grep -cE 'pillow\.libs/.+\.so'
18
$ unzip -l pillow-13.0.0-*.whl | grep sboms/ | awk '{print $4}'
pillow-13.0.0.dist-info/sboms/
pillow-13.0.0.dist-info/sboms/auditwheel.cdx.json
pillow-13.0.0.dist-info/sboms/pillow-13.0.0.cdx.json
$ unzip -p pillow-13.0.0-*.whl pillow-13.0.0.dist-info/sboms/pillow-13.0.0.cdx.json \
    | jq -c '.components[] | select(.name=="libtiff") | {name, version, purl, cpe}'
{"name":"libtiff","version":"4.7.2","purl":null,"cpe":null}
$ cyclonedx-py environment app/bin/python -o app.cdx.json
$ jq -c '[.components[] | {name, version}]' app.cdx.json
[{"name":"pillow","version":"13.0.0"},{"name":"pip","version":"26.2.2"}]

The figure maps the wheel's 18 bundled shared libraries against the two embedded SBOMs. Pillow's own SBOM covers 12 of the 18 files through the projects it names, among 16 third-party libraries it lists, from FreeType and HarfBuzz to libtiff and zlib. auditwheel's SBOM covers one more file, libXau, which it identified as an AlmaLinux RPM. Five files appear in neither SBOM: libpng16, libbrotlicommon, libbrotlidec, liblzma, and libzstd. readelf shows why they are there. FreeType needs libpng16 and libbrotlidec, and libtiff needs liblzma and libzstd. Pillow's SBOM lists the libraries its extensions use directly and gives FreeType and libtiff no dependency entries at all, which CycloneDX defines as unknown dependencies, not zero. The document has no compositions block declaring itself incomplete. Stopping one level down is exactly the depth limit CISA's 2026 Coverage practice removes. liblzma is the library at the center of the 2024 xz backdoor.

Two more gaps sit on the consumer side. None of the 16 third-party entries carries a purl or cpe field, so a vulnerability matcher keyed on either identifier has nothing to look up. CPE matching is also eroding on its own, since NIST stopped enriching most CVEs in April 2026 after submissions rose 263% between 2020 and 2025. And cyclonedx-py 7.5.0, run against an environment with this wheel installed, reported Pillow as one component and never read either embedded file. The data is on disk, and the generator does not open it.

Tools that never touch your lockfile

#

An SBOM generated from a project inherits the project's scope. Code fetched by npx, installed globally, or pulled in by CI tooling never appears in the project's lockfile, so it never appears in the project's SBOM. In the axios compromise of March 2026, we observed a CI pipeline that ran a CLI through npx and pulled the malicious dependency through a transitive axios range. Our analysis of the blast radius explains why a clean lockfile, and so a clean SBOM, checked after the fact does not prove you were never exposed.

Intent

#

A malicious package looks perfectly valid in an SBOM. An SBOM of a build affected by the axios compromise lists axios@1.14.1 and plain-crypto-js@4.2.1 with correct PURLs and correct registry hashes. Nothing in either format marks a component as malicious. Malware does not get a CVE, so a vulnerability scanner matching that SBOM against advisory databases finds nothing to report. The hashes do not help either. npm and cdxgen copy them from the lockfile instead of hashing the files on disk, which our CycloneDX glossary entry demonstrates with a tampered dependency.

Using an SBOM: matching, triage, and analysis

#

An SBOM is data. Software composition analysis is the process that produces it and acts on it. Three uses matter most.

The first is lookup. When a new advisory lands, an SBOM per release answers "which of our shipped versions contain this package?" in seconds, and it keeps answering after a registry deletes the version. That use works well, within the scope limits above.

The second is vulnerability triage, which is where SBOMs generate most of their noise. Matching every component against advisory databases produces alerts for code that is present but never called. We think reachability, not severity score, should drive triage. VEX statements record the result in a portable form, such as not_affected with the justification code_not_reachable, so downstream consumers do not repeat the analysis. Socket's CycloneDX and SPDX export endpoints accept include_vulnerabilities=true, which adds vulnerability data plus reachability and VEX data where available (docs).

The third is a work order for deeper analysis. Socket scans accept CycloneDX and SPDX files, matched by names such as *-cdx.json, *.cdx.xml, and *-spdx.json, as inputs alongside manifests and lockfiles (docs). The SBOM says which packages you have. Analyzing what those packages actually contain, and what their code does at install and run time, says whether you should have them.

SBOM requirements as of October 2026

#

SBOM rules diverged in 2026. The United States made SBOMs optional in federal software procurement, while the EU's legal requirement moved closer to taking effect.

RegimeWhat it requiresBinding?Status (October 2026)
US federal procurement: OMB M-22-18 and M-23-16Secure development attestations, with SBOMs among the artifacts agencies could requireWas bindingRescinded January 23, 2026 by OMB M-26-05
OMB M-26-05Agencies may add contract terms requiring a current SBOM "upon request"; for cloud platforms, of the runtime production environmentOptional, per agencyIn effect
CISA 2026 Minimum Elements17 data fields and 6 practices, including transitive coverageGuidance onlyPublished July 29, 2026
FDA, FD&C Act §524BPremarket submissions for cyber devices must include an SBOM, including "commercial, open-source, and off-the-shelf software components"YesRequired since March 29, 2023
EU Cyber Resilience Act, Annex I Part II(1)An SBOM in a machine-readable format "covering at the very least the top-level dependencies"YesApplies from December 11, 2027

The US reversal came in a single sentence of OMB M-26-05: "Accordingly, OMB Memoranda M-22-18 and M-23-16, a companion policy, are hereby rescinded." We covered OMB's rescission of the federal software supply chain mandates when it landed. The memo still lists the 2025 minimum elements as a resource, and medical devices are unaffected, because the FDA requirement comes from statute rather than OMB policy.

The EU Cyber Resilience Act moves the other way. Regulation (EU) 2024/2847 requires manufacturers of products with digital elements to "identify and document vulnerabilities and components," including by drawing up an SBOM. Recital 77 says manufacturers "should not be obliged to make the SBOM public," and Recital 22 lets market surveillance authorities request SBOMs for product categories they designate. The CRA's reporting obligations started first, on September 11, 2026: manufacturers must report actively exploited vulnerabilities and severe incidents with an early warning within 24 hours and a full notification within 72 hours (European Commission). The SBOM obligation arrives with the rest of Annex I on December 11, 2027.

The two baselines disagree on depth. The CRA's legal floor is top-level dependencies, while CISA's guidance asks for every transitive component. Pillow's missing libpng and liblzma show that the gap is not hypothetical, since those libraries sit one level below components the SBOM does list. Build to CISA's depth, because transitive dependencies are where most of the code is. In our test project, 2 direct production dependencies resolved to 77 packages.

What are the best SBOM tools?

#

The best SBOM tool is the one closest to the resolution you actually ship. Generators split into five categories, and the right choice depends on the input you have:

CategoryExamplesReadsUse it whenWhat it misses
Package-manager built-insnpm sbom, pnpm sbomLockfile or installed treeA single-ecosystem project; you want the package manager's own resolutionBundled native code; npm still emits CycloneDX 1.5
Ecosystem pluginscyclonedx-npm, cyclonedx-py, CycloneDX Maven and Gradle pluginsInstalled tree or environmentThe ecosystem has no built-in generatorEmbedded SBOMs (cyclonedx-py 7.5.0 ignores PEP 770 files)
Multi-ecosystem generatorscdxgen, SyftManifests, lockfiles, images, binariesMonorepos, polyglot repos, and container imagesCan execute installs; mode flags change results sharply
Build-time attestationsBuildKit --attest type=sbomThe final image filesystemYou ship container imagesEarlier build stages and build context, by default
SBOM consumersOWASP Dependency-Track, SocketExisting SBOMs plus manifestsMonitoring, policy, and package analysis across many projectsLimited by the quality of the SBOM it receives

Our verdict: use your package manager's generator for each ecosystem's pre-build SBOM, and an artifact-level generator for whatever you ship. Pin both, and record the tool and version in the SBOM, as the 2026 minimum elements now call for. Then check each SBOM for a compositions block and for native binaries, because a generator that does not declare its gaps still has them.

From inventory to evidence

#

The SBOM format problem is mostly solved. CycloneDX can already express hashes, licenses, full dependency graphs, nested components, and a declaration that the inventory is incomplete. The open problem is binding those claims to bytes. CISA's 2026 baseline adds signatures and hashes, but neither proves the inventory is complete: a signed SBOM can still omit a library, and our test project's SBOMs each omitted 28 of them. PEP 770 is the right model, because the package that bundles a library is the party best placed to know it is there. It only works if publishers list their libraries' dependencies too, give every entry an identifier, and if consumers' generators read the result. Today, on the evidence of Pillow 13.0.0, all three steps are still partial. Until they are not, an SBOM tells you what your package manager resolved, and somebody still has to read the code.