Skip to content

fix(ci): record release SBOMs that name the image digest they describe - #13685

Merged
cv merged 1 commit into
v1from
fix/release-sbom-subjects
Oct 23, 2026
Merged

cv merged 1 commit into
v1from
fix/release-sbom-subjects

Conversation

@cv

@cv cv commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Failure

The v0.1.0-rc6 draft's 24 agent and proxy SBOMs don't name the image they describe. Each document's subject is nc-fabric@sha256:..., a digest that is neither the platform manifest it is stored under nor the image config: #13664 scanned the local image, and Syft names the copy Docker exports. Only the four runtime SBOMs, scanned from the registry, name their manifest digest. Their contents are right: rescanning five rc6 platforms from their release digests gave identical packages, files, and relationships. But a reader can't tell from a document which image it describes, and staging copied whatever sbom-DIGEST held without checking.

Decision

  • image-sbom.sh scans the pushed platform manifest from the registry, so the document's subject is the digest it is stored under, and it refuses to record a document that names another one.
  • It reuses a recorded document only when that document names its digest; otherwise it scans again and replaces it. That replaces the rc6 records the next time each image is pushed or staged.
  • Staging calls the same script, with an output path, in place of its own copy-or-scan code. A scan there records its result, so a rerun reuses it.
  • The record is built for the image's platform, so staging can record an arm64 document from an amd64 runner.

The first staging after this rescans the current agent and proxy images once, since their records name exported copies. Each image workflow push now pulls the pushed image to scan it; rescans of rc6 agent images from the registry took 16 to 30 s each on a workstation.

The prune job needs no change: simulated on the package's current versions with 10 down to 1 kept commits, it never deletes an SBOM whose image it keeps, because a record is always pushed after its image.

Validation

  • Against a local registry: the origin/v1 script recorded a document naming another digest (RED). This script replaced it with one naming the stored digest, reused it from a digest reference with an output path, and recorded and reused an amd64 image's document from an arm64 host.
  • shellcheck -s sh is clean; actionlint reports the same findings as origin/v1.
  • Deferred to CI: the next image-affecting v1 push records agent SBOMs through the registry, and the next release candidate's staging replaces the old records once and reuses them on a rerun.

## Failure

The `v0.1.0-rc6` draft's 24 agent and proxy SBOMs don't name the image they describe. Each document's subject is `nc-fabric@sha256:...`, a digest that is neither the platform manifest it is stored under nor the image config: #13664 scanned the local image, and Syft names the copy Docker exports. Only the four runtime SBOMs, scanned from the registry, name their manifest digest. Their contents are right: rescanning five rc6 platforms from their release digests gave identical packages, files, and relationships. But a reader can't tell from a document which image it describes, and staging copied whatever `sbom-DIGEST` held without checking.

## Decision

- `image-sbom.sh` scans the pushed platform manifest from the registry, so the document's subject is the digest it is stored under, and it refuses to record a document that names another one.
- It reuses a recorded document only when that document names its digest; otherwise it scans again and replaces it. That replaces the rc6 records the next time each image is pushed or staged.
- Staging calls the same script, with an output path, in place of its own copy-or-scan code. A scan there records its result, so a rerun reuses it.
- The record is built for the image's platform, so staging can record an arm64 document from an amd64 runner.

The first staging after this rescans the current agent and proxy images once, since their records name exported copies. Each image workflow push now pulls the pushed image to scan it; rescans of rc6 agent images from the registry took 16 to 30 s each on a workstation.

The prune job needs no change: simulated on the package's current versions with 10 down to 1 kept commits, it never deletes an SBOM whose image it keeps, because a record is always pushed after its image.

## Validation

- Against a local registry: the `origin/v1` script recorded a document naming another digest (RED). This script replaced it with one naming the stored digest, reused it from a digest reference with an output path, and recorded and reused an amd64 image's document from an arm64 host.
- `shellcheck -s sh` is clean; `actionlint` reports the same findings as `origin/v1`.
- Deferred to CI: the next image-affecting `v1` push records agent SBOMs through the registry, and the next release candidate's staging replaces the old records once and reuses them on a rerun.

Signed-off-by: Carlos Villela <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

@cv
cv merged commit 5128893 into v1 Oct 23, 2026
49 checks passed
@cv
cv deleted the fix/release-sbom-subjects branch October 23, 2026 22:43
@wscurran wscurran added v1 NemoClaw v1 branch area: ci CI workflows, checks, release automation, or GitHub Actions area: packaging Packages, images, registries, installers, or distribution chore Build, CI, dependency, or tooling maintenance security area: security Security controls, permissions, secrets, or hardening and removed security labels Oct 27, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: packaging Packages, images, registries, installers, or distribution area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants