Repository navigation
fix(chains): allow slsa/v2alpha4 attestation format in validation - #4251
Conversation
Chains already supports slsa/v2alpha4 for TaskRun and PipelineRun attestations, but the TektonChain webhook rejected it. Add the format to the allowlist so operators can configure it without falling back to v2alpha3. Signed-off-by: Jawed khelil <jkhelil@redhat.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4251 +/- ##
=======================================
Coverage 30.25% 30.25%
=======================================
Files 478 478
Lines 23169 23169
=======================================
Hits 7010 7010
Misses 16159 16159
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:
|
| }, | ||
| } | ||
|
|
||
| for _, format := range []string{"in-toto", "slsa/v1", "slsa/v2alpha2", "slsa/v2alpha3", "slsa/v2alpha4"} { |
There was a problem hiding this comment.
IMO this should use the var from pkg/apis/operator/v1alpha1/tektonchain_validation.go. Otherwise if someone removes a value from allowedArtifactsPipelineRunFormat this test will still pass.
| }, | ||
| } | ||
|
|
||
| for _, format := range []string{"in-toto", "slsa/v1", "slsa/v2alpha2", "slsa/v2alpha3", "slsa/v2alpha4"} { |
Iterate allowedArtifactsTaskRunFormat and allowedArtifactsPipelineRunFormat so the tests stay in sync with the webhook allowlists. Signed-off-by: Jawed khelil <jkhelil@redhat.com>
|
/kind bug |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enarha, savitaashture The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
|
/cherry-pick release-v0.81.x |
|
/cherry-pick release-v0.80.x |
|
✅ Cherry-pick to A new pull request has been created to cherry-pick this change to PR: #4259 Please review and merge the cherry-pick PR. |
|
✅ Cherry-pick to A new pull request has been created to cherry-pick this change to PR: #4260 Please review and merge the cherry-pick PR. |
Changes
Allow
slsa/v2alpha4in TektonChain webhook validation forartifacts.taskrun.formatandartifacts.pipelinerun.format.Chains already supports this format (StepAction type-hints /
isBuildArtifact), but the operator rejected it, forcing consumerssuch as Konflux to fall back to
slsa/v2alpha3(see redhat-appstudio/infra-deployments#10570).
Submitter Checklist
make test lintbefore submitting a PRRelease Notes