Skip to content

Commit 22da1cd

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

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/.zizmor.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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+
set -ex
47+
zizmor --min-severity=medium --min-confidence=medium --persona=pedantic --no-online-audits --format=sarif . > ${TMPDIR}/zizmor.sarif
48+
env:
49+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
-
51+
name: Zizmor crash report
52+
if: ${{ failure() && steps.zizmor.conclusion == 'failure' }}
53+
run: |
54+
cat ${TMPDIR}/report-*.toml
55+
-
56+
name: Upload SARIF report
57+
uses: github/codeql-action/upload-sarif@6bc82e05fd0ea64601dd4b465378bbcf57de0314 # v4.32.1
58+
with:
59+
sarif_file: ${{ env.TMPDIR }}/zizmor.sarif
60+
category: zizmor

0 commit comments

Comments
 (0)