Skip to content

Commit 75c5559

Browse files
committed
hash-pin actions that interact with docker image
1 parent 8d75e79 commit 75c5559

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

.github/workflows/build-all.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454

5555
- name: Build
5656
id: build_image
57-
uses: redhat-actions/buildah-build@v2
57+
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2.13
5858
with:
5959
context: '.'
6060
containerfiles: |
@@ -93,7 +93,7 @@ jobs:
9393
run: echo "current_version=${CURRENT_VERSION}"
9494

9595
- name: Log in to ghcr.io
96-
uses: redhat-actions/podman-login@v1
96+
uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7
9797
with:
9898
username: ${{ github.actor }}
9999
password: ${{ github.token }}
@@ -107,14 +107,14 @@ jobs:
107107

108108
- name: Publish
109109
id: push
110-
uses: redhat-actions/push-to-registry@v2
110+
uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2.8
111111
with:
112112
image: ${{ steps.build_image.outputs.image }}
113113
tags: ${{ steps.current-version.outputs.value }} ${{ steps.build_image.outputs.tags }}
114114
registry: ${{ env.IMAGE_REGISTRY }}
115115

116116
- name: Generate attestation for images
117-
uses: actions/attest-build-provenance@v2
117+
uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.0
118118
with:
119119
subject-name: ${{ env.IMAGE_REGISTRY }}/${{ steps.build_image.outputs.image }}
120120
subject-digest: ${{ steps.push.outputs.digest }}

.github/workflows/build-image.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050

5151
- name: Build
5252
id: build_image
53-
uses: redhat-actions/buildah-build@v2
53+
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # 2.13
5454
with:
5555
context: '.'
5656
containerfiles: |
@@ -85,7 +85,7 @@ jobs:
8585
echo "Collected version: $version"
8686
8787
- name: Log in to ghcr.io
88-
uses: redhat-actions/podman-login@v1
88+
uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7
8989
with:
9090
username: ${{ github.actor }}
9191
password: ${{ github.token }}
@@ -101,15 +101,15 @@ jobs:
101101

102102
- name: Publish
103103
id: push
104-
uses: redhat-actions/push-to-registry@v2
104+
uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2.8
105105
with:
106106
image: ${{ steps.build_image.outputs.image }}
107107
tags: ${{ steps.current-version.outputs.value }} ${{ steps.build_image.outputs.tags }}
108108
registry: ${{ env.IMAGE_REGISTRY }}
109109
if: inputs.publish-image
110110

111111
- name: Generate attestation for images
112-
uses: actions/attest-build-provenance@v2
112+
uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.0
113113
with:
114114
subject-name: ${{ env.IMAGE_REGISTRY }}/${{ steps.build_image.outputs.image }}
115115
subject-digest: ${{ steps.push.outputs.digest }}

zizmor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ rules:
22
unpinned-uses:
33
config:
44
policies:
5+
actions/attest-build-provenance: hash-pin
56
actions/*: ref-pin
7+
redhat-actions/*: hash-pin
68
"*": ref-pin

0 commit comments

Comments
 (0)