-
Notifications
You must be signed in to change notification settings - Fork 136
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
Skips the signing of artifacts when valid configuration is not done #1003
base: main
Are you sure you want to change the base?
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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The following is the coverage report on the affected files.
|
Before this patch, if proper configurations where not done, chains used to sign the tekton resources with the default configurations which in turn used to create a impression that tekton resources are signed as it used to add the `chains.tekton.dev/signed=true` annotation Hence, with this patch, if proper configuration is not done (like for e.g. private keys are not stored using cosign or x509) then in that case tekton resources will be skipped from signing, indicating the user to do proper configurations to sign the resources Signed-off-by: PuneetPunamiya <ppunamiy@redhat.com>
5827c0d
to
5a44771
Compare
The following is the coverage report on the affected files.
|
} | ||
all[s] = signer | ||
default: | ||
// This should never happen, so panic | ||
l.Panicf("unsupported signer: %s", s) | ||
} | ||
} | ||
return all | ||
fmt.Println(all) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this :)
ctx, _ := rtesting.SetupFakeContext(t) | ||
ps := fakepipelineclient.Get(ctx) | ||
|
||
tro := objects.NewTaskRunObject(&v1beta1.TaskRun{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed with lint. Why are we using v1beta1
here? I think it should be v1
?
@@ -57,7 +57,7 @@ func (tv *TaskRunVerifier) VerifyTaskRun(ctx context.Context, tr *v1beta1.TaskRu | |||
if err != nil { | |||
return err | |||
} | |||
signers := allSigners(ctx, tv.SecretPath, cfg) | |||
signers, _ := allSigners(ctx, tv.SecretPath, cfg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should capture the error.
This comment indicates we do not want to pursue the |
Before this patch, if proper configurations where not done, chains used to sign the tekton resources with the default configurations which in turn used to create a impression that tekton resources are signed as it used to add the
chains.tekton.dev/signed=true
annotationHence, with this patch, if proper configuration is not done (like for e.g. private keys are not stored using cosign or x509) then in that case tekton resources will be skipped from signing, indicating the user to do proper configurations to sign the resources
Fixes: #858
Changes
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
Release Notes