Skip to content

Commit 8253353

Browse files
committed
Add zizmor to CI and fix findings
1 parent ae83e69 commit 8253353

File tree

6 files changed

+30
-5
lines changed

6 files changed

+30
-5
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ updates:
1010
actions:
1111
patterns:
1212
- "*"
13+
cooldown:
14+
default-days: 14

.github/workflows/lint.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ name: Lint
22

33
on: [push, pull_request, workflow_dispatch]
44

5+
permissions: {}
6+
57
env:
68
FORCE_COLOR: 1
79

8-
permissions:
9-
contents: read
10-
1110
jobs:
1211
lint:
1312
runs-on: ubuntu-latest
1413

1514
steps:
1615
- uses: actions/checkout@v5
16+
with:
17+
persist-credentials: false
1718
- uses: actions/setup-python@v6
1819
with:
1920
python-version: "3.x"

.github/workflows/pypi-package.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ on:
88
- published
99
workflow_dispatch:
1010

11-
permissions:
12-
contents: read
11+
permissions: {}
1312

1413
env:
1514
FORCE_COLOR: 1
@@ -22,6 +21,8 @@ jobs:
2221

2322
steps:
2423
- uses: actions/checkout@v5
24+
with:
25+
persist-credentials: false
2526
- uses: actions/setup-python@v6
2627

2728
- name: Compile translations

.github/workflows/tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Tests
22

33
on: [push, pull_request, workflow_dispatch]
44

5+
permissions: {}
6+
57
env:
68
FORCE_COLOR: 1
79

@@ -15,6 +17,8 @@ jobs:
1517
branch: ["3.14", "3.13", "3.12"]
1618
steps:
1719
- uses: actions/checkout@v5
20+
with:
21+
persist-credentials: false
1822
- uses: actions/setup-python@v6
1923
with:
2024
python-version: ${{ matrix.branch }}
@@ -60,6 +64,8 @@ jobs:
6064
python-version: ["3.12", "3"]
6165
steps:
6266
- uses: actions/checkout@v5
67+
with:
68+
persist-credentials: false
6369
- uses: actions/setup-python@v6
6470
with:
6571
python-version: ${{ matrix.python-version }}

.github/zizmor.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Configuration for the zizmor static analysis tool, run via pre-commit in CI
2+
# https://woodruffw.github.io/zizmor/configuration/
3+
rules:
4+
dangerous-triggers:
5+
ignore:
6+
- documentation-links.yml
7+
unpinned-uses:
8+
config:
9+
policies:
10+
"*": ref-pin

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ repos:
3232
hooks:
3333
- id: actionlint
3434

35+
- repo: https://github.com/woodruffw/zizmor-pre-commit
36+
rev: v1.17.0
37+
hooks:
38+
- id: zizmor
39+
3540
- repo: https://github.com/tox-dev/pyproject-fmt
3641
rev: v2.5.0
3742
hooks:

0 commit comments

Comments
 (0)