Skip to content

Commit

Permalink
Add zizmor checks
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
masklinn committed Dec 22, 2024
1 parent 2aacc8d commit 67ed305
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/py-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
steps:
- name: Checkout working copy
uses: actions/checkout@v4
with:
persist-credentials: false
- name: ruff check
uses: chartboost/ruff-action@v1
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/py-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -79,6 +81,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pyo3-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -79,6 +81,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
Expand Down Expand Up @@ -140,6 +144,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- run: cargo fmt --check
- if: always()
run: cargo clippy
Expand All @@ -24,6 +26,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false
- run: cargo check
- run: cargo test -r --verbose

Expand All @@ -35,5 +38,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false
- run: cargo update --verbose
- run: cargo test -r --verbose
29 changes: 29 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Zizmor

on:
push:
pull_request:

jobs:
zizmor:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v4
- name: Run zizmor
run: uvx zizmor --format sarif . > results.sarif
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
category: zizmor

0 comments on commit 67ed305

Please sign in to comment.