Skip to content

Commit 49f74d0

Browse files
committed
chore: fix zizmor security findings
- Add persist-credentials: false to all checkout actions - Disable Go cache in release workflow to prevent cache poisoning - Use env var instead of template expansion for docker tag
1 parent 545faf5 commit 49f74d0

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/release.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3131
with:
3232
fetch-depth: 0
33+
persist-credentials: false
3334

3435
# If the event that triggered the build was an annotated tag (which our
3536
# tags are supposed to be), actions/checkout has a bug where the tag in
@@ -49,6 +50,7 @@ jobs:
4950
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
5051
with:
5152
go-version: "~1.22"
53+
cache: false
5254

5355
- name: Build tunneld and Docker images
5456
id: build
@@ -69,10 +71,12 @@ jobs:
6971
7072
- name: Push Docker image
7173
if: ${{ !github.event.inputs.dry_run && !github.event.inputs.snapshot }}
74+
env:
75+
DOCKER_TAG: ${{ steps.build.outputs.docker_tag }}
7276
run: |
7377
set -euxo pipefail
7478
75-
image_tag="${{ steps.build.outputs.docker_tag }}"
79+
image_tag="$DOCKER_TAG"
7680
docker push "$image_tag"
7781
7882
latest_tag="ghcr.io/coder/wgtunnel/tunneld:latest"

.github/workflows/wgtunnel.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
steps:
3232
- name: Checkout
3333
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
34+
with:
35+
persist-credentials: false
3436
- name: Setup Go
3537
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
3638
with:
@@ -43,6 +45,8 @@ jobs:
4345
steps:
4446
- name: Checkout
4547
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
48+
with:
49+
persist-credentials: false
4650
- name: Setup Go
4751
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
4852
with:
@@ -57,6 +61,8 @@ jobs:
5761
steps:
5862
- name: Checkout
5963
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
64+
with:
65+
persist-credentials: false
6066
- name: Setup Go
6167
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
6268
with:

0 commit comments

Comments
 (0)