@@ -304,14 +304,15 @@ jobs:
304304 uses: actions/checkout@v4
305305 with:
306306 persist-credentials: false
307- - name: Setup Rust
308- uses: actions-rust-lang/setup-rust-toolchain@v1
309- - name: Get zizmor
310- run: cargo install zizmor
307+
308+ - name: Install the latest version of uv
309+ uses: astral-sh/setup-uv@v4
310+
311311 - name: Run zizmor 🌈
312- run: zizmor --format sarif . > results.sarif
312+ run: uvx zizmor --format sarif . > results.sarif # (2)!
313313 env:
314314 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # (1)!
315+
315316 - name: Upload SARIF file
316317 uses: github/codeql-action/upload-sarif@v3
317318 with:
@@ -321,9 +322,15 @@ jobs:
321322
3223231. Optional : Remove the `env:` block to only run `zizmor`'s offline audits.
323324
325+ 2. This installs the [zizmor package from PyPI], since it's pre-compiled
326+ and therefore completes much faster. You could instead compile `zizmor`
327+ within CI/CD with `cargo install zizmor`.
328+
324329For more inspiration, see `zizmor`'s own [repository workflow scan], as well
325330as GitHub's example of [running ESLint] as a security workflow.
326331
332+ [zizmor package from PyPI] : https://pypi.org/p/zizmor
333+
327334[SARIF] : https://sarifweb.azurewebsites.net/
328335
329336[GitHub's code scanning functionality] : https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github
0 commit comments