Skip to content
This repository was archived by the owner on Jan 19, 2026. It is now read-only.

fix(ci): add second cosign signature for compatibility#1314

Merged
flavio merged 1 commit intokubewarden:mainfrom
jvanz:main
Oct 28, 2025
Merged

fix(ci): add second cosign signature for compatibility#1314
flavio merged 1 commit intokubewarden:mainfrom
jvanz:main

Conversation

@jvanz
Copy link
Copy Markdown
Member

@jvanz jvanz commented Oct 27, 2025

Description

In order to allow old cosign version and other verification tools to verify the signature it's necessary to add a second signature using the old format. The default format before cosign v3 changed the default signature bundle.

# Sign blob with cosign v3 signature format for compatibility
cosign sign-blob --yes --new-bundle-format=true --use-signing-config=true \
--bundle policy-server-attestation-${{ matrix.arch }}-provenance.intoto.jsonl.bundle.sigstore \
policy-server-attestation-${{ matrix.arch }}-provenance.intoto.jsonl
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think:

  • We are saving the cosign-v2 signature into a policy-server-attestation-${{ matrix.arch }}-provenance.intoto.jsonl. We maybe should save it to a -provenance.cosign-v2.intoto.jsonl or similar.
  • We are overwriting that file with the cosign-v3 signature.
  • If we indeed have 2 signatures, we should add them as artifacts at the end of release.yml

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point. I've updated all the PR adding this double signature removing the cosign v2 signatures for the blobs signed (attestation files and binaries)

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.76%. Comparing base (142206f) to head (a5e0fb9).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1314   +/-   ##
=======================================
  Coverage   40.76%   40.76%           
=======================================
  Files          16       16           
  Lines        1207     1207           
=======================================
  Hits          492      492           
  Misses        715      715           
Flag Coverage Δ
unit-tests 40.76% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

In order to allow old cosign version and other verification tools to verify the
signature it's necessary to add a second signature using the old format. The
default format before cosign v3 changed the default signature bundle.

Signed-off-by: José Guilherme Vanz <[email protected]>
Copy link
Copy Markdown
Member

@flavio flavio left a comment

Choose a reason for hiding this comment

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

I like this PR. I like the strategy of signing with v2 and v3 format inside of the OCI registry, but sign only with v3 the blobs that are going to be made available as assets of the GitHub Release

@flavio flavio merged commit 62a13ca into kubewarden:main Oct 28, 2025
13 of 14 checks passed
@github-project-automation github-project-automation bot moved this from Pending review to Done in Kubewarden Admission Controller Oct 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

Development

Successfully merging this pull request may close these issues.

3 participants