DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to export an SBOM in SPDX and CycloneDX formats with Syft

Write SPDX and CycloneDX SBOM files in a single run so customers and auditors can each get their format.

Short answer: Install Syft with curl -sSfL https://get.anchore.io/syft | sudo sh -s -- -b /usr/local/bin; then 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. All steps.

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

  1. Install Syft with curl -sSfL https://get.anchore.io/syft | sudo sh -s -- -b /usr/local/bin
  2. Run Syft on your image or directory with the flags -o spdx-json=./spdx.json -o cyclonedx-json=./cdx.json
  3. Check both files were written
  4. 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

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer