Skip to content

Release SBOMs come from each stack's package manager

Context and Problem Statement

Only python-release.yml attached an SBOM to its GitHub release, from uv export. The TypeScript, Rust and generic releases attached none, and release.yml had no assets at all. A release SBOM should list what the released package needs at runtime, at the locked versions the tests ran with: no dev tools, no workflow actions, and no state of main read at release time. Whatever makes it runs in a release job, so every extra tool there is one more thing that can be compromised.

Considered Options

  • Each stack's own package manager or its CycloneDX plugin
  • GitHub's dependency-graph SBOM export
  • Syft over the checkout
  • cdxgen
  • Trivy's SBOM output

Decision Outcome

Chosen: each stack's own exporter, CycloneDX 1.5 throughout. Python keeps uv export --format cyclonedx1.5, TypeScript runs pnpm sbom --prod, Rust runs cargo cyclonedx --no-build-deps and Go runs cyclonedx-gomod (app for a binary, mod for a library, with the go.mod tools dropped first). Each export runs where it reads only the lockfile and the manifest, with no write token and no OIDC token. .github/scripts/check-sbom.sh refuses an SBOM that is not CycloneDX 1.5 or that lists no components while the lockfile names runtime dependencies. A separate job attests each SBOM, and the release job verifies the attestation before it attaches the SBOM with its <asset>.intoto.jsonl bundle.

Consequences

  • Good: each SBOM lists runtime dependencies only, at the locked versions, from the tool that already resolves them.
  • Good: no general-purpose scanner runs in a release job.
  • Bad: four exporters and four ways to list runtime dependencies, each with its own flags. cargo-cyclonedx and cyclonedx-gomod are pinned in copier.yml and bumped by Renovate.
  • Bad: a publishing release workflow attaches only its own stack's SBOM. With publish_to_pypi, publish_to_crates or publish_to_npm beside other stacks, only the published stack's SBOM is attached; the other stacks get none.

Confirmation

scripts/render/release.sh runs every rendered export step with fake package managers: an empty SBOM from a lockfile with runtime dependencies fails, an empty one without them passes. It also checks that only the attest job of release.yml holds the OIDC token and that the release job verifies every SBOM before it creates the draft. scripts/render/parse.sh does the same for python-release.yml.

Pros and Cons of the Options

GitHub's dependency-graph SBOM export

  • Good: no tool to install.
  • Bad: SPDX only.
  • Bad: it lists dev tools and Actions as components. For sourceledger it listed 117 packages, pytest and ruff among them, against the 55 runtime ones in the uv SBOM.
  • Bad: it reads the default branch when called, not the tagged commit.

Syft over the checkout

  • Good: one tool for every stack.
  • Bad: it cannot tell dev from runtime dependencies in Cargo.lock or a pnpm lockfile.

cdxgen

  • Good: one tool, and it can separate dev dependencies.
  • Bad: a whole Node dependency tree, plus Java for its reachability analysis, in a release job.

Trivy's SBOM output

  • Good: Trivy already scans the container image.
  • Bad: Trivy's action chain was compromised in March 2026 (GHSA-69fq-xp46-6x23), through trivy-action's movable tags and its setup-trivy call by tag. docker.yml now runs the Trivy image pinned by digest, but only for the image scan.