Skip to content

Commit c923bf5

Browse files
samuelho-devclaude
andcommitted
fix(cosign): use reusable workflow identity for signature verification
When using reusable workflows with Cosign keyless signing, the certificate identity reflects the workflow file location (git-flow repo) not the calling repository. Updated the verification regexp to match the git-flow workflow identity. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5b64dc7 commit c923bf5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/docker-build-push.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,10 @@ jobs:
229229
env:
230230
COSIGN_EXPERIMENTAL: 1
231231
run: |
232+
# For reusable workflows, the signature identity is the workflow file path
233+
# not the calling repository, so we use a pattern matching either
232234
cosign verify \
233-
--certificate-identity-regexp="${{ github.server_url }}/${{ github.repository }}.*" \
235+
--certificate-identity-regexp="https://github.com/samuelho-dev/git-flow/.github/workflows/.*" \
234236
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
235237
${{ inputs.registry }}/${{ github.repository_owner }}/${{ inputs.image }}@${{ steps.build.outputs.digest }}
236238

0 commit comments

Comments
 (0)