# SBOM example: a CycloneDX and SPDX file, explained line by line

URL: https://sbombox.com/blog/sbom-example
By SBOMBox SBOM experts. Published 2026-11-13

> What a real SBOM looks like: an annotated CycloneDX JSON and SPDX JSON example, what each field means, and how to validate and quality-check your own file.

Short answer: an SBOM is a JSON (or XML) file with two parts: metadata about the document (who made it, when, with which tool, about which product) and a list of components (name, version, identifier, supplier, licence, hash) linked by dependency relationships. Below is a small but complete example in CycloneDX and in SPDX, then how to check your own file.

## A CycloneDX SBOM example

```json
{
  "bomFormat": "CycloneDX",
  "specVersion": "1.6",
  "serialNumber": "urn:uuid:1b4e28ba-2fa1-41d2-883f-0016d3cca427",
  "version": 1,
  "metadata": {
    "timestamp": "2026-11-13T09:00:00Z",
    "lifecycles": [{ "phase": "build" }],
    "tools": { "components": [{ "type": "application", "name": "syft", "version": "1.18.0" }] },
    "authors": [{ "name": "Example Ltd build team" }],
    "component": {
      "type": "application", "bom-ref": "app", "name": "invoice-service", "version": "3.2.0"
    }
  },
  "components": [
    {
      "type": "library",
      "bom-ref": "pkg:npm/express@4.21.2",
      "supplier": { "name": "OpenJS Foundation" },
      "name": "express",
      "version": "4.21.2",
      "purl": "pkg:npm/express@4.21.2",
      "licenses": [{ "license": { "id": "MIT" } }],
      "hashes": [{ "alg": "SHA-512", "content": "7f1a…" }]
    }
  ],
  "dependencies": [
    { "ref": "app", "dependsOn": ["pkg:npm/express@4.21.2"] }
  ]
}
```

**What each CycloneDX field is for**

| Field | Meaning | Minimum element |
| --- | --- | --- |
| `bomFormat`, `specVersion` | The format and its version | SBOM data format name and version |
| `serialNumber`, `version` | Identify this SBOM and its revision | SBOM version |
| `metadata.timestamp` | When it was generated | SBOM timestamp |
| `metadata.lifecycles` | Source, build or post-build | Generation context |
| `metadata.tools` | Generator name and version | Tool name and version |
| `metadata.authors` | Who produced the SBOM | SBOM author |
| `metadata.component` | The product the SBOM describes | (the root of the dependency graph) |
| `supplier`, `name`, `version` | Who makes the component, what it is, which version | Component producer, name, version |
| `purl` | A package URL that vulnerability databases understand | Component identifiers |
| `licenses`, `hashes` | Licence and integrity hash | Component licence, hash value and algorithm |
| `dependencies` | Which component pulls in which | Dependency relationship |

The right-hand column maps to CISA's [2026 SBOM minimum elements](https://sbombox.com/blog/sbom-minimum-elements). Hashes are shortened here; a real file carries the full value.

## The same SBOM in SPDX

```json
{
  "spdxVersion": "SPDX-2.3",
  "dataLicense": "CC0-1.0",
  "SPDXID": "SPDXRef-DOCUMENT",
  "name": "invoice-service-3.2.0",
  "documentNamespace": "https://example.com/spdx/invoice-service-3.2.0-1b4e28ba",
  "creationInfo": {
    "created": "2026-11-13T09:00:00Z",
    "creators": ["Organization: Example Ltd", "Tool: syft-1.18.0"],
    "comment": "Generated at build time from the release artifact."
  },
  "packages": [
    {
      "SPDXID": "SPDXRef-app", "name": "invoice-service", "versionInfo": "3.2.0",
      "downloadLocation": "NOASSERTION"
    },
    {
      "SPDXID": "SPDXRef-express",
      "name": "express",
      "versionInfo": "4.21.2",
      "supplier": "Organization: OpenJS Foundation",
      "downloadLocation": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
      "licenseConcluded": "MIT",
      "checksums": [{ "algorithm": "SHA512", "checksumValue": "7f1a…" }],
      "externalRefs": [{
        "referenceCategory": "PACKAGE-MANAGER", "referenceType": "purl",
        "referenceLocator": "pkg:npm/express@4.21.2"
      }]
    }
  ],
  "relationships": [
    { "spdxElementId": "SPDXRef-DOCUMENT", "relationshipType": "DESCRIBES", "relatedSpdxElement": "SPDXRef-app" },
    { "spdxElementId": "SPDXRef-app", "relationshipType": "DEPENDS_ON", "relatedSpdxElement": "SPDXRef-express" }
  ]
}
```

The content is the same; the shape differs. SPDX keeps creators as typed strings, identifiers in `externalRefs` and the graph in `relationships`. If you are choosing between them, see [CycloneDX or SPDX?](https://sbombox.com/blog/cyclonedx-vs-spdx-which-to-pick).

## How to validate and check an SBOM

Two different checks matter, and most teams only run the first:

- Schema validation: is the file valid CycloneDX or SPDX? Use the CycloneDX CLI (`cyclonedx validate --input-file sbom.cdx.json`), IBM's open-source `sbom-utility`, or the SPDX project's `pyspdxtools -i sbom.spdx.json`. A file can pass this and still be useless.
- Quality and compliance: does it contain what a recipient needs, such as exact versions, purls, suppliers, hashes, licences and a dependency graph, for every component? Drop the file on the [free SBOM checker](https://sbombox.com/audit) to score it and see requirement-level results against CRA readiness, CISA 2026, NTIA and BSI TR-03183-2.

## Where real SBOMs fall short

- Missing versions or version ranges instead of exact versions. Vulnerability matching fails without them.
- No purl or CPE, so scanners cannot find the component in vulnerability databases.
- No supplier names, which almost every generator leaves blank for open-source packages.
- No hashes, so nobody can confirm the listed component is the one shipped.
- A flat list with no dependencies, so you cannot trace how a vulnerable library got in.

To produce an SBOM like this automatically, see [generating an SBOM in GitHub Actions](https://sbombox.com/blog/sbom-github-actions) or [Syft vs Trivy vs cdxgen](https://sbombox.com/blog/syft-vs-trivy-vs-cdxgen).

## Frequently asked questions

### What does an SBOM look like?

A machine-readable JSON or XML file. It has document metadata (author, timestamp, tool, the product described) and a list of components, each with a name, version, identifier such as a purl, supplier, licence and hash, plus the dependency relationships between them.

### What format is an SBOM?

Almost always CycloneDX or SPDX, usually in JSON. Both are international standards: CycloneDX is ECMA-424 and SPDX is ISO/IEC 5962.

### How do I validate an SBOM?

Validate the schema with a tool such as the CycloneDX CLI, sbom-utility or the SPDX tools, then check its quality: whether every component has the fields needed for vulnerability and licence management. The SBOMBox free checker does the quality check.

### Where can I find SBOM examples?

The CycloneDX project publishes example BOMs on GitHub, and the SPDX specification includes examples. The annotated examples on this page show a minimal file that meets CISA's 2026 minimum elements.
