Skip to content

Commit bbdc2c5

Browse files
committed
Oh hello there zizmor.
1 parent 3dbc35c commit bbdc2c5

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

.github/workflows/CI.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
noxenvs: ${{ steps.noxenvs-matrix.outputs.noxenvs }}
2020
steps:
2121
- uses: actions/checkout@v4
22+
with:
23+
persist-credentials: false
2224
- name: Set up nox
2325
uses: wntrblm/[email protected]
2426
- id: noxenvs-matrix
@@ -38,6 +40,8 @@ jobs:
3840

3941
steps:
4042
- uses: actions/checkout@v4
43+
with:
44+
persist-credentials: false
4145
- name: Install dependencies
4246
run: sudo apt-get update && sudo apt-get install -y libenchant-2-dev
4347
if: runner.os == 'Linux' && startsWith(matrix.noxenv, 'docs')
@@ -73,6 +77,8 @@ jobs:
7377
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
7478
steps:
7579
- uses: actions/checkout@v4
80+
with:
81+
persist-credentials: false
7682
- uses: actions/setup-python@v5
7783
with:
7884
python-version: |
@@ -108,6 +114,8 @@ jobs:
108114
- x86_64-unknown-linux-musl
109115
steps:
110116
- uses: actions/checkout@v4
117+
with:
118+
persist-credentials: false
111119
- uses: actions/setup-python@v5
112120
with:
113121
python-version: |
@@ -140,6 +148,8 @@ jobs:
140148
target: [x64, x86] # x86 is not supported by pypy
141149
steps:
142150
- uses: actions/checkout@v4
151+
with:
152+
persist-credentials: false
143153
- uses: actions/setup-python@v5
144154
with:
145155
python-version: |
@@ -172,6 +182,8 @@ jobs:
172182
target: [x86_64, aarch64]
173183
steps:
174184
- uses: actions/checkout@v4
185+
with:
186+
persist-credentials: false
175187
- uses: actions/setup-python@v5
176188
with:
177189
python-version: |
@@ -200,6 +212,8 @@ jobs:
200212
runs-on: ubuntu-latest
201213
steps:
202214
- uses: actions/checkout@v4
215+
with:
216+
persist-credentials: false
203217
- uses: actions/setup-python@v5
204218
with:
205219
python-version: |

.github/workflows/zizmor.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: GitHub Actions Security Analysis with zizmor 🌈
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["**"]
8+
9+
jobs:
10+
zizmor:
11+
runs-on: ubuntu-latest
12+
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+
- name: Setup Rust
22+
uses: actions-rust-lang/setup-rust-toolchain@v1
23+
- name: Install zizmor
24+
run: cargo install zizmor
25+
- name: Run zizmor 🌈
26+
run: 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

.github/zizmor.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
rules:
2+
template-injection:
3+
ignore:
4+
# our matrix is dynamically generated via `nox -l` but with no user input
5+
- CI.yml:69:9

0 commit comments

Comments
 (0)