-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add checksum of on-cluster resources to Provenance.RefSource #6928
Comments
/assign |
SGTM. This was missing previously since on-cluster resources referenced by name instead of by resolver syntax are not resolved by remote cluster resolver (via resolution request). As you mentioned, "they are both effectively doing the same thing.". So adding them for consistency makes sense. So IIUC it would be just returning the checksum here right? (Same for task level) pipeline/pkg/reconciler/pipelinerun/resources/pipelineref.go Lines 91 to 107 in 3b9b351
|
Yes, that's correct. |
I'd sync with @Yongxuanzhang here - this should be very similar, if not identical to the checksum used for trusted resources. |
This is what the |
I think what @chitrangpatel proposed is to record this for the resources ref via local resolver, the link in @chuangw6's comment, it should be a simple replication of cluster resolver. No direct relationship with trusted resources. |
In trusted resources, we are also producing a pipeline/pkg/trustedresources/verify.go Lines 240 to 247 in 0b95e49
I will try to use approach this throughout. |
+1 to yongxuan. It seems like the checksum we computed here has nothing to do with trusted resources b/c trusted resource checks the signature (computed by author) against the checksum it computes internally and see if it matches. Only thing in provenance.refSource that matters to trusted resources is the uri. @wlynch I barely remember in #5687 there is a specific reason why we only do the checksum of the spec part instead of the whole object for in-cluster resources. Do you remember why? Is it for downstream Chains verification in future or something else? |
Following discussion on slack, I've opened a new issue to synchronize the checksum computation between trusted resources and cluster resolver. Issue #6958 See details in there. |
Thanks! I'm not opposed this, as long as it is the correct way for provenance! |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
/remove-lifecycle stale |
Can be closed! Thanks for the ping :) |
Feature request
In the
SLSA v1.0 predicate
, we capture theuri and digest
of remotetasks
andpipelines
. However, if thetask/pipeline
was defined locally and submitted to the cluster then theSLSA
provenance does not have a way to take a note of it in the provenance. In theTekton Chains WG
meeting, we reached an agreement that we should store thechecksum
of the spec of the on-cluster resource in the provenance.Currently, we already produce and store the
sha256 checksum
inProvenance.RefSource
if the referencetask/pipeline
used aCluster
resolver. However, we don't do this if thetask/pipeline
was referenced using just aName
, even though they are both effectively doing the same thing.This feature request attempts to compute the
sha256 checksum
of the on-cluster resources that are referenced byName
and add it toProvenance.RefSource
.Use case
The checksum of the referenced on-cluster
pipeline/task
will be available in the provenance. If the users re-run thepipeline/task
, using the same resources then the checksum should match with what was inserted in the provenance. This will allow verification of resources used for the build.The text was updated successfully, but these errors were encountered: