Record the pushed image digests in the release SBOM #4623
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 252 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.331
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4623"
general
weight: 0.35
xmudrii
What type of PR is this?
/kind bug
What this PR does / why we need it:
The image packages of the release SBOM carry digests no registry serves: bom computes them from the image archives, but
docker pushcompresses the layers again. For v1.38.0-beta.0, the SBOM nameskube-apiserver-amd64assha256:738b17b8…, while registry.k8s.io servessha256:4cda9773…. Every release since krel v0.22.0 is affected.The stage now pushes the images first and writes the artifacts SBOM afterwards, with the pushed digest of the same repository in the checksum and package URL of each image package. Staging fails if an image matches no pushed image or several. The checksums, upload and stage provenance still cover the written SBOM. Layer digests are the
diff_idsof the image config, which the push keeps.Which issue(s) this PR fixes:
None
Special notes for your reviewer:
Found while answering a package URL question for #4603. Tested with a mock stage (
5728ede8) and release (53ece1d4): all 24 image package URLs in both staged SBOMs resolve in the mock registry with matching checksums, and the release verified all staged artifacts.The final
provenance.jsonof the mock release has 160 subjects instead of 100, which comes from protobom 0.7.0 (#4609), not this change: the published v1.38.0-beta.0 SBOM gives 160 with 0.7.0 and 100 with 0.6.2. I'll follow up separately.The images are now pushed and signed before anything goes to GCS, so a failure after the push leaves signed images in the staging registry without staged artifacts, where it used to leave staged artifacts without images. Both are partial stages that a rerun fixes, and nothing is promoted before the release.
The fake carries only the two changed methods:
go generatereformats every fake.Does this PR introduce a user-facing change?
``
release-note
``The release SBOM records the digests of the pushed container images, so the package URLs and checksums of its images resolve in the registry.