| 1 |
# Performs static analysis in GitHub actions with https://github.com/woodruffw/zizmor |
| 2 |
name: Zizmor |
| 3 |
|
| 4 |
concurrency: |
| 5 |
group: zizmor-${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} |
| 6 |
cancel-in-progress: true |
| 7 |
|
| 8 |
on: |
| 9 |
push: |
| 10 |
branches: |
| 11 |
- main |
| 12 |
pull_request: |
| 13 |
branches: |
| 14 |
- "*" |
| 15 |
|
| 16 |
permissions: |
| 17 |
contents: read |
| 18 |
|
| 19 |
jobs: |
| 20 |
zizmor: |
| 21 |
name: "Run Zizmor" |
| 22 |
runs-on: ubuntu-latest |
| 23 |
permissions: |
| 24 |
security-events: write |
| 25 |
steps: |
| 26 |
- name: "Checkout repository 🛎" |
| 27 |
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
| 28 |
with: |
| 29 |
persist-credentials: false |
| 30 |
|
| 31 |
- name: "Install uv 📦" |
| 32 |
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b |
| 33 |
with: |
| 34 |
version: "latest" |
| 35 |
|
| 36 |
- name: "Run zizmor 🕵️♂️" |
| 37 |
run: uvx zizmor --format sarif . > results.sarif |
| 38 |
|
| 39 |
- name: "Upload SARIF file 📤" |
| 40 |
uses: github/codeql-action/upload-sarif@v4 |
| 41 |
with: |
| 42 |
# Path to SARIF file relative to the root of the repository |
| 43 |
sarif_file: results.sarif |
| 44 |
# Optional category for the results |
| 45 |
# Used to differentiate multiple results for one commit |
| 46 |
category: zizmor |