File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 22
22
contents : read
23
23
actions : read
24
24
security-events : write
25
+ env :
26
+ TMPDIR : /tmp/zizmor
25
27
steps :
26
28
-
27
29
name : Checkout
34
36
with :
35
37
script : |
36
38
const fs = require('fs');
39
+ fs.mkdirSync(process.env.TMPDIR, { recursive: true });
40
+
37
41
const workflowsPath = '.github/workflows';
38
42
if (!fs.existsSync(workflowsPath)){
39
43
core.warning("No workflow directory found, skipping zizmor scan.");
@@ -76,15 +80,21 @@ jobs:
76
80
-
77
81
name : Run zizmor
78
82
if : ${{ env.HAS_WORKFLOWS }}
83
+ id : zizmor
79
84
env :
80
85
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
81
86
run : |
82
87
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
84
94
-
85
95
name : Upload SARIF report
86
96
if : ${{ env.HAS_WORKFLOWS }}
87
97
uses : github/codeql-action/upload-sarif@v3 # zizmor: ignore[artipacked] fine to ignore official actions
88
98
with :
89
- sarif_file : /tmp /zizmor.sarif
99
+ sarif_file : ${{ env.TMPDIR }} /zizmor.sarif
90
100
category : zizmor
You can’t perform that action at this time.
0 commit comments