fix(release): resolve in-toto attestation UUID in wait-for-chains - #378
Open
infernus01 wants to merge 1 commit into
Open
fix(release): resolve in-toto attestation UUID in wait-for-chains#378infernus01 wants to merge 1 commit into
infernus01 wants to merge 1 commit into
Conversation
The wait-for-chains task extracts the Rekor UUID from the chains.tekton.dev/transparency annotation, which points at the per-image signature entry (kind hashedrekord). This entry has an empty Attestation field, so the verification commands in the release notes silently produce no output. Search the Rekor index by image digest instead and select the entry whose body kind is intoto — the SLSA attestation that lists published images as subjects. Fall back to the transparency annotation if the attestation entry cannot be found. Ported from tektoncd/pipeline#10363. Signed-off-by: Shubham Bhardwaj <shubbhar@redhat.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #378 +/- ##
=======================================
Coverage 50.28% 50.28%
=======================================
Files 19 19
Lines 2118 2118
=======================================
Hits 1065 1065
Misses 921 921
Partials 132 132
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Summary
wait-for-chainsinline task to resolve the correct RekorUUID (in-toto attestation) instead of the per-image signature
(hashedrekord) entry
Problem
The
chains.tekton.dev/transparencyannotation on the publish-imagesTaskRun points at a
hashedrekordRekor entry. This entry contains abare signature with no
.Attestationpayload, so the release notesverification commands (
rekor-cli get --uuid ... | jq -r .Attestation)return empty. Verified broken on: chains v0.28.1, chains v0.29.0,
pruner v0.4.0, pruner v0.4.1.
Fix
Instead of trusting the transparency annotation, the task now:
IMAGESresult from the publish-images TaskRunimage digest
intotoSubmitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes
/kind bug