Skip to content

Commit dadff40

Browse files
committed
add zizmor justfile and security dependency group
- .just/zizmor.justfile: run/fix/sarif/version recipes for zizmor, matching the pedantic persona used by .github/workflows/zizmor.yaml - pyproject.toml: add active "security" dependency group (zizmor) and include it (plus "packaging") in the dev group - uv.lock: regenerated, dropping stale bandit/safety lock entries left over from their earlier removal and adding zizmor
1 parent 1227d87 commit dadff40

4 files changed

Lines changed: 98 additions & 1372 deletions

File tree

.just/zizmor.justfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# zizmor - lints Github Actions workflows for security issues, see ../justfile
2+
# docs: https://docs.zizmor.sh/
3+
4+
5+
# show which zizmor is used
6+
[group: 'zizmor']
7+
zizmor-which:
8+
@ echo -e "Using uv run zizmor"
9+
10+
11+
# run zizmor on the github workflows (pedantic persona, same as CI)
12+
[group: 'zizmor']
13+
zizmor *args:
14+
uv run zizmor --persona pedantic .github/workflows {{args}}
15+
16+
alias zizmor-check := zizmor
17+
18+
19+
# run zizmor and apply safe auto-fixes
20+
[group: 'zizmor']
21+
zizmor-fix *args:
22+
uv run zizmor --persona pedantic --fix=safe .github/workflows {{args}}
23+
24+
25+
# run zizmor with sarif output
26+
[group: 'zizmor']
27+
zizmor-sarif:
28+
@ mkdir -p var/zizmor
29+
@ echo -e "Zizmor SARIF report generated in var/zizmor/results.sarif.json"
30+
uv run zizmor --persona pedantic --format sarif .github/workflows > var/zizmor/results.sarif.json
31+
32+
33+
# display zizmor version
34+
[group: 'zizmor']
35+
zizmor-version:
36+
uv run zizmor --version

justfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import? '.just/sshx.justfile'
5757
import? '.just/ty.justfile'
5858
import? '.just/ubuntu.justfile'
5959
import? '.just/uv.justfile'
60+
import? '.just/zizmor.justfile'
6061

6162

6263
# Display all configure tasks (default recipe)

pyproject.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ dependencies = [
5555
dev = [
5656
{ include-group = "ipython" },
5757
{ include-group = "linting" },
58+
{ include-group = "packaging" },
5859
{ include-group = "pre-commit" },
60+
{ include-group = "security" },
5961
{ include-group = "testing" },
6062
{ include-group = "typing" },
6163
"toml-cli >=0.7.0",
@@ -89,10 +91,11 @@ pre-commit = [
8991
"pre-commit-hooks>=5.0",
9092
"prek>=0.2",
9193
]
92-
# security = [
93-
# "bandit[toml]>=1.7",
94-
# "safety>=2.3",
95-
# ]
94+
security = [
95+
# "bandit[toml]>=1.7",
96+
# "safety>=2.3",
97+
"zizmor>=1.0",
98+
]
9699
testing = [
97100
"pytest>=8.3",
98101
"pytest-clarity>=1.0",

0 commit comments

Comments
 (0)