Malhar Ujawane

Blog

Explainer·(updated October 31, 2026)

What is an SBOM? Software bill of materials, explained

An SBOM (software bill of materials) lists every component in your software and how it got there. The NTIA fields, SPDX vs CycloneDX, and a Python parser.

What is an SBOM? Software bill of materials, explained

An SBOM (software bill of materials) is a machine-readable inventory of every component inside a piece of software: each library, its version, who supplied it, and which other component pulled it in. US Executive Order 14028 defines it as “a formal record containing the details and supply chain relationships of various components used in building software” and compares it to the list of ingredients on food packaging. Its job is to let you answer “do we ship the vulnerable thing?” in minutes instead of weeks.

Why did SBOMs become a requirement?

Two things happened in 2021. On May 12, President Biden signed Executive Order 14028, “Improving the Nation’s Cybersecurity”. Section 4(e)(vii) lists, among the secure development practices for software sold to the US government, “providing a purchaser a Software Bill of Materials (SBOM) for each product directly or by publishing it on a public website”. The order told the Department of Commerce to define the minimum contents, and on July 12, 2021 the NTIA published The Minimum Elements for a Software Bill of Materials.

Then in December 2021 came Log4Shell. CVE-2021-44228, published on NVD on December 10, 2021, let an attacker who controlled a log message run code through Log4j’s JNDI lookups. The hard part for most organizations was not the patch. It was finding every place log4j-core lived, usually as a transitive dependency of something else, inside jar files nobody had opened in years. An SBOM is the document you wish you had that week.

The xz-utils backdoor in March 2024 (CVE-2024-3094) made the same point from the other side. Once a malicious version is named (5.6.0 and 5.6.1, per the xz project), the question becomes which of your images and hosts carry it, and that is an inventory question.

What has to be in an SBOM?

The NTIA report sorts the minimum elements into three areas: data fields, automation support, and practices and processes.

The data fields are seven, recorded per component:

Field What it means (NTIA wording, shortened)
Supplier name The entity that creates, defines and identifies the component
Component name The name the original supplier gave it
Version The supplier’s identifier for this change of the software
Other unique identifiers Look-up keys such as CPE, SWID tags or package URLs
Dependency relationship That upstream component X is included in software Y
Author of SBOM data Who wrote this SBOM entry, which may not be the supplier
Timestamp When the SBOM data was assembled

Automation support means a machine-readable format; the report names three, SPDX, CycloneDX and SWID tags. The practices cover how often you regenerate (every new build or release needs a new SBOM), how deep you go (all top-level components, with enough detail to find transitive ones recursively), and “known unknowns”: you must say where the graph stops, so a consumer can tell “no dependencies” from “we didn’t look”.

The minimum is a floor. On August 22, 2025, CISA published a draft update for public comment, the 2025 Minimum Elements, which adds “component hash, license, tool name, and generation context” and tightens the wording of existing fields. Comments closed on October 3, 2025. I treat the draft’s additions as what a good SBOM should carry anyway; a hash in particular is the only field that proves the bytes you scanned are the bytes you ship.

SPDX vs CycloneDX: which format should you use?

Both describe components, versions, licenses and relationships, and the NTIA report lists both as formats that meet the automation requirement (noting that “computers are good at format conversions”). The differences are governance and emphasis.

SPDX describes itself as a standard for “security, license compliance, and other software supply chain artifacts”. It is a Linux Foundation project, and it is recognized as the international standard ISO/IEC 5962:2021. SPDX 3.0.0 shipped in April 2024.

CycloneDX is an OWASP Foundation project with a security focus. Ecma International standardizes it as ECMA-424; the first edition was June 2024, and the second edition (December 2025) covers CycloneDX 1.7. Beyond software components it can describe services, hardware, cryptographic assets and machine learning models.

My rule of thumb: if the buyer or the regulator asks for a specific one, produce that. Otherwise pick the one your build tooling emits natively for your main ecosystem, and make sure your scanner reads it. The format matters far less than whether the SBOM is generated on every build and stored next to the artifact it describes.

What does reading an SBOM look like in code?

Here is a small CycloneDX SBOM for a made-up Java service, and a script that does the two things a security team does first: list what’s inside, and check it against advisories. The component names are real Maven coordinates; the service, the versions chosen and the dependency graph are illustrative, and the advisory ranges are simplified to “first affected” and “first fixed”.

# sbom_check.py: read a CycloneDX SBOM, list components, match them against advisories.
# Python 3 stdlib only. The SBOM and the advisory list are embedded so it runs offline.
import json

SBOM = json.loads("""{
  "bomFormat": "CycloneDX", "specVersion": "1.6", "version": 1,
  "metadata": {"timestamp": "2026-10-31T09:00:00Z",
               "tools": {"components": [{"type": "application", "name": "hand-written"}]},
               "component": {"bom-ref": "app", "type": "application", "name": "orders-api", "version": "3.2.0"}},
  "components": [
    {"bom-ref": "spring", "type": "library", "group": "org.springframework.boot", "name": "spring-boot-starter-web",
     "version": "2.6.1", "purl": "pkg:maven/org.springframework.boot/spring-boot-starter-web@2.6.1"},
    {"bom-ref": "starter-log4j2", "type": "library", "group": "org.springframework.boot", "name": "spring-boot-starter-log4j2",
     "version": "2.6.1", "purl": "pkg:maven/org.springframework.boot/spring-boot-starter-log4j2@2.6.1"},
    {"bom-ref": "log4j-core", "type": "library", "group": "org.apache.logging.log4j", "name": "log4j-core",
     "version": "2.14.1", "purl": "pkg:maven/org.apache.logging.log4j/log4j-core@2.14.1"},
    {"bom-ref": "jackson", "type": "library", "group": "com.fasterxml.jackson.core", "name": "jackson-databind",
     "version": "2.13.0", "purl": "pkg:maven/com.fasterxml.jackson.core/jackson-databind@2.13.0"},
    {"bom-ref": "xz", "type": "library", "name": "xz-utils", "version": "5.4.5",
     "purl": "pkg:generic/xz-utils@5.4.5"}
  ],
  "dependencies": [
    {"ref": "app", "dependsOn": ["spring", "starter-log4j2", "xz"]},
    {"ref": "spring", "dependsOn": ["jackson"]},
    {"ref": "starter-log4j2", "dependsOn": ["log4j-core"]}
  ]
}""")

# Advisories: (id, purl without version, first affected, first fixed). Ranges simplified.
ADVISORIES = [
    ("CVE-2021-44228", "pkg:maven/org.apache.logging.log4j/log4j-core", "2.0", "2.15.0"),
    ("CVE-2024-3094", "pkg:generic/xz-utils", "5.6.0", "5.6.2"),
]

def ver(v):  # ponytail: numeric dotted versions only; real tools need per-ecosystem version rules
    return tuple(int(x) for x in v.split("-")[0].split(".") if x.isdigit())

def path_to(ref, graph, root="app"):
    """Breadth-first search from the root to show how a component got in."""
    queue = [[root]]
    while queue:
        p = queue.pop(0)
        if p[-1] == ref:
            return p
        queue += [p + [d] for d in graph.get(p[-1], [])]
    return []

comps = {c["bom-ref"]: c for c in SBOM["components"]}
graph = {d["ref"]: d.get("dependsOn", []) for d in SBOM["dependencies"]}
direct = set(graph["app"])
meta = SBOM["metadata"]["component"]
print(f"{meta['name']} {meta['version']}: {len(comps)} components, {len(direct)} direct\n")
for ref, c in comps.items():
    kind = "direct" if ref in direct else "transitive"
    print(f"  {kind:<10} {c['name']:<28} {c['version']}")

print()
for cve, base, lo, fixed in ADVISORIES:
    for ref, c in comps.items():
        if c["purl"].split("@")[0] != base:
            continue
        hit = ver(lo) <= ver(c["version"]) < ver(fixed)
        status = "AFFECTED" if hit else "not affected"
        print(f"{cve}: {c['name']} {c['version']} {status} (range {lo} to before {fixed})")
        if hit:
            names = [comps[r]["name"] if r in comps else meta["name"] for r in path_to(ref, graph)]
            print("  path: " + " -> ".join(names))

assert ver("2.14.1") < ver("2.15.0") and path_to("log4j-core", graph)[-1] == "log4j-core"

Output (Python 3.13.11):

orders-api 3.2.0: 5 components, 3 direct

  direct     spring-boot-starter-web      2.6.1
  direct     spring-boot-starter-log4j2   2.6.1
  transitive log4j-core                   2.14.1
  transitive jackson-databind             2.13.0
  direct     xz-utils                     5.4.5

CVE-2021-44228: log4j-core 2.14.1 AFFECTED (range 2.0 to before 2.15.0)
  path: orders-api -> spring-boot-starter-log4j2 -> log4j-core
CVE-2024-3094: xz-utils 5.4.5 not affected (range 5.6.0 to before 5.6.2)

Three things in that output are the point of an SBOM. The vulnerable library is transitive, so nobody on the team typed log4j-core into a build file. The path line tells you which direct dependency to upgrade to get rid of it, which is the actual fix. And the xz line is a negative answer you can prove: this build doesn’t carry an affected version. The NTIA report calls this “prove the negative” and notes it needs a complete or mostly complete graph.

The ver() function is the honest weak spot. Real version comparison differs by ecosystem (Maven qualifiers, semver pre-releases, Debian epochs), and real advisories have gaps; NVD’s Log4Shell entry excludes the backported releases 2.12.2, 2.12.3 and 2.3.1. That’s why production scanners key on package URLs (purl) and use per-ecosystem rules instead of a tuple compare.

Does an SBOM tell you if you’re vulnerable?

No, and this is where teams get disappointed. An SBOM says a component is present. It doesn’t say whether the vulnerable code is reachable. A library can be in the build while the affected function is never called, or the feature is disabled by configuration.

The NTIA report names the fix: VEX, the Vulnerability Exploitability eXchange. A VEX document lets a supplier state, per vulnerability and per product, whether it is “affected” or “not affected”, with a reason. The report describes it as a profile in OASIS CSAF; CycloneDX also supports VEX. SBOM plus VEX is what turns a scanner’s two hundred findings into the five you have to act on.

Where do SBOMs break?

Generated from the wrong place. An SBOM built from a manifest (package.json, pom.xml) lists what you asked for. One built from the final artifact (the container image, the binary) lists what you shipped. They differ more than people expect, especially with vendored code and OS packages in the base image. The NTIA report suggests recording how the data was captured, such as “source”, “build” or “post-build”.

Generated once. NTIA’s frequency rule is blunt: a new build or release needs a new SBOM. A PDF attached to a procurement contract in January is wrong by March.

Nobody consumes it. Producing SBOMs is easy; building the pipeline that joins them against new advisories daily, and pages the owning team, is the work.

It doesn’t cover a malicious maintainer. The xz backdoor came from a trusted upstream release. An SBOM would have listed xz 5.6.1 faithfully. Its value there was speed of response after disclosure, not prevention. Provenance and build integrity (SLSA, signed builds) address a different part of the problem.

SaaS. The NTIA report notes that for cloud services the provider holds the risk, release cycles are fast, and inventorying the full stack plus third-party APIs was “not yet standardized or sufficiently mature” in 2021.

What I would do

From a data-platform seat, I read an SBOM as a lineage problem, the same one data teams solve for tables: what does this artifact contain, where did each part come from, and what is downstream of it. The answer is only useful if it is queryable.

  1. Generate a CycloneDX or SPDX SBOM in CI for every artifact you ship, from the built image or binary rather than the manifest alone. Attach it to the artifact in the registry with the same digest.
  2. Load all of them into one store you can query by package URL. “Which running services include pkg:maven/org.apache.logging.log4j/log4j-core below 2.15.0?” should be a single query.
  3. Re-run that join against new advisories daily, not only at build time. A clean SBOM from last month becomes vulnerable when a new CVE is published, with no change to your code.
  4. Record known unknowns explicitly, and fail the build when a component has no version or identifier.
  5. Ask vendors for SBOM plus VEX, and treat a vendor that can’t produce either as a supply chain finding in itself.

If you run a platform team, this belongs in the golden path so no service team has to think about it. It also pairs with deployment safety: knowing exactly what changed in a release is half of what made the CrowdStrike outage a lesson in staged rollouts.

FAQ

What does SBOM stand for?

Software bill of materials. The term borrows from manufacturing, where a bill of materials lists every part in a product.

Is an SBOM required by law?

In the US, EO 14028 made it one of the secure development practices expected of software sold to federal agencies; it is not a general law covering all software. CISA’s 2025 minimum elements draft is described as voluntary guidance. Check the rules for your sector and market.

What is the difference between SPDX and CycloneDX?

SPDX covers license compliance and security, is a Linux Foundation project, and is ISO/IEC 5962:2021. CycloneDX is an OWASP project with a security focus, standardized as ECMA-424. The NTIA report names both as acceptable formats.

What is VEX in relation to an SBOM?

VEX (Vulnerability Exploitability eXchange) is a statement of whether a product is affected by a specific vulnerability. The SBOM says a component is present; VEX says whether that matters.

How do I generate an SBOM?

Use a generator that understands your ecosystem and run it in CI against the built artifact. Many build plugins and container scanners can emit SPDX or CycloneDX JSON; the important part is regenerating it on every build and storing it with the artifact.

Sources

Get new posts in your inbox

© 2026 Malhar Ujawane. Built with Astro.