Skip to content

Lesson 9 of 14 · 12m

SBOMs Are an Incident Tool, Not Paperwork

Log4Shell proved the SBOM's job is answering 'do we ship it' in minutes — generate per artifact, keep it queryable.

December 9, 2021: the weekend everyone needed an inventory

CVE-2021-44228 — Log4Shell — dropped on a Thursday. log4j-core versions 2.0 through 2.14.1 would evaluate JNDI lookups in logged strings; JndiLookup class removal was the emergency mitigation, and 2.15.0 the rushed fix (then 2.16.0 for CVE-2021-45046). Every JVM shop had the same question: do we ship it?

Teams with an SBOM answered by grepping a JSON file. log4j-core, version range, which artifacts, which services. Minutes. Teams without one spent the weekend running find / -name 'log4j*' across hosts and untangling shaded JARs. The difference wasn't tooling budget — it was whether the dependency list existed as data or as folklore.

What an SBOM actually is

An SBOM is a machine-readable list of the components in an artifact. Two formats own the space: SPDX (ISO/IEC 5962:2021) and CycloneDX (OWASP, now ECMA-424). The NTIA minimum elements (July 2021, in the wake of Executive Order 14028) define what "counts": supplier, component name, version, unique identifier (purl like pkg:npm/lodash@4.17.21 or CPE), dependency relationships, author, timestamp. That's it — an inventory. No scores, no opinions.

Generation is a one-liner per ecosystem: syft <image> -o cyclonedx-json=sbom.json for containers, npm sbom for npm trees, cdxgen across twenty ecosystems, trivy fs --format cyclonedx . for whatever's lying around. Consumption is a different tool: grype sbom:sbom.json or osv-scanner --sbom=sbom.json maps the inventory onto CVE databases (NVD, GHSA, OSV). The SBOM is the index; the scanner is the lookup.

Two gotchas decide whether your SBOM is honest. First, staleness: an SBOM generated once at project setup describes a dependency tree that no longer exists — regenerate per build, per artifact. Second, completeness: shaded JARs, vendored vendor/ trees, and statically-linked Go binaries hide components from naive generators. syft on the image or binary catches more than a manifest-level scan, because it reads what actually shipped rather than what the build file claims. And because identifiers are purls — pkg:<type>/<name>@<version> — the incident query is a plain string match across every stored SBOM, no scanner required for the first pass.

The wrong mental model

"SBOMs are compliance paperwork" — something procurement demands and the build farm emits and nobody reads. Log4Shell inverted that permanently: the SBOM is an incident response instrument. Its value isn't the file existing; it's that jq can answer "which services contain pkg:maven/org.apache.logging.log4j/log4j-core@2.13.1" while the advisory is still fresh.

A subtler trap: an SBOM says what you ship, not whether you're vulnerable. log4j-core@2.14 in the inventory doesn't mean the JNDI path is reachable — and a not affected annotation is where VEX comes in. VEX (Vulnerability Exploitability eXchange) is the companion document that records the human verdict: affected / not affected / fixed / under investigation. Inventory answers "where"; VEX answers "so what."

What to actually do

  • Generate at build time, per artifact. syft registry.example/app:1.4.2 -o cyclonedx-json in the release pipeline, stored next to the image — per version, not per repo.
  • Keep them queryable. A directory of sbom-<version>.json files per service is already 90% of the value. The incident query is a grep.
  • Scan on demand, not just on schedule. When the next Log4Shell lands, grype sbom: over the current files is the blast-radius answer — before you've patched anything.
  • Annotate with VEX for the dependencies that are present but unreachable, so the next scanner run doesn't re-sound the same alarm.
  • Don't conflate generation with detection. syft builds the list; grype/osv-scanner answer "what's bad in it." A fresh SBOM plus a stale scanner DB still misses last night's advisory — refresh both.

An SBOM won't stop a bad package from shipping. It stops you from spending a week finding out whether you shipped it.

Was this lesson helpful?

Sign in to rate

Keep reading

Related articles from the SudoSecurity blog.