ci(zizmor): continue-on-error on findings (informational mode) #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # zizmor — static analysis for GitHub Actions workflows | |
| # Docs: https://docs.zizmor.sh + https://github.com/zizmorcore/zizmor-action | |
| name: Workflow Security Audit (zizmor) | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - ".github/workflows/**" | |
| - ".github/dependabot.yml" | |
| pull_request: | |
| paths: | |
| - ".github/workflows/**" | |
| - ".github/dependabot.yml" | |
| schedule: | |
| - cron: "13 6 * * 1" # Mondays 06:13 UTC | |
| permissions: {} | |
| jobs: | |
| zizmor: | |
| name: zizmor workflow audit | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| security-events: write # upload SARIF to Code Scanning (no-op on private repos without GHAS) | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: false | |
| - name: Run zizmor | |
| # zizmor exits non-zero when it finds issues. Run as informational | |
| # (continue-on-error) so the job surfaces findings via SARIF/log | |
| # without blocking unrelated CI. Fix findings to clear the warning. | |
| continue-on-error: true | |
| uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6 | |
| with: | |
| persona: regular | |
| - name: Upload SARIF | |
| # Only run if zizmor actually produced a SARIF, and tolerate the | |
| # upload failing on private repos without GitHub Advanced Security. | |
| if: ${{ !cancelled() && hashFiles('zizmor.sarif') != '' }} | |
| continue-on-error: true | |
| uses: github/codeql-action/upload-sarif@f411752efdf656cb71aa17b755b22c890960da1d # v3.35.5 | |
| with: | |
| sarif_file: zizmor.sarif | |
| category: zizmor |