Skip to content

Publish the release SBOM as SPDX 3 and fix its source reference - #4562

Merged
kubernetes-prow[bot] merged 1 commit into
kubernetes:masterfrom
saschagrunert:release-sbom-spdx3
Nov 3, 2026
Merged

kubernetes-prow[bot] merged 1 commit into
kubernetes:masterfrom
saschagrunert:release-sbom-spdx3

Conversation

@saschagrunert

@saschagrunert saschagrunert commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

What type of PR is this?

/kind feature
/kind bug

What this PR does / why we need it:

  • SPDX 3 release SBOM. The stage run writes the release artifacts SBOM as SPDX 3.0.1 JSON-LD too, converted from the same document with bom v0.8.0 (spdx.ToProtobom, spdx.WriteSPDX3), and stages it as kubernetes-release.spdx3.json next to kubernetes-release.spdx. Like every staged file, it is published with the release to dl.k8s.io, gets a checksum and is a subject of the stage provenance. The source SBOM stays SPDX 2.3 only for now: converted, it grows from 24 MB to 88 MB per release.
  • Source reference fix in both documents. The generated-from relationships of the release SBOM pointed to DocumentRef-kubernetes-<version>:SPDXRef-Package-kubernetes, but the source SBOM has no such element. The stage run now reads the package the source SBOM describes (its root element), k8s.io/kubernetes (for v1.37.1 SPDXRef-Package-k8s.io-kubernetes-v1.37.1-1C438aaeb4e5), and points the relationships to it. Otherwise the SPDX 2.3 document is unchanged, sbom.k8s.io keeps serving it, and the release provenance takes its subjects from it.
  • Source link in SPDX 3. bom's conversion drops relationships to other documents, since protobom can't express SPDX 3 imports. The SPDX 3 document therefore gets the source package as an element of its own, with the ID from the source SBOM, an external reference to https://sbom.k8s.io/<version>/source and one generates relationship to all images and binaries built from it. It carries the release version and pkg:golang/k8s.io/kubernetes@<version>, since it describes the source code of the release; the source SBOM itself keeps the version bom derives for the module (v1.37.1-1+8aaeb4e5 for v1.37.1).
  • Own IRI. The SPDX 3 document is https://sbom.k8s.io/<version>/release.spdx3.json instead of reusing the namespace of the SPDX 2.3 document. A matching redirect can follow in kubernetes/k8s.io.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Checked with the published v1.37.1 SBOMs: the rewritten SPDX 2.3 reference exists in the source SBOM, and the SPDX 3 document (1.5 MB, converted in about 30 ms) has one generates relationship from the source package to the 24 images and passes spdx3-validate for SPDX 3.0.1. The relationship comment of the SPDX 2.3 document can't be carried over, since protobom edges have no comment; the source element carries it instead. The SPDX 2.3 document pins the source SBOM by checksum; SPDX 3 would do that with an ExternalMap and verifiedUsing, which protobom can't express yet, so the comment of the external reference carries the SHA1 and SHA256 checksums meanwhile.

Does this PR introduce a user-facing change?

Kubernetes releases publish their release artifacts SBOM as SPDX 3.0.1 JSON-LD too, as `kubernetes-release.spdx3.json` next to `kubernetes-release.spdx`. The release SBOM now references the package of the source SBOM that exists, instead of a missing one.

@kubernetes-prow kubernetes-prow Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. needs-priority cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 13, 2026
@kubernetes-prow
kubernetes-prow Bot requested review from jimangel and jrsapi October 13, 2026 11:56
@kubernetes-prow kubernetes-prow Bot added area/release-eng Issues or PRs related to the Release Engineering subproject approved Indicates a PR has been approved by an approver from all required OWNERS files. sig/release Categorizes an issue or PR as relevant to SIG Release. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 13, 2026
@saschagrunert
saschagrunert force-pushed the release-sbom-spdx3 branch 2 times, most recently from b824a4e to 2872666 Compare October 13, 2026 12:14
@saschagrunert saschagrunert changed the title Publish the release SBOM as SPDX 3 too Publish the release SBOM as SPDX 3 and fix its source reference Oct 13, 2026
@saschagrunert

Copy link
Copy Markdown
Member Author

@kubernetes/release-engineering PTAL

@saschagrunert

Copy link
Copy Markdown
Member Author

@kubernetes/release-engineering PTAL

@xmudrii xmudrii left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some nits, but otherwise looks great to me. I would like to check something before we merge this though.
/hold

Comment thread pkg/anago/stage.go Resolved
Comment thread pkg/anago/stage.go Resolved
Comment thread pkg/anago/stage.go Resolved
@kubernetes-prow kubernetes-prow Bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Oct 30, 2026
@kubernetes-prow kubernetes-prow Bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 2, 2026
The stage run writes the release artifacts SBOM as SPDX 3.0.1 JSON-LD next to the SPDX 2.3 tag-value document and stages it as kubernetes-release.spdx3.json; the source SBOM stays SPDX 2.3 only, since it would grow from 24 MB to 88 MB. The generated-from relationships of both documents pointed to SPDXRef-Package-kubernetes, which the source SBOM doesn't have; they now point to the package the source SBOM describes. bom's conversion drops relationships to other documents, so the SPDX 3 document gets that package as an element of its own, with the release version, a reference to the source SBOM carrying its checksums and one generates relationship, and its own IRI, the URL sbom.k8s.io would serve it under.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@kubernetes-prow kubernetes-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 3, 2026
@saschagrunert

Copy link
Copy Markdown
Member Author

@kubernetes/release-engineering PTAL

@xmudrii xmudrii left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve
/hold cancel

@kubernetes-prow kubernetes-prow Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 3, 2026
@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 3, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: saschagrunert, xmudrii

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [saschagrunert,xmudrii]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow
kubernetes-prow Bot merged commit 933dc2e into kubernetes:master Nov 3, 2026
11 checks passed
@kubernetes-prow kubernetes-prow Bot added this to the v1.38 milestone Nov 3, 2026
@saschagrunert
saschagrunert deleted the release-sbom-spdx3 branch November 3, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants