Skip to content

Commit 2c4aa45

Browse files
committed
ci: add zizmor
1 parent 94fcd7d commit 2c4aa45

File tree

6 files changed

+52
-3
lines changed

6 files changed

+52
-3
lines changed

.github/workflows/bump_version.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
try-to-bump:
1515
if: contains(github.event.pull_request.labels.*.name, 'bump-version')
1616
runs-on: ubuntu-latest
17+
permissions: {}
18+
1719
steps:
1820
- name: Checkout code
1921
uses: actions/checkout@v3
@@ -29,7 +31,7 @@ jobs:
2931
# fetch develop branch so that we can diff against later
3032
git fetch origin develop
3133
32-
echo 'checking verion changes in diff...'
34+
echo 'checking version changes in diff...'
3335
3436
# check if version changed in version.go
3537
# note: the grep will fail if use \d instead of [0-9]

.github/workflows/docker-arm64.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
jobs:
1212
build-and-push-arm64-image:
1313
runs-on: ubuntu-latest
14+
permissions: {}
15+
1416
strategy:
1517
matrix:
1618
arch:
@@ -32,6 +34,7 @@ jobs:
3234
uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0
3335
with:
3436
cache-binary: false
37+
3538
- name: Login to Docker Hub
3639
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 #v3.3.0
3740
with:

.github/workflows/docker.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
jobs:
1111
build-and-push:
1212
runs-on: ubuntu-latest
13+
permissions: {}
14+
1315
steps:
1416
- name: Checkout code
1517
uses: actions/checkout@v2

.github/workflows/l2geth_ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: CI
2+
13
on:
24
push:
35
branches: # we keep this to avoid triggering `push` & `pull_request` every time we update a PR
@@ -11,12 +13,12 @@ on:
1113
- reopened
1214
- synchronize
1315
- ready_for_review
14-
name: CI
15-
jobs:
1616

17+
jobs:
1718
build-mock-ccc-geth: # build geth with mock circuit capacity checker
1819
if: github.event.pull_request.draft == false
1920
runs-on: ubuntu-latest
21+
permissions: {}
2022
steps:
2123
- name: Install Go
2224
uses: actions/setup-go@v2
@@ -35,6 +37,7 @@ jobs:
3537
build-geth: # build geth with circuit capacity checker
3638
if: github.event_name == 'push' # will only be triggered when pushing to main & staging & develop & alpha
3739
runs-on: ubuntu-latest
40+
permissions: {}
3841
steps:
3942
- name: Install Go
4043
uses: actions/setup-go@v2
@@ -62,6 +65,7 @@ jobs:
6265
check:
6366
if: github.event.pull_request.draft == false
6467
runs-on: ubuntu-latest
68+
permissions: {}
6569
steps:
6670
- name: Install Go
6771
uses: actions/setup-go@v2
@@ -81,6 +85,7 @@ jobs:
8185
goimports-lint:
8286
if: github.event.pull_request.draft == false
8387
runs-on: ubuntu-latest
88+
permissions: {}
8489
steps:
8590
- name: Install Go
8691
uses: actions/setup-go@v2
@@ -107,6 +112,7 @@ jobs:
107112
go-mod-tidy-lint:
108113
if: github.event.pull_request.draft == false
109114
runs-on: ubuntu-latest
115+
permissions: {}
110116
steps:
111117
- name: Install Go
112118
uses: actions/setup-go@v2
@@ -130,6 +136,7 @@ jobs:
130136
test:
131137
if: github.event.pull_request.draft == false
132138
runs-on: ubuntu-latest
139+
permissions: {}
133140
steps:
134141
- name: Install Go
135142
uses: actions/setup-go@v2

.github/workflows/semgrep.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
semgrep:
1616
name: semgrep/ci
1717
runs-on: ubuntu-20.04
18+
permissions: {}
1819
env:
1920
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
2021
container:

.github/workflows/zizmor.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: zizmor GA Security Analysis
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["**"]
8+
9+
jobs:
10+
zizmor:
11+
name: zizmor
12+
runs-on: ubuntu-latest
13+
permissions:
14+
security-events: write
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
persist-credentials: false
21+
22+
- name: Install the latest version of uv
23+
uses: astral-sh/setup-uv@f94ec6bedd8674c4426838e6b50417d36b6ab231 # v5.3.1
24+
25+
- name: Run zizmor
26+
run: uvx zizmor --format sarif . > results.sarif
27+
env:
28+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Upload SARIF file
31+
uses: github/codeql-action/upload-sarif@v3
32+
with:
33+
sarif_file: results.sarif
34+
category: zizmor

0 commit comments

Comments
 (0)