diff --git a/.github/workflows/image-publish.yml b/.github/workflows/image-publish.yml index a5bc168673..63b3d277ff 100644 --- a/.github/workflows/image-publish.yml +++ b/.github/workflows/image-publish.yml @@ -27,9 +27,7 @@ jobs: steps: - name: Install Cosign - uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0 - with: - cosign-release: 'v2.6.1' + uses: sigstore/cosign-installer@cad07c2e89fa2edd6e2d7bab4c1aa38e53f76003 # v4.1.1 - name: Job information run: | echo "Job information" diff --git a/build/build_and_push.sh b/build/build_and_push.sh index 97dff81bd0..9a40f2b988 100755 --- a/build/build_and_push.sh +++ b/build/build_and_push.sh @@ -52,8 +52,9 @@ else echo "Signing docker image ${TAG} (digest: ${DIGEST})..." cosign sign --yes "${DIGEST}" - echo "Verifying signature of docker image ${TAG} (digest: ${DIGEST})..." - cosign verify "${DIGEST}" --certificate-identity="${CERT_IDENTITY}" --certificate-oidc-issuer="${CERT_ISSUER}" + echo "Verifying signature of docker image ${TAG} (digest: ${DIGEST}) after a 30 seconds wait..." + sleep 30 # the signature may not be returned immediately after being published, so as a mitigation we wait for 30 seconds before verifying + cosign verify --certificate-identity="${CERT_IDENTITY}" --certificate-oidc-issuer="${CERT_ISSUER}" "${DIGEST}" echo "Signed and verified signature of docker image ${TAG} (digest: ${DIGEST})..."