Skip to content

Commit

Permalink
fix: update the verification steps to add indentity regexp and issuer
Browse files Browse the repository at this point in the history
Adds a regular expression so a consumer can verify that image was published
from the expected repository.

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
  • Loading branch information
jpower432 committed Nov 21, 2023
1 parent 0e742dd commit c8bc89a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ jobs:

- name: Verify image
run: |
cosign verify "$IMAGE@$DIGEST"
cosign verify "$IMAGE@$DIGEST" --certificate-identity-regexp="$SUBJECT" \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com
env:
SUBJECT: https://github\.com/${{ vars.QUAY_ORG }}/trestle-bot/\.github/.+
IMAGE: ${{ env.IMAGE_REGISTRY }}/${{ vars.QUAY_ORG }}/${{ env.IMAGE_NAME }}
DIGEST: ${{ steps.build-and-push.outputs.digest }}

0 comments on commit c8bc89a

Please sign in to comment.