Who it is forA security lead who has to hand an SBOM to customers or compliance reviewers.
The problemDifferent consumers ask for different SBOM formats.
The outcomeAn spdx.json and a cdx.json file written from one scan.
What you need first
- A Linux or macOS shell with curl and sudo, or another install method from the Syft docs
- A container image reference or a project directory to scan
- Grype is optional, only for the vulnerability scanning step
Steps
- Install Syft with
curl -sSfL https://get.anchore.io/syft | sudo sh -s -- -b /usr/local/bin - Run Syft on your image or directory with the flags
-o spdx-json=./spdx.json -o cyclonedx-json=./cdx.json - Check both files were written
- Attach them to your release or share them with the reviewer
Prompt for your agent
Use anchore/syft to scan <my project or image> and write both an SPDX JSON and a CycloneDX JSON SBOM with the flags `-o spdx-json=./spdx.json -o cyclonedx-json=./cdx.json`, then confirm both files exist and count the packages in each.
Caveat. The README shows several -o flags in one run, each writing its own file.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for anchore/syft and "Export an SBOM in SPDX and CycloneDX formats"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer