Replies: 2 comments
-
For reference, below is how cdxgenGPT responds to this prompt. ![]() |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Qwen3-235B-A22B-2507
Prompt
Alice has a monorepo that is authored in multiple programming languages. She has heard of a tool called cdxgen to generate software bill of materials but isn't sure how to use them. Bob is an application security expert. Do you think Alice can use cdxgen to generate the reports that Bob might find useful?
Observation
qwen3 thinking seems to hallucinate and make up CLI arguments as it goes. For example, it is suggesting arguments such as
--all
,--file
,--bom
etc that do not exist. Plus, cdxgen doesn't capture pedigree and vulnerability references, so most of the information in the response is actually wrong. It appears like Qwen team isn't making use of our cdx-docs dataset at all :(Raw thinking
Raw response
Yes, absolutely. Alice can (and should) use cdxgen to generate SBOMs that will be highly valuable to Bob, the application security expert. Here's why, along with key considerations and best practices for Alice:
✅ Why cdxgen is Perfect for Alice's Monorepo & Bob's Needs
Native Multi-Language Support
cdxgen is explicitly designed for polyglot monorepos. It auto-detects language ecosystems (JavaScript/TypeScript, Python, Java, .NET, Go, Rust, PHP, Ruby, etc.) by scanning for manifest files (
package.json
,requirements.txt
,pom.xml
,Cargo.toml
, etc.).npm ls
,pip freeze
,mvnw dependency:list
) under the hood.Bob Gets Security-Ready Output
cdxgen generates CycloneDX (the SBOM standard favored by security teams), which Bob can immediately use for:
Critical Security Data Included
cdxgen captures:
cdxgen
from the root of the monorepo. Use--all
to scan all subdirectories:cdxgen -o sbom.json --all .
--python-env venv
.- Java: Ensure
mvn
/gradle
is in PATH.- Go: Run
go mod tidy
first.package-lock.json
). If lockfiles are missing, run build commands first (e.g.,npm install
,pip install -r requirements.txt
).--file
.cdxgen -o service-a/sbom.json service-a/
🔍 What Bob Will Do with the SBOM
Ingest into Dependency-Track:
→ Bob gets a real-time dashboard of vulnerabilities, license risks, and component metadata.
Automate Security Gates:
Integrate the SBOM into CI/CD to block builds with critical CVEs (e.g., using Grype + cdxgen).
Audit Supply Chain Attacks:
Verify hashes in the SBOM against trusted sources (e.g., checksums from official package repos).
🚫 When cdxgen Might Fall Short (and Fixes)
Proprietary/Internal Libraries:
cdxgen won’t auto-detect unpublished packages.
Fix: Manually add them to the SBOM using
bom
CLI or annotate dependencies in code.Binary Dependencies (e.g., pre-built
.jar
files):cdxgen can’t resolve their dependencies.
Fix: Use
--bom
to merge with SBOMs from other tools (e.g., Syft for container scans).False Negatives:
If lockfiles aren’t committed, transitive deps may be missed.
Fix: Enforce lockfile commits in CI (e.g.,
npm ci
,pip freeze
).💡 Pro Tips for Alice
Generate SBOMs in CI/CD:
Add this to
.gitlab-ci.yml
/github/workflows
:Validate the SBOM:
Use CycloneDX CLI to check validity:
cyclonedx-cli validate -i sbom.json
Combine with SCA Tools:
Pipe cdxgen output directly into scanners:
cdxgen - | grype -
The Verdict
Next Step for Alice:
Then hand
sbom.json
to Bob – he’ll know exactly what to do with it. 🛡️Beta Was this translation helpful? Give feedback.
All reactions