Skip to content

Commit a2a1f4b

Browse files
authored
Merge pull request #570 from mbaldessari/zizmor
Fix zizmor issues and add a zizmor action to check all the GH actions
2 parents 2ec7f33 + ee71c87 commit a2a1f4b

5 files changed

Lines changed: 48 additions & 11 deletions

File tree

.github/workflows/build-push.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
contents: read
3232
steps:
3333
- name: Checkout repository
34-
uses: actions/checkout@v6
34+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
3535
with:
3636
persist-credentials: false
3737

@@ -55,7 +55,7 @@ jobs:
5555
buildah push "${OPERATOR_IMG}-${TARGETARCH}" "docker-archive:/tmp/image-${TARGETARCH}.tar:${OPERATOR_IMG}-${TARGETARCH}"
5656
5757
- name: Upload image artifact
58-
uses: actions/upload-artifact@v7
58+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
5959
with:
6060
name: image-${{ matrix.targetarch }}-${{ github.run_id }}
6161
path: /tmp/image-${{ matrix.targetarch }}.tar
@@ -67,7 +67,7 @@ jobs:
6767
runs-on: ubuntu-latest
6868
steps:
6969
- name: Checkout repository
70-
uses: actions/checkout@v6
70+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
7171
with:
7272
persist-credentials: false
7373

@@ -99,18 +99,18 @@ jobs:
9999

100100
steps:
101101
- name: Checkout repository
102-
uses: actions/checkout@v6
102+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
103103
with:
104104
persist-credentials: false
105105

106106
- name: Download AMD64 image
107-
uses: actions/download-artifact@v8
107+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
108108
with:
109109
name: image-amd64-${{ github.run_id }}
110110
path: /tmp
111111

112112
- name: Download ARM64 image
113-
uses: actions/download-artifact@v8
113+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
114114
with:
115115
name: image-arm64-${{ github.run_id }}
116116
path: /tmp

.github/workflows/console.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@ on:
88
paths:
99
- "console/"
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215

1316
build:
1417
runs-on: ubuntu-latest
1518
steps:
16-
- uses: actions/checkout@v6
19+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
20+
with:
21+
persist-credentials: false
1722
- name: Build the console container
1823
run: |
1924
make console-build

.github/workflows/go.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
build:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v6
19+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2020
with:
2121
persist-credentials: false
2222

2323
- name: Set up Go
24-
uses: actions/setup-go@v6
24+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
2525
with:
2626
go-version-file: go.mod
2727

.github/workflows/lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout code
13-
uses: actions/checkout@v6
13+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
1414
with:
1515
persist-credentials: false
1616

1717
- name: Setup go
18-
uses: actions/setup-go@v6
18+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
1919
with:
2020
go-version-file: go.mod
2121

.github/workflows/zizmor.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Zizmor
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
paths:
7+
- ".github/workflows/**"
8+
pull_request:
9+
branches: ["main"]
10+
paths:
11+
- ".github/workflows/**"
12+
13+
permissions:
14+
contents: read
15+
security-events: write
16+
17+
jobs:
18+
zizmor:
19+
name: Zizmor latest
20+
runs-on: ubuntu-latest
21+
permissions:
22+
security-events: write
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
26+
with:
27+
persist-credentials: false
28+
29+
- name: Run zizmor
30+
uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3
31+
with:
32+
sarif-upload: true

0 commit comments

Comments
 (0)