Skip to content

zizmor: print zizmor crash report #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/octoguard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
contents: read
actions: read
security-events: write
env:
TMPDIR: /tmp/zizmor
steps:
-
name: Checkout
Expand All @@ -34,6 +36,8 @@ jobs:
with:
script: |
const fs = require('fs');
fs.mkdirSync(process.env.TMPDIR, { recursive: true });

const workflowsPath = '.github/workflows';
if (!fs.existsSync(workflowsPath)){
core.warning("No workflow directory found, skipping zizmor scan.");
Expand Down Expand Up @@ -76,15 +80,21 @@ jobs:
-
name: Run zizmor
if: ${{ env.HAS_WORKFLOWS }}
id: zizmor
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -ex
zizmor --min-severity=medium --min-confidence=medium --persona=pedantic --no-online-audits --format=sarif . > /tmp/zizmor.sarif
zizmor --min-severity=medium --min-confidence=medium --persona=pedantic --no-online-audits --format=sarif . > ${TMPDIR}/zizmor.sarif
-
name: Zizmor crash report
if: ${{ env.HAS_WORKFLOWS && failure() && steps.zizmor.conclusion == 'failure' }}
run: |
cat ${TMPDIR}/report-*.toml
-
name: Upload SARIF report
if: ${{ env.HAS_WORKFLOWS }}
uses: github/codeql-action/upload-sarif@v3 # zizmor: ignore[artipacked] fine to ignore official actions
with:
sarif_file: /tmp/zizmor.sarif
sarif_file: ${{ env.TMPDIR }}/zizmor.sarif
category: zizmor