From 8ac1ad815b06df6ddf00aa188ddb7d9ac54c75e8 Mon Sep 17 00:00:00 2001 From: Digvijaysinh Chauhan Date: Tue, 25 Aug 2026 10:52:48 +0530 Subject: [PATCH 1/3] ci: add Zizmor GitHub Actions security scanner --- .github/workflows/zizmor.yml | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/zizmor.yml diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 0000000..8a0954f --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -0,0 +1,50 @@ +# Copyright 2026 DHC Tech +# Use of this source code is governed by an MIT-style license that can be +# found in the LICENSE file. +# +# Zizmor: Static analysis and security auditing engine specifically designed +# for GitHub Actions workflows. Reports findings directly into GitHub +# Security & Quality Code Scanning tab via SARIF. + +name: GitHub Actions Security (Zizmor) + +on: + push: + branches: [ main ] + paths: + - '.github/workflows/**' + pull_request: + branches: [ main ] + paths: + - '.github/workflows/**' + schedule: + - cron: '0 0 * * 0' # Weekly Sunday scan + +permissions: + contents: read + +jobs: + zizmor: + name: zizmor + runs-on: ubuntu-latest + permissions: + contents: read + security-events: write + steps: + - name: Check out repository + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 + with: + persist-credentials: false + + - name: Run zizmor security audit + uses: woodruffw/zizmor-action@a87be7b233a0b8106f3634ea576ca22ebc29ffc1 # v1.4.1 + with: + args: --format sarif . + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload SARIF report to Code Scanning + uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10 + with: + sarif_file: results.sarif + category: zizmor From a127950f5b843065a810ac911ec46e8159805ffa Mon Sep 17 00:00:00 2001 From: Digvijaysinh Chauhan Date: Tue, 25 Aug 2026 10:54:48 +0530 Subject: [PATCH 2/3] ci: use pipx to execute zizmor standalone CLI --- .github/workflows/zizmor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index 8a0954f..6cc47d8 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -37,14 +37,14 @@ jobs: persist-credentials: false - name: Run zizmor security audit - uses: woodruffw/zizmor-action@a87be7b233a0b8106f3634ea576ca22ebc29ffc1 # v1.4.1 - with: - args: --format sarif . + run: | + pipx run zizmor --format sarif . > results.sarif env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload SARIF report to Code Scanning uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10 + if: ${{ !cancelled() }} with: sarif_file: results.sarif category: zizmor From 44fda6a50398bab1076f65813d1e1f8c01a03893 Mon Sep 17 00:00:00 2001 From: Digvijaysinh Chauhan Date: Tue, 25 Aug 2026 10:56:13 +0530 Subject: [PATCH 3/3] ci: upload Zizmor SARIF on findings and guard against fork PR permissions --- .github/workflows/zizmor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index 6cc47d8..d4e3b0e 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -44,7 +44,7 @@ jobs: - name: Upload SARIF report to Code Scanning uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10 - if: ${{ !cancelled() }} + if: ${{ always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) }} with: sarif_file: results.sarif category: zizmor