Skip to content

Conversation

scop
Copy link
Contributor

@scop scop commented Apr 2, 2025

For example in https://github.com/sigstore/cosign/releases/tag/v2.4.3

Check List

@suzuki-shunsuke
Copy link
Member

Thank you!

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adjusts the logic for selecting the asset used for signature verification when using cosign: it now prefers the certificate asset over the public key when a keyless signature is detected.

  • If the signature file ends with "-keyless.sig", the public key asset is cleared.
  • The check now returns nil only when both the public key and certificate assets are absent.
Comments suppressed due to low confidence (1)

pkg/controller/generate-registry/generate.go:315

  • The removal of the loop that assigns certificateAssetName based on asset suffixes might lead to certificateAssetName not being set. Please ensure that certificateAssetName is assigned appropriately elsewhere, or consider reintroducing the assignment logic to handle cases where a certificate asset is available.
if strings.HasSuffix(signatureAssetName, "-keyless.sig") {

```
Error: pkg/controller/generate-registry/generate.go:319:134: directive `//nolint:cyclop` is unused for linter "cyclop" (nolintlint)
```
@suzuki-shunsuke suzuki-shunsuke merged commit 28787f8 into aquaproj:main Apr 2, 2025
19 checks passed
@github-project-automation github-project-automation bot moved this to Done in main Apr 2, 2025
@suzuki-shunsuke
Copy link
Member

@suzuki-shunsuke suzuki-shunsuke added this to the v2.47.0 milestone Apr 3, 2025
@suzuki-shunsuke
Copy link
Member

@scop scop deleted the fix/gr-cosign-keyless-nokey branch April 5, 2025 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants