What is an SBOM, and does a vibe-coded app need one?
What is the difference between an SBOM and a lockfile? A lockfile is the package manager's private record; an SBOM is a standard document anyone's tools can read. package-lock.json exists so npm can reinstall exactly the same tree. Its layout is npm's own, not a cross-language standard.
Cite
CodeLifter Forum, "What is an SBOM, and does a vibe-coded app need one?", https://codelifter.com/forum/posts/what-is-an-sbom-and-does-a-vibe-coded-app-need-one/, accessed 2026-11-25.- CodeLifter editorsStaffStaff, CodeLifter ·
An SBOM, or software bill of materials, is a machine-readable list of every component in a piece of software: each package, its version, supplier, licence and what depends on what. A small vibe-coded app is rarely required to publish one, but producing one takes a single command and shows exactly which packages the assistant pulled in.
What is an SBOM?
The US Cybersecurity and Infrastructure Security Agency describes an SBOM as "a nested inventory, a list of ingredients that make up software components." Nested means it records not just the packages you asked for (direct dependencies) but the packages those packages need (transitive dependencies), which is usually most of the list.
The idea comes from manufacturing, where a bill of materials lists every part in a product. CISA's page says the software version has been worked on since 2018 through a multistakeholder process run by the National Telecommunications and Information Administration (NTIA), and that the "Minimum Elements" defined under Executive Order 14028 are published by NTIA.
What goes in one?
NTIA's minimum elements report (12 July 2021) sets seven baseline data fields. Here they are, with what npm puts in each one for a single dependency, taken from the example in the npm sbom documentation:
NTIA field What it means npm example value Supplier Name Who makes the component author: John-David DaltonComponent Name The package name lodashVersion of the Component The exact version 4.17.21Other Unique Identifiers A lookup key, such as a package URL pkg:npm/lodash@4.17.21Dependency Relationship What depends on what simple@1.0.0depends onlodash@4.17.21Author of SBOM Data The tool or person that wrote the SBOM npmcliTimestamp When it was generated 2023-09-01T00:00:00.001Znpm also records each package's licence (
MITin the example), a SHA-512 hash of the downloaded file, and links to its repository and issue tracker. A package URL, or purl, is a standard string that names a package and its registry, so tools can match it against vulnerability databases.SPDX or CycloneDX: which format?
Two formats dominate, and most tools write both.
Format Version npm writes Command Example output file SPDX SPDX-2.3 npm sbom --sbom-format spdxsbom.spdx.jsonCycloneDX 1.5 npm sbom --sbom-format cyclonedxsbom.cdx.jsonPick the one your customer, platform or scanner asks for. If nobody asks, either works. GitHub's dependency graph export writes SPDX.
Does a vibe-coded app need one?
Legally, it depends on what you sell and to whom, and we are not going to guess for your case. The EU's Cyber Resilience Act sets cybersecurity requirements for products with digital elements sold in the EU; the Commission says its main obligations apply from 11 December 2027, with reporting duties from 11 September 2026. If you sell software into the EU, read the legal text or the Commission's guidance for what it asks of you; we have not summarised its documentation duties here.
Practically, an SBOM earns its keep on AI-written projects for three reasons:
- You see what was installed. Assistants add dependencies freely, and sometimes suggest packages that do not exist or were registered by an attacker; the thread on hallucinated packages explains the risk. An SBOM puts every name and version in one file you can read.
- You see the licences. The
licensesfield shows at a glance whether a GPL or unknown licence slipped in. The commercial use thread explains why that matters before you sell. - You can answer "are we affected?" When a vulnerability is announced in a package, a stored SBOM for each release tells you which versions shipped it.
How do you generate one?
For a Node.js project with npm 11:
- Install dependencies first, or rely on the lockfile.
npm sbomreadsnode_modules; add--package-lock-onlyto read onlypackage-lock.json. - Run
npm sbom --sbom-format cyclonedx > sbom.cdx.json(or--sbom-format spdx > sbom.spdx.json). - Leave out development tools if you only want what ships: add
--omit dev. - If you publish an app rather than a library, add
--sbom-type application; the default islibrary. - Commit the file with each release tag, or attach it to the release.

Generating an SBOM with npm in five steps, as set out in this article On GitHub you can also open the repository, click Insights, then Dependency graph, then Export SBOM. GitHub's page says the export includes "versions, package identifiers, licenses, transitive paths, and copyright information", and that it lists Actions such as the Anchore SBOM Action and the SPDX Dependency Submission Action for generating one in CI.
What does an SBOM not show?
It lists packages. It does not show a function pasted from a forum answer, a block an assistant reproduced from a public repository, or which lines were generated at all. Those need a record next to the code; the provenance record thread lists the fields, and the CodeLifter desk article on the provenance record explains where each one lives. For the wider security checklist, see vibe coding security.
Short version
- An SBOM is a machine-readable inventory of every package in your software, including the packages your packages need.
- NTIA's baseline has seven fields: supplier, name, version, unique identifier, dependency relationship, SBOM author and timestamp.
npm sbom --sbom-format cyclonedxor--sbom-format spdxmakes one in a second; GitHub can export one from the dependency graph.- Whether the law requires one depends on your market; the practical case for AI-written apps is seeing what was installed and under which licences.
Write something first.
Give people something to work with: at least 30 words on what happened and what you tried.
That is too long. Keep it under 6,000 characters.
Write the question as the title, 15 to 140 characters, no links.
Pick a category.
Add a name (2 to 40 characters, no links).
That email address does not look right.
That was quick. Read the thread, then try again.
The form expired. Reload the page and post again.
Something went wrong with the form. Reload and try again.
Please complete the check and post again.
Limit reached for now. Try again later.
This thread is closed to new replies.
This thread no longer accepts replies.
Something went wrong with the form. Reload and try again.
Post a reply or question first (name and email), then this browser can vote, edit and accept answers.
You cannot vote on your own post.
Only the author (within 30 days) or the forum team can do that.
That email already has an account. Use your sign-in link instead.
New accounts are paused for the moment. Try again later.
That was already posted.
1 answer
- CodeLifter editorsStaffStaff, CodeLifter ·
What is the difference between an SBOM and a lockfile? A lockfile is the package manager's private record; an SBOM is a standard document anyone's tools can read.
package-lock.jsonexists so npm can reinstall exactly the same tree. Its layout is npm's own, not a cross-language standard. An SBOM in SPDX or CycloneDX uses the same fields whatever the language, so a scanner, a customer or an auditor can read it without knowing your build.The content differs too. The npm sbom documentation shows the SBOM adding a package URL, the declared licence, a supplier, a description, repository links and a timestamp for the document itself, and it can mark the root as a
library,applicationorframeworkwith--sbom-type. The page also shows the relationship: with--package-lock-only, "only the information in the package lock (or shrinkwrap) is loaded", so details that come from each dependency's ownpackage.json, such as description and homepage, drop out. Keep both. The lockfile makes builds repeatable; the SBOM describes what you built to people and tools outside your project.