Calendar Icon White
December 5, 2026
Clock Icon
9
 min read

SBOM: What It Is and How to Generate One

What an SBOM is, CycloneDX vs. SPDX, why customers and regulators ask for one, and how to generate a software bill of materials from your lockfiles.

SBOM: What It Is and How to Generate One
ChatGPT
Perplexity
Grok
Google AI
Claude
Summarize and analyze this article with:

TL;DR

An SBOM, or software bill of materials, is a machine-readable list of every component in your software: each open-source package, its exact version, who supplies it and what depends on what. You can generate one in minutes from your lockfiles in CycloneDX or SPDX format, and the hard part is keeping it current and acting on it.

This guide covers what goes into an SBOM, how CycloneDX and SPDX differ, why customers and regulators now ask for one, and how to generate it with free SBOM generator tools, with the exact commands. It is written by Strac, a Y Combinator-backed data security company trusted by enterprises, whose dependency scanning exports SBOMs on demand.

✨ What an SBOM is and what goes in it

Think of an SBOM as the ingredient list for an application. Its job is to answer one question quickly and reliably: what exactly are we running? The US baseline for what that list must contain comes from the NTIA's Minimum Elements for a Software Bill of Materials, published in 2021:

The seven NTIA minimum SBOM data fields: supplier, component name, version, unique identifiers, dependency relationship, author and timestamp

The NTIA document also expects SBOMs to be machine-readable and generated automatically, and CISA now leads the US government's SBOM work. In practice, the identifier that makes an SBOM useful is the package URL, or purl, such as pkg:npm/lodash@4.17.21, because it lets a scanner match a component to advisories without guessing.

What an SBOM looks like: a CycloneDX example

Here is a trimmed CycloneDX JSON SBOM with one component and one dependency relationship. A real one for a web app has hundreds of components, but each looks like this:

{
  "bomFormat": "CycloneDX",
  "specVersion": "1.6",
  "metadata": {
    "timestamp": "2026-12-05T10:00:00Z",
    "tools": { "components": [{ "type": "application", "name": "cdxgen" }] },
    "component": { "type": "application", "name": "your-app", "version": "3.2.0" }
  },
  "components": [
    {
      "type": "library",
      "bom-ref": "pkg:npm/lodash@4.17.21",
      "name": "lodash",
      "version": "4.17.21",
      "purl": "pkg:npm/lodash@4.17.21",
      "licenses": [{ "license": { "id": "MIT" } }],
      "hashes": [{ "alg": "SHA-512", "content": "<from package-lock.json>" }]
    }
  ],
  "dependencies": [
    { "ref": "your-app", "dependsOn": ["pkg:npm/lodash@4.17.21"] }
  ]
}

Every NTIA field is there: the supplier and name, the exact version, a purl as the unique identifier, the dependency relationship, the tool that authored it and a timestamp. Notice that none of it required anything beyond the lockfile.

✨ Why customers and regulators ask for an SBOM

For most software companies the first SBOM request comes from a customer's security questionnaire, usually after a large supply chain incident has made their own security team ask the same question of every vendor. Regulation is following the same path:

Who asks for an SBOM: enterprise customers, US federal buyers, the FDA and the EU Cyber Resilience Act

The details: Executive Order 14028 (2021) made SBOMs part of US federal software security guidance. The FDA requires an SBOM in premarket submissions for cyber devices. And the EU Cyber Resilience Act requires manufacturers of products with digital elements to draw up an SBOM covering at least top-level dependencies, with its main obligations applying from December 11, 2027 and vulnerability reporting duties from September 11, 2026.

Even where no law applies, the commercial pressure is real. A single enterprise deal can stall for weeks on a vendor review, and being able to send a current SBOM, with your patch deadlines and the evidence that you meet them, is one of the fastest ways to clear the security section of that review.

CycloneDX vs. SPDX: which SBOM format to use

There are two widely used SBOM formats, and the honest answer is that either works for most purposes. Pick the one your customers ask for, and use tools that can produce both.

CycloneDXSPDX
StewardOWASP FoundationLinux Foundation
StandardECMA-424ISO/IEC 5962:2021
OriginBuilt for application security and supply chain riskBuilt for license compliance, extended to security
FormatsJSON, XML, Protocol BuffersJSON, YAML, RDF, tag-value, spreadsheet
StrengthsVulnerability (VEX) data, services, lightweightRich license and file-level detail, long track record
Typical askerSecurity teams, questionnairesLegal, open-source program offices, some government buyers

If nobody has specified, CycloneDX JSON is the more common default in security questionnaires. Strac exports both, so the format question never blocks a deal.

✨ SBOM generator tools: how to create one from lockfiles

An SBOM generator reads the same lockfiles your package manager uses and writes them out in a standard format. You likely already have one installed. Run these from the project root:

# npm 10.1+: built-in SBOM, CycloneDX or SPDX
npm sbom --sbom-format=cyclonedx > sbom.cdx.json
npm sbom --sbom-format=spdx      > sbom.spdx.json

# OWASP cdxgen: many ecosystems, recursive through a monorepo
npx @cyclonedx/cdxgen -r -o sbom.cdx.json .

# Python: CycloneDX from a requirements file or the installed environment
pip install cyclonedx-bom
cyclonedx-py requirements requirements.txt -o sbom.cdx.json

# GitHub: export the dependency graph of a repo as SPDX
gh api repos/OWNER/REPO/dependency-graph/sbom > sbom.spdx.json

Each command produces a valid SBOM for one project. The gaps show up at company scale: dozens of repos, several ecosystems per repo, and a customer who wants one document for the whole product. That is where a platform helps. Strac reads every lockfile across your GitHub and GitLab repos, monorepos included, keeps one inventory of every direct and transitive package, and exports it as CycloneDX or SPDX in one click. See Strac's SBOM export.

Strac dependency finding built from the package inventory, showing the chain your-app to build-tool to vulnerable-package
The inventory behind an SBOM also powers every dependency finding.

Need an SBOM for a security questionnaire this week?

Book a demo of Strac's SBOM export  ·  Run a free security scan

Container images need an SBOM too

If you ship containers, your application SBOM is only part of the story: the base image brings its own operating system packages. Container-aware generators such as OWASP cdxgen can read an image as well as a source tree, and many registries can attach an SBOM to an image as an attestation. For a SaaS company the usual approach is one SBOM per service, covering both the application lockfiles and the image it runs in.

Choosing an SBOM generator

OptionBest forFormatsLimits
npm sbomSingle npm projectsCycloneDX, SPDXnpm only, one project at a time
OWASP cdxgenPolyglot repos and monorepos in CICycloneDXYou manage storage and monitoring
cyclonedx-pyPython projectsCycloneDXPython only
GitHub dependency graph exportQuick export of a GitHub repoSPDXOne repo at a time, GitHub only
StracEvery repo, one inventory, kept currentCycloneDX, SPDXPart of Strac Comply, alongside SCA, secrets and cloud

Whatever you choose, generate in CI rather than by hand, and store each SBOM with the release it describes. A hand-made SBOM is out of date the day after it is made.

✨ Turning an SBOM into security, not paperwork

An SBOM by itself fixes nothing. Its value comes from what you do with it after it is generated:

Four steps for a useful SBOM: generate, store, monitor, share

The monitoring step is the one that pays off. When a new advisory or a hijacked release hits the news, a monitored inventory tells you in seconds whether any product is affected and which version. You can already do a manual version of this with an SBOM and Google's free scanner:

# check an existing CycloneDX or SPDX SBOM against osv.dev
osv-scanner scan source -L sbom.cdx.json

Strac does this continuously: every new vulnerability or malware advisory is matched against the stored inventory without rescanning, ranked with actively exploited issues first, and fixed with a pull request carrying the smallest safe upgrade. That is the core of software composition analysis, and it is why our software supply chain security guide treats the SBOM as an incident response tool first.

SBOM vs. SCA: how they fit together

An SBOM and software composition analysis are built from the same inventory but answer different questions. The SBOM is a document: what is in this release, in a format someone else can read. SCA is a process: which of those components are vulnerable, malicious, unlicensed or end of life, and what to do about it. You can have an SBOM without SCA, but it is a list nobody checks. You can run SCA without exporting an SBOM, but you will rebuild the inventory by hand the first time a customer asks. Running both from one inventory avoids both problems.

VEX: telling customers which vulnerabilities do not affect you

The first thing a customer does with your SBOM is scan it, and the scan will flag vulnerabilities in components you ship. Many will not affect you: the vulnerable function is never called, the component is only used in tests, or a configuration blocks the attack. VEX, short for Vulnerability Exploitability eXchange, is a machine-readable way to say so, with a status such as not affected, affected, fixed or under investigation for each one. CycloneDX can carry VEX data inside the SBOM or alongside it. Sharing VEX with an SBOM saves both sides a round of questions.

What a good SBOM includes beyond the minimum

The seven minimum fields get you a compliant document. A few more make it far more useful to the people who read it:

  • Licenses for every component, so legal review does not need a second pass. Strac flags GPL, AGPL and unlicensed packages.
  • Hashes from the lockfile, so a component can be verified, not just named.
  • Vulnerability status, often shared as VEX (Vulnerability Exploitability eXchange), stating which known issues do not affect you and why.
  • End-of-life markers for runtimes and frameworks no longer receiving security fixes.

Customers reviewing vendors increasingly look for exactly this context. If your company runs vendor reviews of its own, our third-party risk management policy guide shows how to ask suppliers for SBOMs in turn.

How to answer a customer's SBOM request

When the request arrives in a security review, a calm, repeatable answer works better than a rushed export:

  1. Confirm scope. Which product, which version, and which format: CycloneDX or SPDX.
  2. Generate from the release. Use the SBOM produced by CI for the version the customer runs, not a fresh one from main.
  3. Add context. Note known vulnerabilities that do not affect the product and why, and your patch deadlines.
  4. Share under terms. Many companies share SBOMs under NDA or through a trust portal, because they reveal versions.
  5. Keep a record. Log what was shared, with whom and when.

Common SBOM mistakes

Most SBOM problems are process problems:

  • Generating from manifests. Without the lockfile you get version ranges, not versions, and no transitive packages.
  • One-off exports. A hand-made SBOM is wrong after the next deploy.
  • Missing identifiers. Without purls, scanners have to guess which component is which.
  • Nobody watching it. An SBOM in a folder does not tell you when a new advisory affects you; continuous matching does.
  • Ignoring the image. The base image is often where the oldest packages live.

SBOMs, SOC 2 and security questionnaires

SOC 2 does not require an SBOM, but the inventory behind it supports controls auditors do test: asset inventory, vulnerability detection under CC7.1 and vendor risk under CC9.2. In practice, the SBOM request arrives in the same questionnaire that asks how fast you patch and whether you scan dependencies, so it pays to answer all three from one system. Strac keeps the inventory, the findings and the fix dates together, saves them as SOC 2, ISO 27001 and HIPAA evidence, and runs beside secret scanning and cloud checks in one platform. For tool options, see our roundup of the best SCA tools, and for the bigger picture our guide to application security posture management.

Know every component you ship, and export the SBOM in one click.

Book a demo of Strac's SBOM and SCA  ·  Run a free security scan

🌶️ Spicy FAQs about SBOMs

What is an SBOM?

A software bill of materials (SBOM) is a machine-readable list of every component in a piece of software, with versions, suppliers and the relationships between them. It is the ingredient list for an application.

What is the difference between CycloneDX and SPDX?

Both are open, machine-readable SBOM formats. CycloneDX is an OWASP project focused on security use cases and standardized as ECMA-424. SPDX is a Linux Foundation project that began with license compliance and is an international standard, ISO/IEC 5962:2021. Most tools can produce either.

Is an SBOM required by law?

In some cases. US federal agencies can require one from software suppliers under Executive Order 14028, the FDA requires one in premarket submissions for cyber devices, and the EU Cyber Resilience Act requires manufacturers to keep one from December 2027. For most SaaS companies the practical driver is enterprise customers' security questionnaires.

How often should I generate an SBOM?

On every release, at minimum. An SBOM describes one build, so a stale one is misleading. The useful version is generated automatically in CI and continuously checked against new vulnerability advisories.

Does an SBOM expose my code to customers?

No. An SBOM lists the third-party components and versions you use, not your source code. Some companies share it only under NDA, because it does reveal which versions you run.

Customer story

“Don’t just alert on problems, fix them.”

Scott Roberts, Chief Information Security Officer, UiPath

  • UiPath
  • Crypto.com
  • Inmar Intelligence
  • thredUP
  • Paymentology
  • Enveda
  • Genesis Molecular AI
  • MeridianLink
More customer stories →
What is an SBOM?
What is the difference between CycloneDX and SPDX?
Is an SBOM required by law?
How often should I generate an SBOM?
Does an SBOM expose my code to customers?
Discover & Protect Data on SaaS, AI, MCP, Endpoints & Cloud
Strac provides end-to-end data loss prevention for all SaaS and Cloud apps. Integrate in under 10 minutes and experience the benefits of live DLP scanning, live redaction, and a fortified SaaS environment.
Get compliant from $4,995

Latest articles

Browse all

Get Your Datasheet

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Close Icon