Skip to content

Commit bbf5f5d

Browse files
authored
Merge pull request docker#9 from crazy-max/zizmor-crash-report
zizmor: print zizmor crash report
2 parents 16082d7 + b8c0b89 commit bbf5f5d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Diff for: .github/workflows/octoguard.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
contents: read
2323
actions: read
2424
security-events: write
25+
env:
26+
TMPDIR: /tmp/zizmor
2527
steps:
2628
-
2729
name: Checkout
@@ -34,6 +36,8 @@ jobs:
3436
with:
3537
script: |
3638
const fs = require('fs');
39+
fs.mkdirSync(process.env.TMPDIR, { recursive: true });
40+
3741
const workflowsPath = '.github/workflows';
3842
if (!fs.existsSync(workflowsPath)){
3943
core.warning("No workflow directory found, skipping zizmor scan.");
@@ -76,15 +80,21 @@ jobs:
7680
-
7781
name: Run zizmor
7882
if: ${{ env.HAS_WORKFLOWS }}
83+
id: zizmor
7984
env:
8085
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8186
run: |
8287
set -ex
83-
zizmor --min-severity=medium --min-confidence=medium --persona=pedantic --no-online-audits --format=sarif . > /tmp/zizmor.sarif
88+
zizmor --min-severity=medium --min-confidence=medium --persona=pedantic --no-online-audits --format=sarif . > ${TMPDIR}/zizmor.sarif
89+
-
90+
name: Zizmor crash report
91+
if: ${{ env.HAS_WORKFLOWS && failure() && steps.zizmor.conclusion == 'failure' }}
92+
run: |
93+
cat ${TMPDIR}/report-*.toml
8494
-
8595
name: Upload SARIF report
8696
if: ${{ env.HAS_WORKFLOWS }}
8797
uses: github/codeql-action/upload-sarif@v3 # zizmor: ignore[artipacked] fine to ignore official actions
8898
with:
89-
sarif_file: /tmp/zizmor.sarif
99+
sarif_file: ${{ env.TMPDIR }}/zizmor.sarif
90100
category: zizmor

0 commit comments

Comments
 (0)