Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PuneetPunamiya
Copy link
Member

@PuneetPunamiya PuneetPunamiya commented Nov 30, 2023

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

Fixes: #858

Changes

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 30, 2023
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign lcarva after the PR has been reviewed.
You can assign the PR to them by writing /assign @lcarva in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 30, 2023
@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-chains-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/chains/annotations.go 85.0% 83.7% -1.3
pkg/chains/signing.go 73.7% 75.5% 1.7

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>
@PuneetPunamiya PuneetPunamiya changed the title [WIP] Skips the signing of artifacts when valid configuration is not done Skips the signing of artifacts when valid configuration is not done Nov 30, 2023
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 30, 2023
@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-chains-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/chains/annotations.go 85.0% 83.7% -1.3
pkg/chains/signing.go 73.7% 75.5% 1.7

}
all[s] = signer
default:
// This should never happen, so panic
l.Panicf("unsupported signer: %s", s)
}
}
return all
fmt.Println(all)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chains adds chains.tekton.dev/signed=true annotation even if no keys supplied
3 participants