From 207fdaf8039f73958306374d2c3d0d534298baf2 Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Wed, 19 Mar 2025 12:10:55 +0000 Subject: [PATCH] Add CI workflow to run Zizmor to check for GitHub Actions security issues --- .github/workflows/zizmor.yaml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/zizmor.yaml diff --git a/.github/workflows/zizmor.yaml b/.github/workflows/zizmor.yaml new file mode 100644 index 0000000000..500152b962 --- /dev/null +++ b/.github/workflows/zizmor.yaml @@ -0,0 +1,43 @@ +name: GitHub Actions security check (zizmor) + +on: + push: + branches: ["main"] + paths: + - .github/workflows/** + pull_request: + branches: ["**"] + paths: + - .github/workflows/** + +jobs: + zizmor: + name: zizmor latest via PyPI + runs-on: ubuntu-latest + permissions: + security-events: write + contents: read # only needed for private repos + actions: read # only needed for private repos + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v5 + + - 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