cdxgen
$ cdxgen Foundation Low Riskcdxgen is the official OWASP CycloneDX generator producing CycloneDX SBOMs, Cryptography BOMs (CBOM), and SaaSBOMs across Node.js, Python, Go, Java, Rust, C/C++, and container images. It outputs CycloneDX JSON natively via -o bom.json, supports --spec-version pinning, and runs non-interactively.
brew install cdxgen cdxgen -o bom.json parses lockfiles, ASTs, and package manifests directly on disk to produce multi-megabyte CycloneDX JSON.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Outputs CycloneDX JSON natively via -o, supports -t language scoping, -r recursion, --spec-version, and runs headlessly.
- Native CycloneDX JSON output with
-t,-r, and--spec-version
Read-only over source files apart from writing -o output, though certain ecosystems invoke local package manager commands (e.g. Maven/Gradle/pip) to resolve trees.
- May invoke native build tools for deep resolution unless lockfiles suffice
Easy installation via brew install cdxgen, npm install -g @cyclonedx/cdxgen, npx, or Docker across macOS, Linux, and Windows.
- Homebrew, npm, npx, and container distributions
Covers polyglot monorepos plus CBOM cryptography discovery in one OWASP-standard tool.
- Polyglot SBOM + CBOM in one generator
Flagship OWASP CycloneDX generator with rapid ongoing releases.
- Official OWASP CycloneDX ecosystem tool
Extensive documentation at cyclonedx.github.io/cdxgen/ covering flags, env vars, and language support.
- Official docs at cyclonedx.github.io/cdxgen/
Security, Auth & Guardrails
None required for local lockfile scans; optional FETCH_LICENSE or private registry env vars query upstream registries.
100% free and open-source (Apache-2.0).
# cdxgen Agent Rules - Always pass explicit `-o <file.json>` and `--spec-version 1.5` (or `1.6`) for deterministic output. - Disable network metadata lookups or run in isolated sandboxes if untrusted build scripts (`pom.xml`, `setup.py`) are present.
Agent-Ready Command Recipes
Safe Read-Only Queries
cdxgen --spec-version 1.5 -r -o bom.json .
Recursively (-r) analyzes dependencies in . and writes a CycloneDX 1.5 JSON SBOM to bom.json.
cdxgen -t python -o python-bom.json .
Scopes SBOM generation to -t python manifests and writes python-bom.json.
Strengths for Agents
- + Polyglot SBOM and CBOM generation outputting spec-compliant CycloneDX JSON.
- + Flexible
-t <lang>,-r, and--spec-versionflags with Homebrew andnpxavailability.
Caveats & Pitfalls
- ! Deep dependency resolution in ecosystems like Java/Python can invoke native build tools or query registries.
- ! Large monorepo
bom.jsonoutputs can be multi-megabyte and should be parsed withjqrather than loaded raw into context.