Skip to content

Commit 23780ed

Browse files
authored
Add zizmor to pre-commit and fix findings (#1812)
1 parent 3d4d64a commit 23780ed

4 files changed

Lines changed: 29 additions & 9 deletions

File tree

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ updates:
1010
actions:
1111
patterns:
1212
- "*"
13+
cooldown:
14+
# https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns
15+
# Cooldowns protect against supply chain attacks by avoiding the
16+
# highest-risk window immediately after new releases.
17+
default-days: 14
1318

1419
- package-ecosystem: pip
1520
directory: "/"
@@ -21,3 +26,5 @@ updates:
2126
pip:
2227
patterns:
2328
- "*"
29+
cooldown:
30+
default-days: 14

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ jobs:
1414
timeout-minutes: 10
1515

1616
steps:
17-
- uses: actions/checkout@v6
18-
- uses: actions/setup-python@v6
17+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
with:
19+
persist-credentials: false
20+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
1921
with:
2022
python-version: "3"
2123
- name: Install uv
22-
uses: hynek/setup-cached-uv@v2
24+
uses: hynek/setup-cached-uv@4300ec2180bc77d705e626a34e381b81a4772c51 # v2.5.0
2325
- name: Build docs
2426
run: make html
2527
- name: Link check

.github/workflows/lint.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,20 @@ on: [push, pull_request, workflow_dispatch]
44

55
permissions: {}
66

7+
env:
8+
FORCE_COLOR: 1
9+
RUFF_OUTPUT_FORMAT: github
10+
711
jobs:
812
lint:
913
runs-on: ubuntu-latest
1014
timeout-minutes: 10
1115

1216
steps:
13-
- uses: actions/checkout@v6
14-
- uses: actions/setup-python@v6
17+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
with:
19+
persist-credentials: false
20+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
1521
with:
1622
python-version: "3.x"
17-
- uses: pre-commit/action@v3.0.1
23+
- uses: j178/prek-action@cbc2f23eb5539cf20d82d1aabd0d0ecbcc56f4e3 # v2.0.2

.pre-commit-config.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.5.7
3+
rev: v0.15.14
44
hooks:
55
- id: ruff
66
name: Run Ruff (lint)
@@ -9,7 +9,7 @@ repos:
99
name: Run Ruff (format)
1010

1111
- repo: https://github.com/pre-commit/pre-commit-hooks
12-
rev: v4.5.0
12+
rev: v6.0.0
1313
hooks:
1414
- id: check-case-conflict
1515
- id: check-merge-conflict
@@ -18,8 +18,13 @@ repos:
1818
- id: end-of-file-fixer
1919
- id: trailing-whitespace
2020

21+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
22+
rev: v1.25.2
23+
hooks:
24+
- id: zizmor
25+
2126
- repo: https://github.com/sphinx-contrib/sphinx-lint
22-
rev: v0.9.1
27+
rev: v1.0.2
2328
hooks:
2429
- id: sphinx-lint
2530
args: [--enable=default-role]

0 commit comments

Comments
 (0)