← Back to Pull requests

Record the pushed image digests in the release SBOM #4623

Closed
unknown closed this pull request without merging on Nov 25, 2026 14:44 UTC
View on GitHub
unknown unknown commented on Nov 11, 2026 10:45 UTC
Author

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 push compresses the layers again. For v1.38.0-beta.0, the SBOM names kube-apiserver-amd64 as sha256:738b17b8…, while registry.k8s.io serves sha256: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_ids of 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.json of 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 generate reformats 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.
``

Diff: 252 lines (+189 / -63) across 3 files Reviewer: xmudrii Review duration: 20399m
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
0.39
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 39% (MEDIUM) · Higher = larger blast radius
39%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.4% · Safe to merge
15.4%