(feat)Support native Tekton Artifacts API in SLSA provenance - #1841
(feat)Support native Tekton Artifacts API in SLSA provenance#1841ngelman1 wants to merge 1 commit into
Conversation
|
[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 #1841 +/- ##
==========================================
+ Coverage 61.98% 62.69% +0.70%
==========================================
Files 64 64
Lines 4067 4168 +101
==========================================
+ Hits 2521 2613 +92
- Misses 1265 1270 +5
- Partials 281 285 +4
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:
|
af6459f to
60566c4
Compare
Wire the native Tekton Artifacts API (TEP-0147) into Chains' SLSA provenance generation so that structured artifact declarations from TaskRun status are included in the attestation alongside the existing type-hinted results. - Add GetArtifacts/GetStepArtifacts to TektonObject interface - Extract OCI images from native artifact outputs for signing - Map artifact inputs to resolvedDependencies - Map buildOutput=true outputs to SLSA subjects - Map buildOutput=false outputs to SLSA byproducts - Add unit tests for all new functions - Add e2e test for native artifacts provenance
60566c4 to
eca4358
Compare
Changes
Today, Chains generates SLSA provenance for TaskRuns by extracting input and output artifacts from type-hinted results -specially named results like *IMAGE_URL, *IMAGE_DIGEST, CHAINS-GIT_COMMIT, and *ARTIFACT_OUTPUTS. If a result name doesn't match the expected pattern, Chains silently ignores it.
This PR is wiring the Tekton native artifact API (TEP-0147) into Chains' SLSA provenance generation.
This allows steps to explicitly declare their inputs and outputs by writing a JSON file to $(step.artifacts.path). The Pipelines controller then populates
status.artifactsandstatus.steps[].inputs/outputson the TaskRun with structured data including URIs, digests, and a buildOutput flag.Artifact mapping
buildOutputinputs[].valuesresolvedDependenciesoutputs[].valuestruesubjectoutputs[].valuesfalsebyproductsThis does not replace type-hinting, but adds the ability of chains to fetch inputs and outputs, without forcing the user to exactly match naming convetions.
**Tested on a kind cluster
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
Release Notes