Skip to content
Security
Skill

/container-sbom

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

From plugin
cdxgen
1.1k14 skills1 agent

Claude Code

$ npx -y skills add cdxgen/cdxgen --skill container-sbom --agent claude-code

SKILL.md

container-sbom.SKILL.md
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.

Container, image, and binary BOMs

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.

Plugin settings

Claude Code replaces the `${user_config.*}` values in this table with the options the user set for the plugin. Other clients show the text as written. A value counts as set only when it is not empty and does not start with `${`; otherwise ignore it and follow the "When not set" column. The settings hold no keys or tokens, and the rule against asking for, printing or writing one still applies.

| Setting | Value | When not set | | ------------------------ | ----------------------------- | --------------------------------------- | | Default `--spec-version` | `${user_config.spec_version}` | Omit the flag; cdxgen defaults to `1.7` | | Preferred runtime | `${user_config.runtime}` | Use `cdxgen` on `PATH` |

When the spec version is set, add `--spec-version <value>` to the real run, unless the user asks for another version. When the runtime is `container`, use the `ghcr.io/cdxgen/cdxgen:master` image as described at the end of this skill.

Container images

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

Mounted or reconstructed root filesystems

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.

What container and rootfs scans include beyond packages

These scans are deliberately broader than a package list. Expect:

  • OS package components with purls — the same purls `obom` gives the packages when run inside the image (vendor, `arch`, `distro`, `distro_name` and `epoch` qualifiers, no subpath), so the two can be diffed; see `os-hardware-inventory`
  • source-package components tagged `source`, added for vulnerability matching; an OBOM has none, so leave them out of such a diff
  • package-owned files and installed commands
  • repository source records, modelled as ordinary `data` components
  • trusted keys and certificates, modelled as `cryptographic-asset` components — **these do not have purls**, so do not treat a missing purl as a defect
  • `cdx:container:unpackagedExecutableCount` and `cdx:container:unpackagedSharedLibraryCount` metadata properties

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`).

Enrichment from optional binaries

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.

Electron ASAR archives

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.

caxa executables

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.

Binaries without a package manager

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`.

Container and orchestration manifests

For declared images rather than built ones:

cd
Read more
@cdxgen
Ships withcdxgen

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.

1.1k14 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.1k
Star history of cdxgen/cdxgen on GitHub, a chart by star-history.com

Other skills on cdxgen.

ai-bom

ai-bom

Generates AI-BOM, MCP inventory, AI skill inventory, and AI authorship provenance documents with cdxgen, cataloging models,…

@cdxgen@cdxgenInstall Skill
bom-audit

bom-audit

Runs supply-chain risk analysis on CycloneDX BOMs with cdx-audit predictive auditing and cdxgen --bom-audit embedded rules,…

@cdxgen@cdxgenInstall Skill
bom-convert-validate

bom-convert-validate

Converts CycloneDX BOMs to SPDX 3.0.1 JSON-LD or between CycloneDX spec versions with cdx-convert, and validates BOMs against…

@cdxgen@cdxgenInstall Skill
bom-evidence

bom-evidence

Enriches an existing CycloneDX BOM with occurrence, callstack, reachability, data-flow, and crypto-flow evidence using cdxgen…

@cdxgen@cdxgenInstall Skill
bom-explore

bom-explore

Explores and triages a CycloneDX BOM interactively with the cdxi REPL, using built-in commands for dependency trees, licenses,…

@cdxgen@cdxgenInstall Skill
bom-signing

bom-signing

Signs and verifies CycloneDX BOMs using cdxgen's native JSON Signature Format (JSF) implementation via cdx-sign and cdx-verify,…

@cdxgen@cdxgenInstall Skill

More skills from other plugins.

api-security

api-security

Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…

@zhaoxuya520@zhaoxuya520Install Skill
nemoclaw-user-guide

nemoclaw-user-guide

Find official NemoClaw documentation for installation, configuration, operation, or troubleshooting. Also handles requested docs…

@nvidia@nvidiaInstall Skill

Questions about container-sbom.

Which coding agents can use container-sbom?
container-sbom installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.