Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

cdxgen

$ cdxgen Foundation Low Risk
OWASP CycloneDX · Security & Secrets · Apache-2.0 · macos / linux / windows

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

FCRS-1.0 Score
91 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install cdxgen
CLI vs MCP Decision CLI Only

cdxgen -o bom.json parses lockfiles, ASTs, and package manifests directly on disk to produce multi-megabyte CycloneDX JSON.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
✓ NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

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
Trust & Safety 22 / 25

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
Setup & Portability 14 / 15

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
Utility & Efficiency 14 / 15

Covers polyglot monorepos plus CBOM cryptography discovery in one OWASP-standard tool.

  • Polyglot SBOM + CBOM in one generator
Maintenance & Lineage 9 / 10

Flagship OWASP CycloneDX generator with rapid ongoing releases.

  • Official OWASP CycloneDX ecosystem tool
Docs & Verifiability 9 / 10

Extensive documentation at cyclonedx.github.io/cdxgen/ covering flags, env vars, and language support.

  • Official docs at cyclonedx.github.io/cdxgen/

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required for local lockfile scans; optional FETCH_LICENSE or private registry env vars query upstream registries.

Side Effects
Read-Only Local Write
Cost & Quotas

100% free and open-source (Apache-2.0).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Generate a CycloneDX 1.5 JSON SBOM for a repo
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.

Generate a Python-only SBOM without modifying project files
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-version flags with Homebrew and npx availability.

Caveats & Pitfalls

  • ! Deep dependency resolution in ecosystems like Java/Python can invoke native build tools or query registries.
  • ! Large monorepo bom.json outputs can be multi-megabyte and should be parsed with jq rather than loaded raw into context.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI