Skip to content

Commit 67ed305

Browse files
committed
Add zizmor checks
The actions are nothing complicated so there should be limited to no risk, but better safe than sorry, and zizmor seems to run really fast so probably not any sort of bottleneck.
1 parent 2aacc8d commit 67ed305

File tree

5 files changed

+43
-0
lines changed

5 files changed

+43
-0
lines changed

.github/workflows/py-checks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
steps:
1414
- name: Checkout working copy
1515
uses: actions/checkout@v4
16+
with:
17+
persist-credentials: false
1618
- name: ruff check
1719
uses: chartboost/ruff-action@v1
1820
with:

.github/workflows/py-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919

2020
steps:
2121
- uses: actions/checkout@v4
22+
with:
23+
persist-credentials: false
2224
- uses: actions/setup-python@v5
2325
with:
2426
python-version: ${{ matrix.python-version }}
@@ -79,6 +81,7 @@ jobs:
7981
- uses: actions/checkout@v4
8082
with:
8183
submodules: true
84+
persist-credentials: false
8285
- uses: actions/setup-python@v5
8386
with:
8487
python-version: ${{ matrix.python-version }}

.github/workflows/pyo3-wheels.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ jobs:
5757

5858
steps:
5959
- uses: actions/checkout@v4
60+
with:
61+
persist-credentials: false
6062
- uses: actions/setup-python@v5
6163
with:
6264
python-version: ${{ matrix.python-version }}
@@ -79,6 +81,8 @@ jobs:
7981
runs-on: ubuntu-latest
8082
steps:
8183
- uses: actions/checkout@v4
84+
with:
85+
persist-credentials: false
8286
- name: Build sdist
8387
uses: PyO3/maturin-action@v1
8488
with:
@@ -140,6 +144,7 @@ jobs:
140144
uses: actions/checkout@v4
141145
with:
142146
submodules: true
147+
persist-credentials: false
143148
- name: Set up Python ${{ matrix.python-version }}
144149
uses: actions/setup-python@v5
145150
with:

.github/workflows/rust.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v4
16+
with:
17+
persist-credentials: false
1618
- run: cargo fmt --check
1719
- if: always()
1820
run: cargo clippy
@@ -24,6 +26,7 @@ jobs:
2426
- uses: actions/checkout@v4
2527
with:
2628
submodules: true
29+
persist-credentials: false
2730
- run: cargo check
2831
- run: cargo test -r --verbose
2932

@@ -35,5 +38,6 @@ jobs:
3538
- uses: actions/checkout@v4
3639
with:
3740
submodules: true
41+
persist-credentials: false
3842
- run: cargo update --verbose
3943
- run: cargo test -r --verbose

.github/workflows/zizmor.yml

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

0 commit comments

Comments
 (0)