Skip to content

Commit b906e4e

Browse files
authored
ci: use zizmor and remediate findings (#63)
1 parent 84843d6 commit b906e4e

4 files changed

Lines changed: 42 additions & 6 deletions

File tree

.github/workflows/integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
runs-on: ubuntu-24.04
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v6
20+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2121
with:
2222
persist-credentials: false
2323

2424
- name: Set up Go
25-
uses: actions/setup-go@v6
25+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
2626
with:
2727
go-version-file: 'go.mod'
2828

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-24.04
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v6
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1818
with:
1919
persist-credentials: false
2020

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
runs-on: ubuntu-24.04
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v6
20+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2121
with:
2222
persist-credentials: false
2323

2424
- name: Set up Go
25-
uses: actions/setup-go@v6
25+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
2626
with:
2727
go-version-file: 'go.mod'
2828

@@ -33,7 +33,7 @@ jobs:
3333
run: go test -v ./...
3434

3535
- name: Lint
36-
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9
36+
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
3737
with:
3838
version: v2.4.0
3939

.github/workflows/zizmor.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Lint GitHub Actions
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release-branch-*
8+
pull_request:
9+
branches:
10+
- '**'
11+
workflow_dispatch:
12+
13+
permissions: {}
14+
15+
jobs:
16+
zizmor:
17+
runs-on: ubuntu-24.04
18+
19+
env:
20+
ZIZMOR_IMAGE: ghcr.io/zizmorcore/zizmor:1.25.2@sha256:14ea7f5cc7c67933394a35b5a38a277397818d232602635edb2010b313afb110
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25+
with:
26+
persist-credentials: false
27+
28+
- name: Run zizmor
29+
env:
30+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
run: |
32+
docker run \
33+
--volume "${GITHUB_WORKSPACE}:/src:ro" \
34+
--workdir "/src" \
35+
--env "GH_TOKEN" \
36+
"$ZIZMOR_IMAGE" -- /src

0 commit comments

Comments
 (0)