@@ -52,15 +52,22 @@ jobs:
5252 provenance : mode=max
5353 tags : |
5454 ghcr.io/${{github.repository_owner}}/kubewarden-controller:${{ env.TAG_NAME }}
55- - name : Sign container image
55+ # We need to disable the new bundle format enabled by default since
56+ # cosign v3.x.x because some verification tools (e.g. slsactl and old
57+ # cosign) are not able to properly verify the signatures using this
58+ # new format
59+ - name : Sign container image with cosign v2 signature format
5660 run : |
57- # We need to disable the new bundle format enabled by default since
58- # cosign v3.x.x because some verification tools (e.g. slsactl and old
59- # cosign) are not able to properly verify the signatures using this
60- # new format
6161 cosign sign --yes --new-bundle-format=false --use-signing-config=false \
6262 ghcr.io/${{github.repository_owner}}/kubewarden-controller@${{ steps.build-image.outputs.digest }}
6363
64+ - name : Sign container image with cosign v3 signature format
65+ run : |
66+ cosign sign --yes --new-bundle-format=true --use-signing-config=true \
67+ ghcr.io/${{github.repository_owner}}/kubewarden-controller@${{ steps.build-image.outputs.digest }}
68+
69+ - name : Verify container image signature
70+ run : |
6471 cosign verify \
6572 --certificate-oidc-issuer=https://token.actions.githubusercontent.com \
6673 --certificate-identity="https://github.com/${{github.repository_owner}}/kubewarden-controller/.github/workflows/release.yml@${{ github.ref }}" \
@@ -141,22 +148,20 @@ jobs:
141148 - name : Sign provenance and SBOM files
142149 run : |
143150 set -e
144- # We need to disable the new bundle format enabled by default since
145- # cosign v3.x.x because some verification tools (e.g. slsactl and old
146- # cosign) are not able to properly verify the signatures using this
147- # new format
148- cosign sign-blob --yes --new-bundle-format=false --use-signing-config=false \
151+ cosign sign-blob --yes \
149152 --bundle kubewarden-controller-attestation-${{ matrix.arch }}-provenance.intoto.jsonl.bundle.sigstore \
150153 kubewarden-controller-attestation-${{ matrix.arch }}-provenance.intoto.jsonl
154+
151155 cosign verify-blob \
152156 --bundle kubewarden-controller-attestation-${{ matrix.arch }}-provenance.intoto.jsonl.bundle.sigstore \
153157 --certificate-oidc-issuer=https://token.actions.githubusercontent.com \
154158 --certificate-identity="https://github.com/${{github.repository_owner}}/kubewarden-controller/.github/workflows/release.yml@${{ github.ref }}" \
155159 kubewarden-controller-attestation-${{ matrix.arch }}-provenance.intoto.jsonl
156160
157- cosign sign-blob --yes --new-bundle-format=false --use-signing-config=false \
161+ cosign sign-blob --yes \
158162 --bundle kubewarden-controller-attestation-${{ matrix.arch }}-sbom.json.bundle.sigstore \
159163 kubewarden-controller-attestation-${{ matrix.arch }}-sbom.json
164+
160165 cosign verify-blob \
161166 --bundle kubewarden-controller-attestation-${{ matrix.arch }}-sbom.json.bundle.sigstore \
162167 --certificate-oidc-issuer=https://token.actions.githubusercontent.com \
0 commit comments