Safeguard
Supply Chain Security•

Best SBOM generators by language and container image

Syft, Trivy, cdxgen, Microsoft sbom-tool and cyclonedx-gomod compared on formats, inputs and fit, so you can pick an SBOM generator for your stack.

Safeguard Security Team
4 min read

The best SBOM generator is the one built for your stack. Syft and Trivy cover container images and filesystems. cdxgen reads many languages from source. Microsoft's sbom-tool writes SPDX for build pipelines. cyclonedx-gomod is specific to Go. Generate at build time, then check the output.

Safeguard publishes this guide and sells a competing product, so we describe other tools only from their own documentation, as of 19 October 2026.

Key takeaways

  • Pick the output format your customers ask for: SPDX or CycloneDX.
  • Language specific generators usually know their package manager better. Image scanners see what is actually installed.
  • Generate the SBOM from the build, not from a developer laptop.
  • An SBOM is a list. It is useful once you scan it and keep it current.

What is an SBOM generator?

An SBOM generator lists the components inside software. NTIA describes an SBOM as "a nested inventory for software, a list of ingredients that make up software components." A generator reads a project or an image and writes that list in a standard format.

How do the main generators compare?

ToolType and licenseInputs (per docs)Output formats (per docs)
SyftOpen source, Apache-2.0Container images, filesystems, archivesCycloneDX, SPDX, Syft JSON; can convert between them
TrivyOpen sourceSubcommands such as image, fs, rootfs and vmCycloneDX and SPDX; CycloneDX XML is not supported yet
cdxgenOpen source, Apache-2.0Source projects, container images, root filesystems, live hostsCycloneDX (1.7 default, downgradable to 1.4 or 1.5); SPDX 3.0.1 JSON-LD
Microsoft sbom-toolOpen source, MITBuild component folders, via Component DetectionSPDX 2.2 by default; SPDX 3.0 with a flag
cyclonedx-gomodOpen source, Apache-2.0Go modules, applications, binariesCycloneDX XML by default or JSON

When should I pick each one?

Syft fits container workflows and pairs with Grype for scanning. It can also create signed SBOM attestations using in-toto.

Trivy suits teams already using it as a scanner. Add --scanners vuln to include vulnerability data in CycloneDX output, otherwise you get a plain SBOM.

cdxgen suits polyglot repos. Its docs name Java (Maven, Gradle, sbt), JavaScript and TypeScript (npm, pnpm, yarn, Bun, Deno), Python, Go, PHP, Ruby, Rust, .NET and C, and note that the full list is on a separate page.

sbom-tool suits Microsoft heavy pipelines, with guides for GitHub Actions and Azure DevOps. The project does not accept open source contributions.

cyclonedx-gomod has a mode that lists only the modules an application depends on. Its notes say SBOMs for vendored modules lack component hashes.

How do I choose an SBOM generator?

  1. Which format do customers or regulators require?
  2. Does it read your package manager, or only installed files?
  3. Does it cover container base layers?
  4. Can it run in CI and publish the file as a build artifact?
  5. Can it sign or attest the output?
  6. Does it record dependency relationships, not only a flat list?
  7. Can you diff two SBOMs to catch drift?

What should I do after I generate an SBOM?

Scan it. The free tool at gold.safeguard.sh/scan accepts a dependency manifest or a CycloneDX or SPDX SBOM, checks up to 100 dependencies, needs no login and parses the file in your browser. Safeguard also supports SBOM generation and import, with CVE and CISA KEV status in the Gold registry at gold.safeguard.sh.

Frequently asked questions

Which is better, SPDX or CycloneDX?

Neither wins outright. Use whichever your customers or regulators request, and pick a tool that exports both. Syft, Trivy and cdxgen can produce either.

What is the best free SBOM generator?

Syft, Trivy, cdxgen, sbom-tool and cyclonedx-gomod are all free and open source. The right one depends on your language and whether you ship containers.

Should I generate an SBOM from source or from the image?

Source shows what you declared. The image shows what shipped. Many teams keep both and compare them.

Does an SBOM list vulnerabilities?

Not by default. Scan the SBOM against a vulnerability database, or share VEX statements to say which findings apply.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.