SKILL.md
Skill1.1k starsChanged 14 days agoApache-2.0View on GitHub
cdxgen is a universal, polyglot CLI tool that generates valid CycloneDX Bill-of-Materials (BOM) documents in JSON format. It produces SBOM, HBOM, CBOM, OBOM, SaaSBOM, VDR, and CDXA outputs for source code, containers, VMs, live operating systems, and supported hardware hosts. Supports CycloneDX spec versions 1.6–2.0 (default: 1.7, with HBOM currently targeting 1.7; 1.4/1.5 are rejected as generation targets). cdxgen features a best-in-class, native JSON Signature Format (JSF) implementation for BOM signing, providing robust authenticity and non-repudiation capabilities. Unlike basic signing…
- Reads credentials
- Installs packages
200 other projects use a version of this.
Trending
Quiet this year.about the whole repository
Most recently taken up by
- haoyu-haoyu/xhs-mcptheir own version, first seen Nov 15, 2026
- db0-ai/db0their own version, first seen Nov 15, 2026
- Starlight-Intelligence/Starlight-Intelligence-Systemtheir own version, first seen Nov 15, 2026
- ythx-101/grok-bridgetheir own version, first seen Nov 15, 2026
- ax128/AegisGatetheir own version, first seen Nov 12, 2026
- ThirdKeyAI/agentsnifftheir own version, first seen Nov 9, 2026
Who's talking about CycloneDX/cdxgen
- nodejs/node“npm on Windows fails with module not found for Node.js 22.0.0”GitHub · Apr 25, 2024 · 33 reactions
- CycloneDX/cyclonedx-go“Improve support for the `Component.Evidence.Identity` field in CycloneDX 1.6”GitHub · Jul 30, 2024 · 4 reactions
- cdxgen/cdxgen“Bazel build being run for non-Bazel projects, causing errors”GitHub · Sep 10, 2024 · 3 reactions
- cdxgen/cdxgen“[pnpm] Improve metadata collection with node_modules parsing”GitHub · Aug 7, 2025 · 2 reactions
- cdxgen/cdxgen“Add docs and fix for allowlist of hosts and commands”GitHub · Jun 29, 2025 · 2 reactions
The biggest 5 of 41 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 41
Talked about on GitHub and Bluesky (41 times).
On GitHub · 40
- Apr 25, 2024npm on Windows fails with module not found for Node.js 22.0.0 — nodejs/node33 reactions · 47 comments
- Jul 30, 2024Improve support for the `Component.Evidence.Identity` field in CycloneDX 1.6 — CycloneDX/cyclonedx-go4 reactions · 11 comments
- Sep 10, 2024Bazel build being run for non-Bazel projects, causing errors — cdxgen/cdxgen3 reactions · 3 comments
- Aug 7, 2025[pnpm] Improve metadata collection with node_modules parsing — cdxgen/cdxgen2 reactions · 6 comments
- Jun 29, 2025Add docs and fix for allowlist of hosts and commands — cdxgen/cdxgen2 reactions · 1 comment
35 more on GitHub
- May 1, 2025feat: make bazel query compatible with newer bazel versions and rules… — cdxgen/cdxgen2 reactions · 3 comments
- Oct 27, 2024Run some GitHub action jobs only on main repository — cdxgen/cdxgen2 reactions
- Jul 2, 2024Invalid Dotnet version detected and missing versions for the dependencies — cdxgen/cdxgen2 reactions · 12 comments
- Apr 22, 2024Add support for executing dependencies task in parallel for Gradle — cdxgen/cdxgen2 reactions · 6 comments
- Feb 1, 2024Added support for components properties filter — cdxgen/cdxgen2 reactions · 4 comments
- Dec 23, 2023[core] Improve exclude to match sub-directories — cdxgen/cdxgen2 reactions
- Oct 8, 2023Switching to java 21 — cdxgen/cdxgen2 reactions · 2 comments
- Sep 11, 2023Fix npm package deps tree — cdxgen/cdxgen2 reactions · 13 comments
- Jun 27, 20231.4 compatibility mode — cdxgen/cdxgen2 reactions
- May 26, 2023Even after setting CDX_MAVEN_INCLUDE_TEST_SCOPE=false some of the dependencies of test modules created in BOM — cdxgen/cdxgen2 reactions · 5 comments
- Oct 7, 2025Re-enable license fetching — MediaMarktSaturn/technolinator1 reaction · 1 comment
- Aug 15, 2025Extend data tracked for each package type and ecosystem with extra reference information — package-url/purl-spec1 reaction · 3 comments
- Jun 9, 2025bugfix: normalize component evidence identities to always be array — cdxgen/cdxgen1 reaction
- Jun 8, 2025Fix technique filtering logic by correctly checking for intersection — cdxgen/cdxgen1 reaction
- Apr 15, 2025Ignore uncommented lines in gradle build scripts — cdxgen/cdxgen1 reaction · 3 comments
- Feb 20, 2025Fix pnpm and yarn lock file detection — cdxgen/cdxgen1 reaction
- Jul 24, 2024Speed up SBOM generation by using newest features — apache/airflow1 reaction
- Jul 2, 2024Do not aggressively exclude while dealing with java projects — cdxgen/cdxgen1 reaction · 4 comments
- May 30, 2024Sanitize externalReferences URLs and exclude invalid ones + Strict JSON Schema validation — cdxgen/cdxgen1 reaction · 13 comments
- May 20, 2024Fix: Split linux-tests job into two jobs — cdxgen/cdxgen1 reaction
- Apr 30, 2024Adds a new workflow to generate SBOM — DefectDojo/django-DefectDojo1 reaction · 4 comments
- Apr 18, 2024Regenerate lock file and types. Adds vuln scanning — cdxgen/cdxgen1 reaction
- Mar 27, 2024cdx 1.6 spec support with some goodies — cdxgen/cdxgen1 reaction · 5 comments
- Jan 27, 2024Make 10.x branch the default — cdxgen/cdxgen1 reaction · 1 comment
- Jan 27, 2024Remove xml format — cdxgen/cdxgen1 reaction
- Nov 21, 2023Feature/nydus demo — cdxgen/cdxgen1 reaction
- Nov 16, 2023Fixes for Server params — cdxgen/cdxgen1 reaction · 5 comments
- Nov 15, 2023Support for private docker registry — cdxgen/cdxgen1 reaction · 2 comments
- Oct 23, 2023Generated license sometimes not valid according to BOM schema — cdxgen/cdxgen1 reaction · 6 comments
- Oct 12, 2023Filters and config files support — cdxgen/cdxgen1 reaction
- Jul 3, 2023MINOR: 9.1.0 release with deno, evidences and python dependency tree. 1 BREAKING change — cdxgen/cdxgen1 reaction · 2 comments
- Jun 30, 2023Provide possibility to define alternative NUGET API base url — cdxgen/cdxgen1 reaction · 3 comments
- May 29, 2023scanning setup.py doesn't work if "install_requires" is initialized to a variable instead of a list of strings — cdxgen/cdxgen1 reaction · 2 comments
- Mar 7, 2023Rendering multiple Subtrees in dependency tree tab of Dependency tracker — DependencyTrack/dependency-track1 reaction · 4 comments
- Feb 27, 2023Dependency Graph cannot be generated — cdxgen/cdxgen1 reaction · 11 comments
On Bluesky · 1
- Feb 4, 2025The first step towards #crypto #agility is to be able to make an inventory of all your crypto assets. Currently, there are no… — @seceng.bsky.social0 likes and reposts · 2 replies
Used with
Projects with it also use crypto-intelligence, heart and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Arcanea-LabsSkillcrypto-intelligence
Vertical-tier skill for Crypto Intelligence Domain Sub-Stack. Auto-activates inside verticals/crypto-intelligence/ or on /crypto-* commands. Enforces R5 non-advisory clause, voice (architect), refusal patterns, composition with Wealth IS umbrella per Board 2026-05-17. Loads verticals/crypto-intelligence/SKILL.md wrapper for full doctrine.
Also in 3 projects that use this
Arcanea-LabsSkillheart
Ops health monitor for the machine substrate. Checks Memory Bus, brain_watchdog, Voice Operator, dashboard, audit-log freshness, and scheduled tasks. Cross-cutting skill that any repo can invoke when daemons feel off or before starting a heavy work session.
Also in 3 projects that use this
- +10 more from Arcanea-Labs
Other versions200 projects use a version of this.
Word for word · 1
- cdxgen/cdxgen★ 1.1k100% same
Edited · 0
None found.
Wrote their own version · 199
- xtekky/gpt4free★ 67ksame name
- stas00/ml-engineering★ 20ksame name
- wanghongenpin/proxypin★ 14ksame name
- Ataraxy-Labs/sem★ 3.5ksame name
- op7418/NanoBanana-PPT-Skills★ 3.3ksame name
- charmbracelet/pop★ 2.9ksame name
- duty1g/x64dbg-mcp-server★ 2.8ksame name
- RevylAI/greenlight★ 2.4ksame name
- kevinho/clawfeed★ 2.4ksame name
- Autumn-27/ScopeSentry★ 1.9ksame name
189 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- bom-slimmerSkill
- custom-property-authorSkill
- cyclonedx-spec-reviewerSkill
- ecosystem-onboardingSkill
- sbom-fidelity-loopSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. 0 are common, 1 is distinctive, and 19 are very specific to this project.
0
Common
Most of the 116 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
19
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
All boolean flags accept --no- prefix to invert behavior
- Very specific: line 134
Use the bundled cdx-audit command when the user already has one or more CycloneDX JSON BOMs and wants forward-looking supply-chain exposure …
- Very specific: line 146
Use --workspace-dir to reuse cloned repositories and cached child SBOMs across runs
- Very specific: line 147
Use --reports-dir to persist per-target artifacts plus an aggregate JSON report
- Very specific: line 170
Start with --scope required --max-targets 25 for large BOMs or triage-first workflows.
- Very specific: line 171
Use --include-trusted only when the user explicitly wants a broader baseline that includes packages already carrying trusted publishing …
- Very specific: line 172
Use --only-trusted only when the user wants to inspect just that subset.
- Very specific: line 173
Never pass --include-trusted together with --only-trusted.
- Very specific: line 174
Use --workspace-dir when the user expects repeated runs or iterative analysis.
- Very specific: line 191
Use
cdxgen --bom-audit: when the user wants findings embedded during BOM generation. - Very specific: line 192
Use
cdx-auditfor Cargo/Rust BOMs too: when the BOM contains pkg:cargo/... - Very specific: line 203
ALWAYS: use absolute paths for [path] and -o.
- Very specific: line 204
NEVER: run as root when CDXGEN_SECURE_MODE=true.
- Very specific: line 212
When using server mode or BOM upload features, keep CDXGEN_ALLOWED_HOSTS and related host allowlists narrow.
- Very specific: line 213
When reviewing generated BOMs that include AI/MCP inventory or Chrome extension metadata, still inspect emitted properties before sharing …
- Very specific: line 224
Default behavior automatically validates against spec (--no-validate to skip)
- Very specific: line 248
Run cdxgen with --dry-run first.
- Very specific: line 249
Prefer --activity-report json or --activity-report jsonl so the pending reads, blocked writes, blocked command execution, blocked network …
- Very specific: line 251
Ask for permission before rerunning without --dry-run.
- Distinctive: line 252
Only perform real execution after the user explicitly approves it.
“Common” is measured: kept by at least 6 in 10 of the 116 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: OWASP cdxgen (CycloneDX BOM Generator)
Description
cdxgen is a universal, polyglot CLI tool that generates valid CycloneDX Bill-of-Materials (BOM) documents in JSON format. It produces SBOM, HBOM, CBOM, OBOM, SaaSBOM, VDR, and CDXA outputs for source code, containers, VMs, live operating systems, and supported hardware hosts. Supports CycloneDX spec versions 1.6–2.0 (default: 1.7, with HBOM currently targeting 1.7; 1.4/1.5 are rejected as generation targets). cdxgen features a best-in-class, native JSON Signature Format (JSF) implementation for BOM signing, providing robust authenticity and non-repudiation capabilities. Unlike basic signing tools, our implementation fully supports granular signatures (signing individual components, services, and annotations), parallel Multi-Signatures (signers), and sequential Signature Chains (chain). When the optional companion binaries from @cdxgen/cdxgen-plugins-bin are available, cdxgen also enriches container/rootfs and live-OS scans with Trivy/osquery-powered metadata, Linux GTFOBins runtime context, platform trust posture, and Go Evinse evidence through the golem helper. HBOM collection is dynamically provided by the optional @cdxgen/cdx-hbom library on supported darwin/arm64, linux/amd64, linux/arm64, windows/amd64, and windows/arm64 hosts. CBOM mode can also extract cryptographic algorithm inventory from JavaScript and TypeScript source through lightweight AST analysis.
✅ When to Invoke
- User requests an SBOM/BOM for a repository, directory, container image, or live OS.
- User requests a hardware BOM / HBOM for the current host.
- User needs dependency inventory, license resolution, or vulnerability triage context.
- User wants to export to Dependency-Track, sign/validate a BOM, convert CycloneDX JSON to SPDX JSON-LD, or generate evidence/callstacks.
- User wants a predictive audit of an existing CycloneDX BOM with
cdx-audit, especially for npm or PyPI package compromise posture. - User wants Go dependency evidence, usage scopes, call graph context, data-flow/crypto-flow evidence, local replacement review, vendoring/license evidence, crypto components, or security-sensitive API signals from
evinse -l gowith Golem.
📦 Prerequisites & Installation
| Requirement | Detail |
| Runtime | Node.js ≥ 24 |
| Java | Not required on most platforms: atom ships as a native binary on linux-amd64, linux-arm64 (glibc), linux-amd64-musl, darwin-arm64, and windows-amd64. Only the jar-based triples (darwin-amd64, windows-arm64, linux-arm64-musl) need Java ≥ 23, where older versions fail silently or produce incomplete BOMs. |
| Install | npm i -g @cdxgen/cdxgen or pnpm dlx @cdxgen/cdxgen |
| Container | docker run --rm -v $(pwd):/app:rw -t ghcr.io/cdxgen/cdxgen:master /app |
Notes:
- The optional
@cdxgen/cdxgen-plugins-binpackages provide native helpers such as Trivy and osquery. - The same plugin package also provides
golemfor Go Evinse semantic evidence when a platform binary is available. - Container and
rootfsscans can surface repository source components plus trusted-key cryptographic assets when those binaries are present. - Container and
rootfsscans also emitcdx:container:unpackagedExecutableCountandcdx:container:unpackagedSharedLibraryCountmetadata properties so agents can spot native file inventory that was not traced to OS package ownership. - Linux live-OS profiles include hardening-oriented
sysctl_hardeningandmount_hardeningsnapshots plus GTFOBins enrichment on privileged and network-active runtime rows. - The optional
trustinspectorhelper adds macOS code-signing/notarization and Windows Authenticode/WDAC properties across large host inventories without truncating path inspection after the first few hundred paths. - macOS live-OS OBOM collection uses the bundled osquery binary in shell mode and may still require Full Disk Access or elevated privileges for some tables.
💻 Core Syntax
cdxgen [path] [options]pathdefaults to.(current directory)- All boolean flags accept
--no-prefix to invert behavior - Config precedence:
CLI args>CDXGEN_* env vars>.cdxgenrc/.cdxgen.json/.cdxgen.yml/.cdxgen.yaml
🔑 Key Parameters & Profiles
| Category | Flag | Purpose |
| Scope | -t, --type <type> | Language/platform (auto-detected if omitted). Pass multiple: -t java -t js |
-r, --recurse | Scan mono-repos (default: true). Use --no-recurse to disable | |
--deep | Enable deep parsing (C/C++, OS, OCI, live systems) | |
| Output | -o, --output <file> | Destination path (default: bom.json) |
-p, --print | Print human-readable table/tree to stdout | |
--dry-run | Read-only preview mode. Record reads plus blocked writes, commands, temp dirs, network, and submissions before any real execution | |
--activity-report <fmt> | Hidden machine-readable dry-run/debug report: json or jsonl | |
--spec-version <ver> | CycloneDX generation target: 1.6, 1.7 (default), 2.0. 1.4 and 1.5 are rejected; downgrade an existing document with cdx-convert --to instead | |
| Profiles | --profile <name> | generic (default), appsec, research, operational, threat-modeling, license-compliance, ml/machine-learning, ml-deep/deep-learning, ml-tiny, introspect |
| Lifecycles | --lifecycle <phase> | pre-build (no installs), build (default), post-build (binaries/containers) |
| Filtering | --required-only | Include only production/non-dev dependencies |
--filter <purl> | Exclude components matching string in purl/properties | |
--only <purl> | Include ONLY components matching string in purl | |
| Advanced | --evidence | Generate SaaSBOM with usage/callstack evidence |
--include-crypto | Include CBOM-oriented cryptographic assets, certificates, and source-derived crypto algorithms | |
--include-formulation | Add git metadata & build tool versions | |
--server | Start HTTP server on 127.0.0.1:9090 | |
--validate | Auto-validate BOM against JSON schema (default: true) | |
--generate-key-and-sign | Generate RSA keys & sign BOM with JWS |
📖 Common Workflows
# Basic auto-detect
cdxgen -o bom.json
# Multi-language mono-repo (disable recursion if not needed)
cdxgen -t java -t python --no-recurse -o bom.json
# Production-only dependencies
cdxgen --required-only -o bom.json
# Container/OCI image
cdxgen -t docker myimage:latest -o bom.json
# Reconstructed or mounted root filesystem
cdxgen /absolute/path/to/rootfs -t rootfs -o bom.json
# Offline rootfs hardening review
cdxgen /absolute/path/to/rootfs -t rootfs -o bom.json --bom-audit --bom-audit-categories rootfs-hardening
# Research/Security deep scan with evidence
cdxgen --profile research --evidence -o bom.json
# Live macOS/Linux/Windows operating-system inventory (OBOM)
obom -o obom.json --deep --bom-audit --bom-audit-categories obom-runtime
# Live hardware inventory (HBOM)
hbom -o hbom.json
# Dynamic trace process execution SBOM
tracebom --cmd "node app.js" -o bom.json
# Catalog a packaged Electron ASAR archive
cdxgen -t asar --bom-audit --bom-audit-categories asar-archive -o bom.json /absolute/path/to/app.asar
# Pre-build scan (no package installations)
cdxgen --lifecycle pre-build -o bom.json
# Agent-safe dry-run preview before any real execution
cdxgen /absolute/path/to/project --dry-run --activity-report json
# Compact line-oriented dry-run preview for automation
cdxgen /absolute/path/to/project --dry-run --activity-report jsonl
# Start SBOM server
cdxgen --server --server-host 0.0.0.0 --server-port 8080
# Predictive audit of an existing BOM
cdx-audit --bom bom.json
# Go Evinse with Golem semantic evidence
cdxgen -t go -o bom.json /absolute/path/to/go/project
evinse -i bom.json -o bom.evinse.json -l go --golem-callgraph static /absolute/path/to/go/project
cdx-audit --bom bom.evinse.json --direct-bom-audit --categories golem
# Go Evinse crypto-flow evidence with bounded data-flow analysis
evinse -i bom.json -o bom.evinse.crypto.json -l go --with-data-flow --golem-dataflow crypto --golem-dataflow-pattern-packs crypto /absolute/path/to/go/project
# Machine-readable predictive audit
cdx-audit --bom bom.json --report sarif --report-file audit.sarif🔎 Predictive Audit Command (cdx-audit)
Use the bundled cdx-audit command when the user already has one or more CycloneDX JSON BOMs and wants forward-looking supply-chain exposure analysis rather than BOM generation.
cdx-audit --bom /absolute/path/to/bom.json --report console
cdx-audit --bom-dir /absolute/path/to/boms --report json --report-file audit-report.json
cdx-audit --bom /absolute/path/to/bom.json --report sarif --report-file audit.sarif- Entry point in source:
bin/audit.js(published command name remainscdx-audit) - Supported ecosystems today: npm and PyPI package URLs extracted from existing BOM components
- Reporters:
console,json,sarif - Exit code
3indicates at least one audited target met or exceeded--fail-severity - Use
--workspace-dirto reuse cloned repositories and cached child SBOMs across runs - Use
--reports-dirto persist per-target artifacts plus an aggregate JSON report
Best-practice command patterns for agents
# Fast default review queue
cdx-audit --bom /absolute/path/to/bom.json --scope required --max-targets 25
# Broaden the queue to include trusted-publishing-backed packages
cdx-audit --bom /absolute/path/to/bom.json --scope required --include-trusted --max-targets 50
# Isolate the trusted-publishing-backed subset
cdx-audit --bom /absolute/path/to/bom.json --only-trusted
# Capture machine-readable output for code-scanning or follow-up automation
cdx-audit --bom /absolute/path/to/bom.json --report sarif --report-file /absolute/path/to/audit.sarif
# Show lightweight score/rationale summaries per package
CDXGEN_THINK_MODE=true cdx-audit --bom /absolute/path/to/bom.json --scope required --max-targets 10How agents should choose filters
- Start with
--scope required --max-targets 25for large BOMs or triage-first workflows. - Use
--include-trustedonly when the user explicitly wants a broader baseline that includes packages already carrying trusted publishing metadata. - Use
--only-trustedonly when the user wants to inspect just that subset. - Never pass
--include-trustedtogether with--only-trusted. - Use
--workspace-dirwhen the user expects repeated runs or iterative analysis.
Prioritization indicators agents should understand
cdx-audit queue order is explainable. When the queue is trimmed, it currently prioritizes:
- direct runtime dependencies
- explicit CycloneDX
scope=required - stronger source evidence via
evidence.occurrences - non-development packages ahead of development-only packages
- non-platform-specific packages ahead of platform-constrained packages
These indicators affect which packages are audited first, not the final severity. Final severity still comes from the child SBOM findings plus conservative corroboration logic.
When agents should and should not use cdx-audit
- Use
cdx-auditfor existing CycloneDX BOMs where the user wants prioritization, upstream review guidance, or SARIF/JSON output. - Use
cdxgen --bom-auditwhen the user wants findings embedded during BOM generation. - Use
cdx-auditfor Cargo/Rust BOMs too when the BOM containspkg:cargo/...dependencies and the goal is upstream review prioritization. - For Cargo-focused work, combine predictive
cdx-audittriage with normal BOM generation and--bom-auditrules so registry, workspace, and native-build signals are all visible. - For container/rootfs scans, expect cdxgen to include non-package operational inventory too, such as package-owned files, installed commands, repository source records, and trusted key material when present.
- For container/rootfs review in
cdxi, use.unpackagedbinsand.unpackagedlibsto isolate executable and shared-library file components that sit outside OS package ownership. - For live Linux OBOM work, also expect GTFOBins properties on selected osquery-derived runtime artifacts and hardening-oriented findings from
sysctl_hardeningandmount_hardening. - For CBOM review in
cdxi, use.sourcecryptoswhen you want just the JavaScript or TypeScript source-derived algorithm components rather than the full cryptographic asset list. - For Go Evinse review in
cdxi, use.golemsummary,.golemhotspots, and.golemcoveragebefore drilling into.occurrences,.callstack, or.inspect <component>. For crypto-flow review, prioritize components withcdx:golem:cryptoDataFlow=true,cdx:golem:cryptoDataFlowCount, and renderedcryptographic-assetalgorithms.
⛔ Anti-Hallucination & Safety Constraints
cdxgenoutputs CycloneDX JSON by default and can export SPDX JSON-LD via--format spdx; usecdx-convertfor dedicated CycloneDX-to-SPDX conversion of existing BOM files.- ALWAYS use absolute paths for
[path]and-o. Relative paths or paths with spaces cause external tool failures. - NEVER run as
rootwhenCDXGEN_SECURE_MODE=true. Node.js permissions will reject wildcard FS/child grants. - DO NOT auto-invoke
--install-deps(default:true) in CI, containers, or air-gapped environments. Use--no-install-depsor--lifecycle pre-build. - Java is only needed on jar-based atom platforms. C/C++, Python, and CBOM source analysis uses the atom companion, which ships as a native binary (no JDK) on linux-amd64, linux-arm64 (glibc), linux-amd64-musl, darwin-arm64, and windows-amd64. On darwin-amd64, windows-arm64, and linux-arm64-musl it runs on the JVM and requires Java ≥ 23; older versions cause silent freezes.
- NEVER construct PackageURL (purl) strings manually in prompts or scripts. Let
cdxgenhandle resolution. - Secure Mode (
CDXGEN_SECURE_MODE=true) requires explicit Node.js--permissionflags. Do not grant--allow-fs-read="*"or--allow-fs-write="*". - Environment Variables: a CLI option can be set as
CDXGEN_plus the option name (e.g.,CDXGEN_TYPE=java). Settings that are not CLI options keep their own names with no prefix (e.g.,FETCH_LICENSE=true); seedocs/ENV.md. - ALWAYS run
--dry-runfirst for agent-driven workflows. Review the activity summary, prefer--activity-report jsonorjsonlfor machine-readable inspection, and ask the user for permission before rerunning without--dry-run. - DO NOT mix
hbom/hardwarewith software project types such asjs,java,python,os, orociin the same run. Generate HBOM separately. - When using server mode or BOM upload features, keep
CDXGEN_ALLOWED_HOSTSand related host allowlists narrow. Prefer exact hosts; server-side Dependency-Track submission interprets wildcard entries as real subdomains only (for example,*.example.com), not suffix matches. - When reviewing generated BOMs that include AI/MCP inventory or Chrome extension metadata, still inspect emitted properties before sharing externally even though cdxgen now redacts common secret-bearing URL and token patterns.
- For packaged Electron releases, prefer
-t asarso archive file inventory, integrity verification, and embedded Node manifest analysis are included in the BOM and BOM-audit output. - For OS trust inventory, remember the modeling split: repository sources are normal
datacomponents, while trusted keys/certificates arecryptographic-assetcomponents. Do not assume those crypto assets have purls. - On macOS OBOM runs, use the troubleshooting guide if tables come back empty or permission-gated; shell-mode osquery execution avoids the older
/var/osquerystartup failure mode. - For offline host or golden-image reviews, prefer
--bom-audit --bom-audit-categories rootfs-hardeningso repository trust, privileged helpers, and service drift are checked without requiring live osquery collection. - Source-derived algorithm components must stay validator-safe. Emit only algorithms that can be mapped to a known OID.
- For Go Evinse/Golem evidence, do not expose raw
go:generatecommands, raw environment values, HTTP parameter values, raw key material, plaintext, ciphertext, embedded file contents, generated source contents, or secrets. Use the emittedcdx:golem:*counts, categories, rule IDs, taint kinds, scopes, call-stack frames, crypto algorithm/OID pivots, and module facts for review.
📤 Output & Validation
- Primary output: Valid CycloneDX JSON at
-opath - Default behavior automatically validates against spec (
--no-validateto skip) - Exit code
0= success & validation passed. Non-zero = parse/validation/execution failure - Protobuf export:
--export-proto --proto-bin-file bom.cdx - Namespace mapping: Auto-generates
<output>.mapif class resolution enabled (--resolve-class)
🤖 Agent Execution Guidelines
| Scenario | Recommended Action |
| Command fails silently | Check missing build tools, atom availability (native binary on most platforms; Java ≥ 23 only on darwin-amd64, windows-arm64, linux-arm64-musl), or secure mode restrictions. Suggest container image or --no-install-deps. |
| Network/registry timeouts | Set HTTP_PROXY/HTTPS_PROXY; cdxgen's HTTP client honors them automatically. Do not auto-retry without user confirmation. |
| Large mono-repos | Use --no-recurse + explicit -t <lang> or --exclude-type to limit scope. |
| Server mode invocation | Poll /health first. POST to /sbom with JSON body or query params. Pass GITHUB_TOKEN via env if scanning private repos. |
| Aliases | obom = cdxgen -t os<br>cbom = cdxgen --include-crypto --evidence --deep (spec version defaults to 1.7). cbom rejects --component-type and -t os; use obom for OS inventory |
| HBOM | hbom is the dedicated host-hardware command. Equivalent library path: cdxgen -t hbom. Do not mix it with other project types. |
| Output parsing | Use -p for human-readable tables. Parse JSON at -o path programmatically. Never assume stdout contains the BOM unless -o is omitted. |
| Signature verification | Use bundled cdx-verify -i bom.json --public-key public.key. |
| SBOM signing | Use bundled cdx-sign -i bom.json -k private.key. |
| Predictive auditing | Use bundled cdx-audit --bom bom.json for existing BOMs. Prefer --report sarif --report-file audit.sarif for code-scanning uploads. |
| OBOM troubleshooting | For macOS permission/startup quirks, check docs/OBOM_MACOS_TROUBLESHOOTING.md; for live-host triage patterns, use docs/OBOM_LESSONS.md. |
| Go data-flow review | Use evinse -l go --deep or --with-data-flow --golem-dataflow crypto for Golem data-flow. Keep worker/proc/slice limits bounded for CI and inspect cdx:golem:dataFlow* / cdx:golem:cryptoDataFlow* properties. |
Dry-run-first workflow for agents
- Run
cdxgenwith--dry-runfirst. - Prefer
--activity-report jsonor--activity-report jsonlso the pending reads, blocked writes, blocked command execution, blocked network access, and blocked submissions are easy to inspect. - Summarize the planned actions for the user.
- Ask for permission before rerunning without
--dry-run. - Only perform real execution after the user explicitly approves it.
Fidelity-loop workflow for agents
When the goal is a more accurate SBOM rather than a first scan, follow the sbom-fidelity-loop skill at .agents/skills/sbom-fidelity-loop/SKILL.md: scan with --profile introspect, read the JSON fidelity report, apply its ranked remediations (asking before installs, never modifying the project), and re-scan until the fidelity tiers stop improving.
📚 Reference Links
- Repo: https://github.com/cdxgen/cdxgen
- Docs: https://cdxgen.github.io/cdxgen
- Project Types: https://cdxgen.github.io/cdxgen/#/PROJECT_TYPES
- Env Vars: https://cdxgen.github.io/cdxgen/#/ENV
- Secure Mode: https://cdxgen.github.io/cdxgen/#/PERMISSIONS
- OWASP sponsorship link: https://owasp.org/donate/?reponame=www-project-cdxgen&title=OWASP+cdxgen
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

