Skip to content

Commit 1359948

Browse files
committed
zizmor workflow
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent cf2bccf commit 1359948

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/.zizmor.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: .zizmor
2+
3+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
4+
permissions:
5+
contents: read
6+
7+
on:
8+
workflow_dispatch:
9+
push:
10+
branches:
11+
- 'main'
12+
- 'releases/v*'
13+
pull_request:
14+
15+
env:
16+
ZIZMOR_VERSION: 1.22.0 # https://github.com/zizmorcore/zizmor
17+
18+
jobs:
19+
zizmor:
20+
runs-on: ubuntu-24.04
21+
permissions:
22+
contents: read
23+
security-events: write
24+
env:
25+
TMPDIR: /tmp/zizmor
26+
steps:
27+
-
28+
name: Checkout
29+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30+
with:
31+
persist-credentials: false
32+
-
33+
name: Setup uv
34+
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
35+
with:
36+
enable-cache: false
37+
-
38+
name: Install zizmor
39+
run: |
40+
set -ex
41+
uv tool install zizmor@${ZIZMOR_VERSION}
42+
-
43+
name: Run zizmor
44+
id: zizmor
45+
run: |
46+
mkdir -p ${TMPDIR}
47+
set -ex
48+
zizmor --min-severity=medium --min-confidence=medium --persona=pedantic --no-online-audits --format=sarif . > ${TMPDIR}/zizmor.sarif
49+
env:
50+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
-
52+
name: Zizmor crash report
53+
if: ${{ failure() && steps.zizmor.conclusion == 'failure' }}
54+
run: |
55+
cat ${TMPDIR}/report-*.toml
56+
-
57+
name: Zizmor SARIF report
58+
run: |
59+
jq . ${TMPDIR}/zizmor.sarif
60+
-
61+
name: Upload SARIF report
62+
uses: github/codeql-action/upload-sarif@6bc82e05fd0ea64601dd4b465378bbcf57de0314 # v4.32.1
63+
with:
64+
sarif_file: ${{ env.TMPDIR }}/zizmor.sarif
65+
category: zizmor

0 commit comments

Comments
 (0)