# SBOM (software bill of materials)

A software bill of materials, SBOM, is a machine-readable list of every component and dependency a piece of software is built from, with versions, so anyone can tell whether a newly published vulnerability affects it. The two common formats are CycloneDX and SPDX; Meadowstack 2.1 ships no SBOM, but its pinned lockfile lets you make one for your app in one command.

Checked 2 December 2026. By Bohuslav Poláček. https://meadowstack.com/glossary/sbom/

*npm's own command writes a CycloneDX SBOM of an app's production dependencies from its lockfile.*

```bash
# In the app's folder, after npm ci
npm sbom --sbom-format cyclonedx --sbom-type application --omit dev > sbom.cdx.json

# The same in SPDX
npm sbom --sbom-format spdx --sbom-type application --omit dev > sbom.spdx.json
```

## Why it matters in a business app

When a widely used library turns out to have a hole, the first question is "are we affected?". Without an SBOM that is a search through repositories; with one it is a lookup. Clients and auditors increasingly ask for one, and the EU's [Cyber Resilience Act](https://meadowstack.com/glossary/cyber-resilience-act/) requires manufacturers to draw one up "in a commonly used and machine-readable format" (Annex I, Part II).

The formats: **CycloneDX**, an OWASP-driven bill-of-materials standard published as ECMA-424, and **SPDX**, an open standard designated ISO/IEC 5962:2021. Both are fine; pick the one your client's tooling reads.

## How Meadowstack handles it

Truthfully, for 2.1:

- **No SBOM ships** with the framework or the starter.
- **What makes one possible:** a committed lockfile and pinned versions. `docs/security.md` asks you to install with `npm ci` (so the build uses the versions you reviewed), run `npm audit` and review every new dependency, and the framework's rule is to add one only when the kit cannot do the job.
- **What you do:** run the command above in your app with each release and keep the file with the release. npm's `--omit dev` leaves out build tools that never reach the browser; `--package-lock-only` reads the lockfile without `node_modules`.

Meadowstack 3.0, coming as an update to every licence, adds a CycloneDX SBOM with every release of the framework. Your app's own SBOM stays yours to produce, because your app has dependencies the framework does not know.

## Common mistakes

- **An SBOM of the repository, not the release.** Make it from the lockfile of what you deploy.
- **Made once, never again.** Every release changes it.
- **Dev tools mixed in.** A test runner in the list sends you chasing vulnerabilities that never ship.
- **An SBOM nobody reads.** Feed it to a scanner that watches for new advisories.

## Questions

### Should I use CycloneDX or SPDX?

Either. CycloneDX is published as ECMA-424 and SPDX as ISO/IEC 5962:2021; choose the one your client or your scanner reads, and npm can write both.

### Does Meadowstack provide an SBOM?

Not in 2.1. It keeps a lockfile and pinned versions so you can generate one with npm sbom; Meadowstack 3.0 adds a CycloneDX SBOM with every framework release.

### Is an SBOM required by law?

For manufacturers of products with digital elements in the EU, the Cyber Resilience Act requires one, with its main obligations applying from 11 December 2027. Clients and public buyers may ask for one earlier in their contracts.

## Sources

- [npm Docs, npm sbom](https://docs.npmjs.com/cli/v11/commands/npm-sbom), checked 2 December 2026
- [OWASP CycloneDX (ECMA-424)](https://cyclonedx.org/), checked 2 December 2026
- [SPDX (ISO/IEC 5962:2021)](https://spdx.dev/), checked 2 December 2026
- [Regulation (EU) 2024/2847, Annex I](https://eur-lex.europa.eu/eli/reg/2024/2847/oj/eng), checked 2 December 2026

## Related

- [Cyber Resilience Act (CRA)](https://meadowstack.com/glossary/cyber-resilience-act/) (Glossary)
- [OWASP ASVS](https://meadowstack.com/glossary/owasp-asvs/) (Glossary)
- [NIS2 Directive](https://meadowstack.com/glossary/nis2/) (Glossary)
- [NIS2 Article 21 checklist for web apps](https://meadowstack.com/blog/nis2-article-21-checklist-for-web-apps/) (Blog)
- [Team and roles, with the rules in code](https://meadowstack.com/screens/roles-and-permissions/) (Screens)
- [Permissions](https://meadowstack.com/patterns/permissions/) (Patterns)
