File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 2222 contents : read
2323 actions : read
2424 security-events : write
25+ env :
26+ TMPDIR : /tmp/zizmor
2527 steps :
2628 -
2729 name : Checkout
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
You can’t perform that action at this time.
0 commit comments