/cdxgen:bom-auditfrom cdxgen
Runs supply-chain risk analysis on CycloneDX SBOMs using cdx-audit predictive auditing and cdxgen embedded rules. Covers npm/PyPI package compromise, CI permission risk, dependency source integrity, license violations, and SARIF/JSON reporting.
Ships in cdxgen. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Two distinct mechanisms. Choose deliberately.
| Want | Use |
|---|---|
| Findings embedded while the BOM is generated | cdxgen --bom-audit |
| Analysis of a BOM that already exists | cdx-audit |
| Forward-looking review prioritization for npm/PyPI | cdx-audit (predictive) |
| Rule evaluation against the supplied BOM itself | cdx-audit --direct-bom-audit |
Read reference/safety.md first. Predictive auditing clones upstream repositories and generates child SBOMs, so it does real network work — confirm with the user before a large run.
cdx-audit --bom /absolute/path/to/bom.json
cdx-audit --bom-dir /absolute/path/to/boms --report json --report-file /absolute/path/to/audit.json
cdx-audit --bom /absolute/path/to/bom.json --report sarif --report-file /absolute/path/to/audit.sarif
Reporters: console (default), json, sarif. Use SARIF for code-scanning
uploads.
Predictive mode extracts npm and PyPI package URLs from the BOM's components, generates a child SBOM for each upstream, and evaluates compromise posture. Cargo/Rust BOMs are also worth auditing this way when the goal is upstream review prioritization.
Exit code 3 means at least one target reached --fail-severity (default
high) or above. That is a policy signal, not a crash — report it as such.
For large BOMs or a triage-first workflow:
cdx-audit --bom /absolute/path/to/bom.json --scope required --max-targets 25
| Flag | Effect |
|---|---|
--scope required | Only components with CycloneDX scope=required; a missing scope is treated as required |
--scope all | Default |
--max-targets <n> | Safety limit on unique npm/PyPI purls analyzed |
--min-severity | Filter console/SARIF output (low, medium, high, critical) |
--fail-severity | Severity that triggers exit code 3 (default high) |
# broader baseline, including packages that already carry trusted publishing metadata
cdx-audit --bom /absolute/path/to/bom.json --scope required --include-trusted --max-targets 50
# inspect only that subset
cdx-audit --bom /absolute/path/to/bom.json --only-trusted
Never pass --include-trusted together with --only-trusted. Use
--include-trusted only when the user explicitly wants the broader baseline.
cdx-audit --bom /absolute/path/to/bom.json \
--workspace-dir /absolute/path/to/workspace \
--reports-dir /absolute/path/to/reports
--workspace-dir reuses cloned repositories and cached child SBOMs.
--reports-dir persists per-target artifacts plus an aggregate JSON report. Use
both when the user expects iterative analysis.
Other useful flags: --allowlist-file (purl prefixes to exclude from target
selection, on top of the built-in allowlist),
--skip-default-branch-recheck, --prioritize-direct-runtime,
--rules-dir for custom rules, and --introspect for a per-BOM build-fidelity
verdict inferred from BOM structure alone.
Two more flags bound the run. --offline plans the predictive queue and
reports every target as skipped with that reason (in a direct audit it drops
the registry lookups, the OCI registry probes and the forge API requests of AI
oversight, and still reads the local git history), so an offline run never
looks like a clean one. --time-budget-minutes takes one positive number and
starts the clock when the run begins, registry lookups included; once it is
spent no new target, lookup or default-branch recheck starts. The JSON summary
names offline, timeBudgetExhausted (with counts of what it cut) and
targetCapTruncated so a consumer can tell a cut-short audit from a complete
one.
The registry metadata rules (a deprecated npm package version INT-005, a
deprecated newest npm release INT-031, a yanked PyPI release INT-030, a missing
version INT-020 to INT-022, package age INT-023 to INT-028, native binaries
INT-029) need properties only a registry lookup
writes for dependencies. In --direct-bom-audit mode pass
--fetch-registry-metadata so cdx-audit looks them up first (it makes network
requests and is ignored with --offline), then read each result's coverage
block: registryMetadata says whether the lookups ran, withoutMetadata
counts the components no registry answered for, and unparseable and
withoutVersion count the npm, PyPI and Cargo components that could not be
looked up at all. The rules did not assess any of those.
--private-namespace takes private package namespaces or name prefixes,
comma-separated or with the option repeated. An npm scope (@acme, or acme
for a scoped package) matches that scope exactly; other names match exactly or
at a -, _, . or / boundary (PyPI after PEP 503 normalisation, Cargo
with _ read as -), so a bare acme also marks the public acme-client;
pass @acme to mark only the npm scope. In --direct-bom-audit mode
cdx-audit asks the public npm registry, the Python Package Index or crates.io
whether each matching name is published there, one request per name. A name
the public registry holds is a dependency-confusion finding (INT-017 to INT-019
for npm, PyPI and Cargo); a private package that is not published publicly is
the intended state. Read coverage.privateNamespace beside the findings:
under --offline nothing is asked and every matching component counts as
unknown, so the check assessed none of them. Predictive mode only marks and
counts the matching components (summary.privateNamespace, publicRegistry: "not-checked") and reports no finding for them.
Queue order is explainable. When trimmed, it prioritizes:
scope=requiredevidence.occurrencesThese affect which packages are audited first, not final severity. Final severity comes from child SBOM findings plus conservative corroboration logic. Do not present queue position as a risk score.
CDXGEN_THINK_MODE=true cdx-audit --bom /absolute/path/to/bom.json --scope required --max-targets 10
Prints lightweight score and rationale summaries per package.
Evaluate rules against the supplied BOM itself rather than generating child SBOMs:
cdx-audit --bom /absolute/path/to/bom.json --direct-bom-audit
cdx-audit --bom /absolute/path/to/hbom.json --direct-bom-audit --categories hbom
cdx-audit --bom /absolute/path/to/aibom.json --direct-bom-audit --categories ai-bom
cdx-audit --bom /absolute/path/to/bom.evinse.json --direct-bom-audit --categories golem
In direct mode, --categories applies to the supplied BOM. Default is
obom-runtime for OBOMs and all categories otherwise. In predictive mode it
applies to the generated child SBOMs, defaulting to ai-agent,
ci-permission, dependency-source, package-integrity.
cdxgen -o /absolute/path/to/bom.json --bom-audit /absolute/path/to/project
cdxgen -o /absolute/path/to/bom.json --bom-audit --bom-audit-categories ci-permission /absolute/path/to/project
Findings land in the BOM's annotations[]. Related flags mirror cdx-audit:
--bom-audit-categories, --bom-audit-min-severity,
--bom-audit-fail-severity, --bom-audit-scope, --bom-audit-max-targets,
--bom-audit-include-trusted, --bom-audit-only-trusted,
--bom-audit-rules-dir.
Unknown categories are rejected, not ignored. Aliases such as ai-inventory
and hbom expand to their built-in category sets.
| Category | Covers |
|---|---|
ci-permission | GitHub Actions/GitLab CI privilege and supply-chain risk |
dependency-source | Non-registry, local, or mutable dependency sources |
package-integrity | Deprecated, yanked, tampered, or suspicious packages |
golem-security | Go Evinse/Golem evidence findings |
asar-archive | Electron ASAR archive integrity and contents |
container-risk | Container image risk |
rootfs-hardening | Offline host repository trust, privileged helpers, service drift |
obom-runtime | Live OS runtime artifacts |
hbom-security | Hardware security posture |
host-topology | Merged hardware plus runtime host view |
mcp-server | MCP server exposure and auth posture |
ai-agent | AI instruction and skill files |
ai-inventory | Alias for ai-agent + mcp-server |
ai-bom | Umbrella AI-BOM pack |
ai-security, ai-governance, ai-performance | AI-specific rule packs |
ai-provenance | Alias enabling ai-provenance + ai-oversight |
cbom-security, cbom-compliance | Weak crypto, cipher modes, key sizes, protocol versions |
vscode-extension, chrome-extension | IDE and browser extension risk |
Aliases worth remembering: cbom / crypto-bom for both CBOM packs, hbom for
the full HBOM pack, ai-inventory for AI agent plus MCP.
Full rule tables with IDs and severities: https://cdxgen.github.io/cdxgen/#/BOM_AUDIT.
cdx-audit --bom /absolute/path/to/bom.json --license-policy /absolute/path/to/policy.yaml
Evaluates every component license and reports prohibited and warning-level
violations as a separate table. Error-level (prohibited) violations cause a
non-zero exit, independent of --fail-severity.
cdxgen --license-policy applies the same policy at generation time.
In dry-run mode the formulation-centric categories are the ones that still
produce meaningful output, since they read declared configuration rather than
resolved dependency trees. ci-permission is the clearest example.
--fail-severity, not with the total count.CI-002, PKG-007) so the user can look it up.In cdxi (see bom-explore): .auditfindings and .auditactions.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub cdxgen/cdxgen --plugin cdxgen14 skills in this plugin
/ai-bomGenerates AI-BOM, MCP inventory, AI skill inventory, and AI authorship provenance documents with cdxgen, cataloging models, inference services, Hugging Face purls, MCP servers and their tools/prompts/resources, agent instruction files, and cdx:ai:codegen provenance signals, then audits them with AI-focused rule packs. Use when asked to inventory AI or ML usage, catalog MCP servers, audit agent instruction or skill files, assess AI supply-chain risk, or detect AI-generated code authorship./bom-convert-validateConverts CycloneDX BOMs to SPDX 3.0.1 JSON-LD or between CycloneDX spec versions with cdx-convert, and validates BOMs against JSON schema, deep consistency checks, and OWASP SCVS and EU Cyber Resilience Act compliance benchmarks with cdx-validate, emitting SARIF for code scanning. Use when asked to convert an SBOM to SPDX, downgrade or upgrade a BOM spec version, validate or lint a BOM, check SCVS or CRA compliance, or score SBOM quality./bom-evidenceOther plugins' skills for the same job