ai-bom
Generates AI-BOM, MCP inventory, AI skill inventory, and AI authorship provenance documents…
Generates CycloneDX BOMs for container images, OCI archives, mounted root filesystems, Electron ASAR archives, caxa executables, binaries, and Kubernetes or Dockerfile manifests using OWASP cdxgen post-build scanning. Use when asked to scan a Docker or OCI image, produce an SBOM
$ npx -y skills add cdxgen/cdxgen --skill container-sbom --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/container-sbomContext preview
The summary Claude sees to decide when to auto-load this skill.
Generates CycloneDX BOMs for container images, OCI archives, mounted root filesystems, Electron ASAR archives, caxa executables, binaries, and Kubernetes or Dockerfile manifests using OWASP cdxgen post-build scanning. Use when asked to scan a Docker or OCI image, produce an SBOM
name: container-sbom description: Generates CycloneDX BOMs for container images, OCI archives, mounted root filesystems, Electron ASAR archives, caxa executables, binaries, and Kubernetes or Dockerfile manifests using OWASP cdxgen post-build scanning. Use when asked to scan a Docker or OCI image, produce an SBOM for a container or golden image, inventory a rootfs, audit a packaged Electron app, or analyse Dockerfiles and Kubernetes manifests.
Use this skill when the target is a built artifact rather than a source tree. For source repositories use `sbom-generate`; for a live running host use `os-hardware-inventory`.
Read [reference/safety.md](../../reference/safety.md) first.
cdxgen -t docker myimage:latest -o /absolute/path/to/bom.json
Types `oci`, `docker`, `podman`, `container`, and `oci-dir` all reach the same pipeline. Use `oci-dir` for an unpacked OCI layout on disk.
Container scans belong to the `post-build` lifecycle. cdxgen sets that automatically for image targets, but pass it explicitly when scripting:
cdxgen -t oci --lifecycle post-build myimage:latest -o /absolute/path/to/bom.json
cdxgen /absolute/path/to/rootfs -t rootfs -o /absolute/path/to/bom.json
This is the right approach for golden images, forensic mounts, and any host you cannot run osquery on. Add a hardening review without needing live collection:
cdxgen /absolute/path/to/rootfs -t rootfs \ --bom-audit --bom-audit-categories rootfs-hardening \ -o /absolute/path/to/bom.json
The `rootfs-hardening` category checks repository trust, privileged helpers, and service drift offline.
These scans are deliberately broader than a package list. Expect:
Those last two matter: they count native files that could not be traced to any OS package. A high count means the image ships binaries outside package management, which is worth surfacing to the user.
In `cdxi`, isolate them with `.unpackagedbins` and `.unpackagedlibs` (see `bom-explore`).
When `@cdxgen/cdxgen-plugins-bin` is installed, container and rootfs scans gain Trivy-powered package metadata, Linux GTFOBins runtime context, platform trust posture, and — via `trustinspector` — macOS code-signing/notarization and Windows Authenticode/WDAC properties across large path inventories.
When those binaries are absent the BOM is still valid, just less enriched. Say that plainly rather than reporting a failure.
cdxgen -t asar /absolute/path/to/app.asar \ --bom-audit --bom-audit-categories asar-archive \ -o /absolute/path/to/bom.json
Prefer `-t asar` (aliases `electron`, `electron-asar`) for packaged Electron releases: it adds archive file inventory, integrity verification, and analysis of the embedded Node manifest, none of which appear if you scan the surrounding directory as a plain JavaScript project.
cdxgen -t caxa /absolute/path/to/dir-with-metadata -o /absolute/path/to/bom.json
Reads the `*metadata.json` file that caxa writes next to a binary when it builds it (`--metadata-file`, default `binary-metadata.json`); the binary itself carries no BOM, so pointing `-t caxa` at it finds nothing. Add `--caxa-app-dir <extracted app>` to also record the native tools, the vendored PHP, Ruby and Java packages, and the npm hashes found in the app the binary extracts.
Several types accept a compiled binary directly rather than a manifest: `go`, `rust`, `csharp`/`dotnet`, and `jar`/`war`/`ear`. Evidence quality is lower than a lockfile scan — component identity comes from what is embedded in the binary.
cdxgen -t go /absolute/path/to/compiled-binary -o /absolute/path/to/bom.json
Cache-scanning types inventory a build cache rather than one project: `maven-cache`, `gradle-cache`, `sbt-cache`, `cargo-cache`, `helm-index`.
For declared images rather than built ones:
cdxgen -t containerfile /absolute/path/to/project -o /absolute/path/to/bom.json
Covers `dockerfile`, `containerfile`, `docker-compose`, `kubernetes`, `openshift`, `kustomize`, `skaffold`, `swarm`, `tekton`, `operator`, `yaml-manifest`, and `universal`. These describe intended images, so the BOM records references, not resolved layer contents. Use an image scan when the user needs what actually shipped.
cdxgen -t oci myimage:latest \ --bom-audit --bom-audit-categories container-risk \ -o /absolute/path/to/bom.json
Relevant categories here: `container-risk`, `rootfs-hardening`, `asar-archive`, `package-integrity`, `dependency-source`. See `bom-audit`.
cdxgen is a CLI tool, library, REPL, and server to create, validate, sign, and verify software BOMs. It generates CycloneDX JSON BOMs and supports SPDX 3.0.1 JSON-LD export.
Repo: cdxgen/cdxgen
Generates AI-BOM, MCP inventory, AI skill inventory, and AI authorship provenance documents…
Runs supply-chain risk analysis on CycloneDX BOMs with cdx-audit predictive auditing and…
Converts CycloneDX BOMs to SPDX 3.0.1 JSON-LD or between CycloneDX spec versions with…
Enriches an existing CycloneDX BOM with occurrence, callstack, reachability, data-flow, and…
Explores and triages a CycloneDX BOM interactively with the cdxi REPL, using built-in…
Signs and verifies CycloneDX BOMs using cdxgen's native JSON Signature Format (JSF)…