# SBOM, CBOM and AI-BOM

The CLI commands that write CycloneDX inventories of packages, cryptography and AI usage, and the commands that read, compare and enrich SBOMs from any tool.

SBOMs are for teams that must say exactly what is inside the software they ship, to a customer, an auditor or their own scanners, and for teams that receive SBOMs from suppliers and need to read and check them. An SBOM is the inventory. A [VEX](/vex.md) document says whether each vulnerability in that inventory affects you, and [attestation](/attestation.md) proves who produced either document. Start here when you need the inventory itself.

The Vulnesis CLI writes three kinds of CycloneDX bill of materials and reads SBOMs that any tool produced. Everything here runs locally. When you are authenticated, `cbom` and `aibom` send their result to Vulnesis, and `bom enrich` queries deps.dev, the package registries and the VDB, and sends the VEX it applied. `cdx` (unless `--sign`) and the other `bom` subcommands make no network calls.

## Commands

| Command | Writes or reads | Default output file | Sends to Vulnesis |
|---|---|---|---|
| [`vulnetix cdx`](/sbom/generate/cdx.md) (alias `sbom`) | Writes a package SBOM, with AI and crypto components by default | `.vulnetix/sbom.cdx.json` | No |
| [`vulnetix cbom`](/sbom/cbom/overview.md) | Writes a cryptography BOM with post-quantum posture | `.vulnetix/cbom.cdx.json` | Yes, unless `--no-upload` |
| [`vulnetix aibom`](/sbom/aibom/overview.md) | Writes an AI BOM: coding agents, SDKs, models, AI infrastructure | `.vulnetix/ai-bom.cdx.json` | Yes, unless `--no-upload` |
| [`vulnetix bom import`, `validate`](/sbom/read/import-and-validate.md) | Reads CycloneDX 1.0 to 1.7, SPDX 2.2 and 2.3, in-toto envelopes | none, unless `--out` | No |
| [`vulnetix bom diff`, `merge`, `tree`](/sbom/read/diff-merge-tree.md) | Compares, combines and walks documents | stdout or `--out` | No |
| [`vulnetix bom ls`, `where`, `skew`, `search`](/sbom/read/corpus-queries.md) | Queries a set of documents on disk | none | No |
| [`vulnetix bom enrich`](/sbom/read/enrich.md) | Adds licences, vulnerabilities and VEX to a document | `--out` (required) | VEX it applied, when authenticated |

`vulnetix sbom` produces and `vulnetix bom` inspects. `sbom` is an alias of `cdx`, so it always means CycloneDX.

Every command that writes a document can be told who made it, what it describes and what else belongs in it, from flags, environment variables or an overlay file. See [Author and customise](/sbom/author/overview.md).

Documents that reach Vulnesis are shown in the Resolve Platform: [SBOM Monitoring](/sbom/console/sbom-monitoring.md), the [AI Inventory](/sbom/console/ai-inventory.md) and the [Crypto Inventory](/sbom/console/crypto-inventory.md).

`vulnetix scan` runs the package, crypto and AI inventory passes as part of a full scan. The standalone commands exist for when you want the file, the terminal table, or a CI gate such as `cbom --fail-on`.

## Quick start

```bash
# Package SBOM of the current directory, written to .vulnetix/sbom.cdx.json
vulnetix cdx

# Just packages, no AI or crypto components
vulnetix cdx --no-aibom --no-cbom

# Read an SBOM somebody else made, and convert SPDX to CycloneDX
vulnetix bom import vendor.spdx.json --out vendor.cdx.json

# Fail a pull request that adds a vulnerable component
vulnetix bom diff base.cdx.json head.cdx.json --fail-on vuln-added

# Gate on quantum-vulnerable cryptography
vulnetix cbom --fail-on quantum-vulnerable
```

For a guided first run, follow the [SBOM quickstart](/sbom/get-started/quickstart.md). When a document is rejected or comes out incomplete, see [Troubleshooting](/sbom/reference/troubleshooting.md).

## Formats

| Format | Written by | Read by `bom` |
|---|---|---|
| CycloneDX JSON | `cdx`, `cbom`, `aibom`, `bom merge`, `bom enrich`, `bom import --out` | 1.0 to 1.7 |
| CycloneDX spec version written | `--spec-version 1.6` or `1.7` (default `1.7`) | |
| SPDX JSON | not written | 2.2, 2.3 |
| in-toto statement, bare or in a DSSE envelope | `cdx --sign` writes `<file>.intoto.jsonl` | yes, the SBOM is unwrapped from `predicate` |

Every document the CLI writes names itself in `metadata.tools` and names the organisation that ran it in `metadata.manufacturer`. See [Document identity and deployment labels](/sbom/reference/document-metadata.md).

## Related segments

- [VEX](/vex.md) reads and applies VEX statements to an SBOM.
- [Attestation](/attestation.md) signs and verifies SBOMs.
- [TEA](/tea.md) publishes SBOMs and VEX for a release.
- [SCA](/sca.md) scans the same inventory for vulnerabilities.

## GitHub Actions

Run the generators in a workflow with the [sbom](/sbom/github-actions/sbom.md), [cbom](/sbom/github-actions/cbom.md) and [aibom](/sbom/github-actions/aibom.md) GitHub Actions. The sbom action can sign the SBOM, submit it to the GitHub dependency graph, attest it and attach it to a release.

## Platform IaC

There is no config-as-code kind for SBOM generation. Options are flags and environment variables, and the content you state yourself can live in an [overlay file](/sbom/author/overlay.md) committed with the code. See the [kind catalogue](/platform-iac/kinds/catalogue.md).
