{
 "schema_version": 1,
 "generated": "2026-11-09",
 "id": "anchore-syft--export-an-sbom-in-spdx-and-cyclonedx-with-syft",
 "repo": "anchore/syft",
 "repo_url": "https://github.com/anchore/syft",
 "repo_slug": "anchore-syft",
 "title": "Export an SBOM in SPDX and CycloneDX formats",
 "page_title": "How to export an SBOM in SPDX and CycloneDX formats with Syft",
 "summary": "Write SPDX and CycloneDX SBOM files in a single run so customers and auditors can each get their format.",
 "who": "A security lead who has to hand an SBOM to customers or compliance reviewers.",
 "problem": "Different consumers ask for different SBOM formats.",
 "outcome": "An spdx.json and a cdx.json file written from one scan.",
 "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"
 ],
 "agent_prompt": "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.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Beginner",
 "time": "15 minutes",
 "basis": "readme",
 "caveat": "The README shows several -o flags in one run, each writing its own file.",
 "category": "Security and science",
 "tags": [
  "Security and science"
 ],
 "lang": "go",
 "requirements": [
  "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/anchore-syft/export-an-sbom-in-spdx-and-cyclonedx-with-syft/",
 "md": "https://dedupedai.com/use-cases/anchore-syft/export-an-sbom-in-spdx-and-cyclonedx-with-syft/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/anchore-syft--export-an-sbom-in-spdx-and-cyclonedx-with-syft.json",
 "api_version": "v1"
}
