Skip to content

Commit 54f9a89

Browse files
authored
ci: tighten up permissions a bit (#983)
Some suggestions from [Zizmor](https://woodruffw.github.io/zizmor/). Signed-off-by: Henry Schreiner <[email protected]>
1 parent b953de9 commit 54f9a89

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/workflows/cd.yml

+3
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ on:
99
env:
1010
FORCE_COLOR: 3
1111

12+
permissions: {}
13+
1214
jobs:
1315
dist:
1416
runs-on: ubuntu-latest
1517
steps:
1618
- uses: actions/checkout@v4
1719
with:
1820
fetch-depth: 0
21+
persist-credentials: false
1922

2023
- uses: hynek/build-and-inspect-python-package@v2
2124

.github/workflows/ci.yml

+13
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ concurrency:
1515
env:
1616
FORCE_COLOR: 3
1717

18+
permissions: {}
19+
1820
jobs:
1921
lint:
2022
name: Format
@@ -24,6 +26,7 @@ jobs:
2426
- uses: actions/checkout@v4
2527
with:
2628
fetch-depth: 0
29+
persist-credentials: false
2730
- uses: actions/setup-python@v5
2831
with:
2932
python-version: "3.12"
@@ -106,6 +109,8 @@ jobs:
106109

107110
steps:
108111
- uses: actions/checkout@v4
112+
with:
113+
persist-credentials: false
109114

110115
- uses: actions/setup-python@v5
111116
with:
@@ -172,6 +177,8 @@ jobs:
172177

173178
steps:
174179
- uses: actions/checkout@v4
180+
with:
181+
persist-credentials: false
175182

176183
- uses: actions/setup-python@v5
177184
with:
@@ -216,6 +223,7 @@ jobs:
216223
- uses: actions/checkout@v4
217224
with:
218225
fetch-depth: 0
226+
persist-credentials: false
219227

220228
- name: Prepare venv
221229
run: python3.13t -m venv /venv
@@ -235,6 +243,7 @@ jobs:
235243
- uses: actions/checkout@v4
236244
with:
237245
fetch-depth: 0
246+
persist-credentials: false
238247

239248
- uses: cygwin/cygwin-install-action@v5
240249
with:
@@ -273,6 +282,7 @@ jobs:
273282
- uses: actions/checkout@v4
274283
with:
275284
fetch-depth: 0
285+
persist-credentials: false
276286

277287
- name: Install
278288
run: python -m pip install .[test]
@@ -305,6 +315,7 @@ jobs:
305315
- uses: actions/checkout@v4
306316
with:
307317
fetch-depth: 0
318+
persist-credentials: false
308319

309320
- name: Install
310321
run: python -m pip install .[test]
@@ -324,6 +335,7 @@ jobs:
324335
- uses: actions/checkout@v4
325336
with:
326337
fetch-depth: 0
338+
persist-credentials: false
327339

328340
- uses: hynek/build-and-inspect-python-package@v2
329341

@@ -340,6 +352,7 @@ jobs:
340352
- uses: actions/checkout@v4
341353
with:
342354
fetch-depth: 0
355+
persist-credentials: false
343356

344357
- uses: astral-sh/setup-uv@v5
345358

0 commit comments

Comments
 (0)