Back to blog
DevOps
IntermediateForPlatform EngineersDevOps EngineersSecurity Engineers
7 min

SBOM Won't Stop the Next Log4j — Here's What Actually Would

An SBOM is an inventory, not a defense. Generating one would not have stopped Log4Shell. What would: continuous CVE correlation, signed provenance, and VEX to kill the noise. A practical supply-chain security guide for 2026.

sbomsoftware-supply-chainlog4jvulnerability-managementsigstorevexdevsecops
Contents

In December 2021 the industry learned a humbling lesson. A critical remote-code-execution bug in Log4j — Log4Shell, CVE-2021-44228 — set the internet on fire. But the vulnerability itself wasn’t the worst part. The worst part was the question nobody could answer: “Do we even use log4j, and where?”

Teams spent days grepping build systems, spelunking through transitive dependencies, and paging engineers at 2am to ask which services pulled in a logging library four levels deep. The fix was a one-line version bump. Finding every place that needed it took weeks.

The lesson everyone took away was “we need an SBOM.” That’s half right — and the half that’s wrong is quietly making teams feel safe while they’re not.

An SBOM is a list of what you shipped. A list, by itself, stops nothing.

An SBOM is an inventory. Generating one does not stop the next Log4Shell any more than a packing list stops a fire. Here’s what an SBOM actually is, why it isn’t a defense, and the three things that turn it into one.

What an SBOM Actually Is (and Isn’t)

A Software Bill of Materials is a machine-readable list of the components inside a piece of software: names, versions, cryptographic hashes, licenses, and how they depend on one another. Two formats dominate — SPDX (Linux Foundation, ISO-standardized) and CycloneDX (OWASP). You generate one from a build with a tool like Syft, Trivy, or your package manager:

Terminal window
# Generate a CycloneDX SBOM for a container image
syft my-registry/app:1.4.2 -o cyclonedx-json > app-1.4.2.sbom.json

That’s it. You now have a precise, versioned answer to “what is inside this artifact.” It is genuinely useful — and it is genuinely inert. The SBOM does not scan for vulnerabilities, does not block a bad build, and does not fix anything. It is a record, not a control.

This is the trap: teams add SBOM generation to CI, watch the files pile up in a bucket, check the compliance box, and believe they’ve addressed supply-chain risk. They’ve addressed the documentation of it. The risk is untouched.

Why the List Alone Would Not Have Saved You

Play the Log4Shell timeline forward with an SBOM in hand. On December 8, 2021, your SBOM lists log4j-core 2.14.1. Zero known vulnerabilities. Your scanner is green. Everything looks perfect.

On December 9, CVE-2021-44228 is published. Nothing in your SBOM changed — the world changed. The exact same inventory line is now a five-alarm fire. If your SBOM is a static file generated once and dropped in storage, it tells you nothing until a human thinks to go re-examine it.

The value of an SBOM is not created when you generate it. It’s realized in the future, every time you re-evaluate it against what the world has newly learned. A list you never look at again is a list that fails you on exactly the day you need it.

The same SBOM, two days apart: a one-time file misses Log4Shell; continuous re-scanning catches it the hour the CVE drops.

So the SBOM is necessary but nowhere near sufficient. Three things turn it from a filing-cabinet artifact into something that would actually have contained Log4Shell.

Thing 1: Continuous Correlation, Not a One-Time Scan

An SBOM lists components; it takes a vulnerability scanner to compare that list against known-CVE databases — NVD, OSV, the GitHub Advisory Database — and tell you what’s affected. The move most teams miss is that you must scan the same SBOM repeatedly over time, not once at build.

Terminal window
# Scan a stored SBOM against today's known vulnerabilities
grype sbom:./app-1.4.2.sbom.json
# Or query the OSV database directly
osv-scanner --sbom=app-1.4.2.sbom.json

Run that in a nightly job against every SBOM you’ve ever shipped, not just the one you built this morning. Now when a new CVE lands, the alert fires automatically against every affected artifact — and “where do we run log4j?” becomes a query that returns in minutes, with exact versions and locations. That is the capability everyone wished they had in December 2021. The SBOM makes it possible; the continuous scan makes it real.

This is the same discipline that separates a real cloud-security posture from a dashboard of green checkmarks. If you’re building that muscle, see Build Your Own CSPM on GCP: Security Command Center vs Open Source.

Thing 2: Provenance, or the SBOM Is Just a Story

Here’s the uncomfortable question: if an attacker compromises your build pipeline, what stops them from handing you a clean-looking SBOM that omits the malicious component? Nothing — unless the SBOM is signed and carries build provenance.

This is where Sigstore (via cosign) and SLSA (Supply-chain Levels for Software Artifacts) come in. You sign the SBOM and attach it as a verifiable attestation to the artifact, using keyless signing tied to your CI’s identity:

Terminal window
# Attach the SBOM to the image as a signed, verifiable attestation
cosign attest --predicate app-1.4.2.sbom.json \
--type cyclonedx my-registry/app:1.4.2
# At deploy time, verify it really came from your pipeline
cosign verify-attestation --type cyclonedx \
--certificate-identity-regexp '.*@your-org\.com' \
my-registry/app:1.4.2

Now the inventory is trustworthy: it provably came from your build system and wasn’t altered. Enforce it at the door with an admission policy that refuses any image without a valid, signed SBOM attestation. An SBOM you cannot verify is inventory theater — it feels like control and provides none.

Thing 3: VEX, or Your Team Drowns in False Positives

Point a scanner at a real SBOM and you’ll get hundreds of “vulnerable” findings. The overwhelming majority are not exploitable in your context: the vulnerable function is never called, the component isn’t loaded at runtime, or a mitigation already neutralizes it. Hand that raw list to a security team and they’ll do what any human does with a firehose of noise — start ignoring it. That’s exactly when the one finding that matters slips through.

VEX (Vulnerability Exploitability eXchange) is the fix. It’s a companion document that states, per CVE, whether you are actually affected — not_affected, affected, fixed, under_investigation — with a justification:

{
"vulnerability": { "name": "CVE-2021-44228" },
"products": ["pkg:maven/org.apache.logging.log4j/log4j-core@2.14.1"],
"status": "affected",
"action_statement": "Upgrade to 2.17.1; JNDI lookup disabled as interim mitigation."
}

VEX turns a wall of red into a short, honest list of what’s real. It’s the difference between a security queue people act on and one they’ve learned to swipe away.

What Actually Would Have Contained Log4Shell

Put the pieces together and the picture is clear. It was never the SBOM. It was the system around it:

  1. Every deployed artifact ships a signed SBOM with build provenance, stored centrally and queryable.
  2. Those SBOMs are continuously re-scanned against new CVEs, so Log4Shell fires an alert the hour it’s published — across every affected service at once.
  3. Provenance means you trust the inventory instead of hoping it’s honest.
  4. VEX filters the results to what’s genuinely exploitable, so responders move on the real fire instead of triaging noise.

Four layers turn an SBOM from a filing-cabinet artifact into a defense: inventory, correlate, verify, triage.

With that in place, “where do we run log4j?” is answered in minutes, the response is scoped precisely, and the fix ships before attackers finish scanning. The SBOM is the foundation — but the foundation isn’t the house.

Continuous scanning and signed provenance belong in the pipeline itself, not bolted on afterward. For hardening the pipeline that produces all this, see Secure GitLab CI/CD in 2026: A Practical Hardening Playbook.

This Is About to Be the Law, Not a Nice-to-Have

If ROI wasn’t enough, regulation is closing the gap. The US Executive Order 14028 already requires SBOMs for software sold to the federal government. The EU Cyber Resilience Act goes further: from 2027 it mandates SBOMs and vulnerability handling for effectively all products with digital elements sold in the EU. The teams treating SBOM as a checkbox today are the ones who’ll discover, too late, that the checkbox was supposed to be a working system.

The Field Rule

An SBOM is an inventory, not a defense — generating one and filing it away is security theater that would not have stopped Log4Shell. What stops the next one is the system around the list: continuously re-scan every SBOM against new CVEs so a fresh vulnerability fires an alert the hour it drops; sign the SBOM and attach build provenance so the inventory is trustworthy instead of forgeable; and layer VEX on top so the one real finding isn’t buried under hundreds of unreachable ones. Build that, and the next Log4Shell is a query and a scoped rollout — not a week of grep and prayer.

Frequently asked questions

Does generating an SBOM make my software more secure?

No — not on its own. An SBOM (Software Bill of Materials) is a machine-readable inventory of the components in your software: names, versions, hashes, licenses and dependency relationships. It records what you shipped; it does not scan, block, or fix anything. Security only appears when you act on the SBOM: correlate it against vulnerability databases continuously, verify it with signatures and provenance, and triage the results with VEX. The file itself is a prerequisite, not a control.

Would an SBOM have prevented Log4Shell?

It would not have prevented the vulnerability, but a good SBOM practice would have contained it dramatically. The reason Log4Shell (CVE-2021-44228) was so painful was that most organizations could not answer a simple question — 'where do we run log4j-core, and which version?' — so they spent days or weeks grepping build systems. A central, queryable inventory of every deployed artifact turns that week of panic into a database query answered in minutes. The catch: the SBOM must be re-scanned against new CVEs continuously, because log4j-core looked perfectly safe until the day the CVE dropped.

What is the difference between an SBOM and a vulnerability scan?

An SBOM lists components; a vulnerability scan compares those components against known-vulnerability databases (NVD, OSV, GitHub Advisory) and tells you which ones are affected. They are complementary: the SBOM is the stable record of what is inside an artifact, and the scan is a time-varying judgment layered on top of it. The key insight is that you scan the same SBOM again and again over time — a component with zero known CVEs today can have a critical one tomorrow, and only continuous re-scanning catches that.

What is VEX and why do I need it with an SBOM?

VEX (Vulnerability Exploitability eXchange) is a companion document that states, per CVE, whether your product is actually affected: not affected, affected, fixed, or under investigation, with a reason. You need it because a raw SBOM-to-scanner pipeline typically produces hundreds of 'vulnerable component' findings, most of which are not exploitable in your context — the vulnerable code path is never reached, the component isn't loaded, or a mitigation is already in place. Without VEX, security teams drown in false positives and start ignoring the queue, which is exactly when the one real finding slips through.

What is SLSA and Sigstore's role in supply-chain security?

SLSA (Supply-chain Levels for Software Artifacts) is a framework that grades how tamper-resistant your build pipeline is, and Sigstore (with cosign) is the tooling that makes signing and provenance practical without managing long-lived keys. Together they let you cryptographically prove that an artifact — and its SBOM — came from your build system and was not altered. This matters because an SBOM you cannot verify is worthless: an attacker who compromises your build can simply hand you a clean-looking but false inventory. Signed provenance is what makes the inventory trustworthy.

From the community

Discussion on the Fediverse

Replies from Mastodon and Bluesky — straight from the open web, no tracking.

Loading replies …

ENDE