Skip to content

Commit 80ea334

Browse files
committed
Various zizmor warning fixes
1 parent 7aef35b commit 80ea334

2 files changed

Lines changed: 36 additions & 4 deletions

File tree

.github/workflows/test.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ on:
44
push:
55
pull_request:
66

7+
permissions: {}
8+
79
jobs:
810

911
msys2:
1012
runs-on: windows-latest
13+
permissions:
14+
contents: read
1115
strategy:
1216
fail-fast: false
1317
matrix:
@@ -19,6 +23,8 @@ jobs:
1923
steps:
2024
- name: Checkout code
2125
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26+
with:
27+
persist-credentials: false
2228

2329
- name: setup-msys2
2430
uses: msys2/setup-msys2@e9898307ac31d1a803454791be09ab9973336e1c # v2.31.1
@@ -65,12 +71,16 @@ jobs:
6571

6672
ubuntu:
6773
runs-on: ubuntu-latest
74+
permissions:
75+
contents: read
6876
strategy:
6977
fail-fast: false
7078
matrix:
7179
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.14t', 'pypy-3.11']
7280
steps:
7381
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
82+
with:
83+
persist-credentials: false
7484

7585
- name: Set up Python ${{ matrix.python-version }}
7686
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
@@ -123,6 +133,8 @@ jobs:
123133
124134
msvc:
125135
runs-on: ${{ matrix.os }}
136+
permissions:
137+
contents: read
126138
strategy:
127139
fail-fast: false
128140
matrix:
@@ -141,6 +153,8 @@ jobs:
141153
os: 'windows-11-arm'
142154
steps:
143155
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
156+
with:
157+
persist-credentials: false
144158

145159
- name: Set up Python ${{ matrix.python-version }}
146160
id: setup-python
@@ -156,13 +170,17 @@ jobs:
156170
arch : ${{ matrix.architecture }}
157171

158172
- name: Download and extract Cairo Binary
173+
env:
174+
PYCAIRO_ARCH: ${{ matrix.architecture }}
159175
run: |
160-
python .ci/download-cairo-win32.py "${{ matrix.architecture }}"
176+
python .ci/download-cairo-win32.py "$env:PYCAIRO_ARCH"
161177
162178
- name: Install dependencies
179+
env:
180+
PYTHON_PATH: ${{ steps.setup-python.outputs.python-path }}
163181
run: |
164-
pipx install --python "${{ steps.setup-python.outputs.python-path }}" uv
165-
pipx install --python "${{ steps.setup-python.outputs.python-path }}" meson
182+
pipx install --python "$env:PYTHON_PATH" uv
183+
pipx install --python "$env:PYTHON_PATH" meson
166184
uv sync
167185
168186
- name: Build & Test with meson
@@ -195,10 +213,13 @@ jobs:
195213

196214
macos:
197215
runs-on: macos-latest
198-
216+
permissions:
217+
contents: read
199218
steps:
200219
- name: Checkout code
201220
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
221+
with:
222+
persist-credentials: false
202223

203224
- name: Install dependencies
204225
run: |

.github/workflows/wheels.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@ name: Build
22

33
on: [push, pull_request]
44

5+
permissions: {}
6+
57
jobs:
68

79
build_sdist:
810
runs-on: ubuntu-latest
911

12+
permissions:
13+
contents: read
14+
1015
steps:
1116
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
with:
18+
persist-credentials: false
1219

1320
- name: Set up Python
1421
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
@@ -32,6 +39,8 @@ jobs:
3239
build_wheels:
3340
name: Build wheels on ${{ matrix.os }} (${{ matrix.platform_id }})
3441
runs-on: ${{ matrix.os }}
42+
permissions:
43+
contents: read
3544
strategy:
3645
fail-fast: false
3746
matrix:
@@ -48,6 +57,8 @@ jobs:
4857

4958
steps:
5059
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
60+
with:
61+
persist-credentials: false
5162

5263
- name: Setup MSVC
5364
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0

0 commit comments

Comments
 (0)