Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk4 min

sbomnix: Generate Software Bills of Materials for Nix

sbomnix creates SBOMs from Nix flake references or store paths. Learn which input to use, how runtime and build-time scopes differ, and why metadata can be incomplete.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

sbomnix generates CycloneDX and SPDX software bills of materials (SBOMs) from a Nix flake reference or store path. By default, it inventories runtime dependencies and must build the target to discover them; use --buildtime to inventory build-time dependencies without building the target. For richer nixpkgs metadata, the project recommends using a flake reference rather than a store path.

What sbomnix does

The sbomnix README describes the tool as a utility that generates SBOMs from a Nix flake reference or store path. An SBOM is a machine-readable inventory of software components and their relationships or identifying details. sbomnix is part of a broader repository of Nix supply-chain tools that also includes dependency-graph, vulnerability-scanning, outdated-dependency, and provenance utilities.

As an Amazon Associate I earn from qualifying purchases.

The main documented export formats are CycloneDX JSON and SPDX JSON. The README’s example also produces CSV, which can be convenient for spreadsheet review. Exporting an SBOM records an inventory; it does not, by itself, establish that the components are vulnerability-free or that every component has complete metadata.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose an input: flake reference or store path

Use a flake reference when source context matters

A flake reference identifies a target in a flake, for example github:NixOS/nixpkgs/nixos-unstable#wget. This is the recommended choice when you want sbomnix to enrich the SBOM with metadata associated with nixpkgs. For ordinary flake targets, the tool searches the flake lock graph for the pinned nixpkgs source; for NixOS toplevel flakerefs, it uses the evaluated configuration package set. Enrichment can include descriptions, licenses, maintainers, and homepage links. The project documents these rules in its metadata-enrichment guide.

Use a store path when the realized output is your starting point

You can also give sbomnix a store path, such as /nix/store/…, or a result symlink pointing to one. A store path identifies an output but does not say which nixpkgs source produced it. Consequently, sbomnix skips nixpkgs metadata enrichment for store-path targets. The tool can still generate an SBOM, but expect less source-derived descriptive and identification metadata than when using a flake reference.

Runtime versus build-time dependencies

View What it represents Does the target need to be built? How to select it
Runtime dependencies Store paths referenced by the built output Yes. The target must be built so its runtime closure can be determined. Default
Build-time dependencies Store paths needed to reproduce the derivation’s build, including build tools and compilers No. Evaluating this closure does not require building the target. --buildtime

These inventories answer different questions. Runtime scope is useful when you need to understand what an output brings into an installed or deployed environment. Build-time scope is useful when you need to account for tools and dependencies involved in producing that output. A build-time inventory is not a substitute for a runtime inventory, or vice versa; choose the scope that matches the policy or analysis you need.

Install and generate the SBOM

Nix must be available on your PATH. The documented flake invocation can run sbomnix directly:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
nix run github:tiiuae/sbomnix#sbomnix -- --help

For a flake target, the README demonstrates writing CycloneDX JSON, SPDX JSON, and CSV outputs:

nix run github:tiiuae/sbomnix#sbomnix -- github:NixOS/nixpkgs/nixos-unstable#wget 
  --output sbom.cdx.json sbom.spdx.json sbom.csv

Use a store path or result symlink in place of the flake reference when that is the input you have. Add --buildtime when you want the derivation’s build-time dependency closure rather than the default runtime view. Check --help for the current command’s available options and output syntax. For direct, non-flake use, the project requires a modern Nix with nix-command and --json-format 1. Developers cloning the repository can enter its development shell with nix develop.

Why metadata may be missing or uncertain

Metadata enrichment depends on the target context

Flake references give sbomnix context from which to select nixpkgs metadata. Store paths do not carry that provenance, so enrichment is skipped for them. If metadata is missing from a store-path SBOM, that does not necessarily mean the underlying package has no metadata in nixpkgs; sbomnix may simply lack the source context needed to associate it.

Names and versions are hints, not proof of identity

For metadata matching, package names, pnames, and versions are lookup hints. The metadata helper accepts a match only when the derivation path (drvPath) or output path (outPath) exactly matches an SBOM component. This helps avoid attaching metadata solely because two packages have similar names.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

CPE identifiers may be exact or heuristic

When nixpkgs metadata provides an exact CPE identifier, sbomnix prefers it. Heuristic CPE matching is a fallback and can be disabled. If the CPE dictionary cannot be used, fallback identifiers may be less accurate unless strict dictionary behavior is requested. Treat a heuristic identifier as a possible match, not definitive proof that a component is the named upstream product.

Explicit PURLs have documented limits

The README describes experimental support for an explicit PURL in derivation JSON. When present, a singular meta.identifiers.purl takes precedence over a PURL generated from the package name and version, and is normalized for export. sbomnix does not validate that the explicit PURL truly identifies the package. The documentation also notes a limitation for multi-output or grouped components, so explicit identifiers should not be assumed to resolve every identification edge case.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How sbomnix fits among Nix SBOM tools

There are other Nix-focused approaches, but the available descriptions point to different integration models rather than establishing a universal winner.

  • nix-sbom-helper is described as tooling for standard Nix and flakes that exposes sbomnix-generated SBOMs as Nix outputs.
  • Bombon describes generating CycloneDX v1.7 SBOMs for Nix packages.

Choose based on how you want to invoke the generator, which export formats you need, the metadata behavior you require, and whether you need runtime or build-time dependency scope. The cited project descriptions do not provide a comprehensive feature or quality comparison.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Version context

The project’s releases page lists v1.8.0. Its release notes describe a switch by sbomnix and nixgraph to structured Nix data sources, removal of legacy fallback code paths, and improvements to flakeref handling and metadata enrichment, including component-identity lookup and preference for nixpkgs CPE data. The rendered release entry shows “09 Jun 09:02” without a year, so the date should not be read as a particular year. See the sbomnix releases page for the project’s release details.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.