Skip to content

Commit d87fdc7

Browse files
authored
chore(ci): pin actions in PR-triggered workflows (#3194)
## What changed - Pinned external GitHub Actions to full commit SHAs in PR-triggered workflows: - `.github/workflows/check-md-link.yml` - `.github/workflows/codeql.yml` - `.github/workflows/license_check.yml` - `.github/workflows/python-ci-docs.yml` - `.github/workflows/python-ci.yml` ## Why - Fixes `zizmor` `unpinned-uses` findings by replacing mutable refs with immutable SHAs. - Reduces supply-chain risk from tag/branch drift while preserving workflow behavior. ## Verification - `uvx --from zizmor zizmor --offline .github/workflows/ --fix=all` - Result: `No findings to report.`
1 parent e1f5be3 commit d87fdc7

File tree

5 files changed

+48
-26
lines changed

5 files changed

+48
-26
lines changed

.github/workflows/check-md-link.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,7 @@ jobs:
3939
markdown-link-check:
4040
runs-on: ubuntu-latest
4141
steps:
42-
- uses: actions/checkout@master
42+
- uses: actions/checkout@61b9e3751b92087fd0b06925ba6dd6314e06f089 # master
43+
with:
44+
persist-credentials: false
4345
- uses: tcort/github-action-markdown-link-check@e7c7a18363c842693fadde5d41a3bd3573a7a225

.github/workflows/codeql.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,16 @@ jobs:
4141

4242
steps:
4343
- name: Checkout repository
44-
uses: actions/checkout@v6
44+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
45+
with:
46+
persist-credentials: false
4547

4648
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v4
49+
uses: github/codeql-action/init@d4b3ca9fa7f69d38bfcd667bdc45bc373d16277e # v4
4850
with:
4951
languages: actions
5052

5153
- name: Perform CodeQL Analysis
52-
uses: github/codeql-action/analyze@v4
54+
uses: github/codeql-action/analyze@d4b3ca9fa7f69d38bfcd667bdc45bc373d16277e # v4
5355
with:
5456
category: "/language:actions"

.github/workflows/license_check.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@ jobs:
2727
rat:
2828
runs-on: ubuntu-latest
2929
steps:
30-
- uses: actions/checkout@v6
30+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
31+
with:
32+
persist-credentials: false
3133
- run: dev/check-license

.github/workflows/python-ci-docs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ jobs:
3838
runs-on: ubuntu-slim
3939

4040
steps:
41-
- uses: actions/checkout@v6
42-
- uses: actions/setup-python@v6
41+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
42+
with:
43+
persist-credentials: false
44+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
4345
with:
4446
python-version: 3.12
4547
- name: Install UV

.github/workflows/python-ci.yml

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ jobs:
5555
python: ['3.10', '3.11', '3.12', '3.13']
5656

5757
steps:
58-
- uses: actions/checkout@v6
59-
- uses: actions/setup-python@v6
58+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
59+
with:
60+
persist-credentials: false
61+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
6062
with:
6163
python-version: ${{ matrix.python }}
6264
- name: Install UV
@@ -79,8 +81,10 @@ jobs:
7981
integration-test:
8082
runs-on: ubuntu-latest
8183
steps:
82-
- uses: actions/checkout@v6
83-
- uses: actions/setup-python@v6
84+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
85+
with:
86+
persist-credentials: false
87+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
8488
with:
8589
python-version: '3.12'
8690
- name: Install UV
@@ -97,7 +101,7 @@ jobs:
97101
if: ${{ failure() }}
98102
run: docker compose -f dev/docker-compose-integration.yml logs
99103
- name: Upload coverage data
100-
uses: actions/upload-artifact@v4
104+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
101105
with:
102106
name: coverage-integration
103107
path: .coverage*
@@ -106,8 +110,10 @@ jobs:
106110
integration-test-s3:
107111
runs-on: ubuntu-latest
108112
steps:
109-
- uses: actions/checkout@v6
110-
- uses: actions/setup-python@v6
113+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
114+
with:
115+
persist-credentials: false
116+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
111117
with:
112118
python-version: '3.12'
113119
- name: Install UV
@@ -124,7 +130,7 @@ jobs:
124130
if: ${{ failure() }}
125131
run: docker compose -f dev/docker-compose.yml logs
126132
- name: Upload coverage data
127-
uses: actions/upload-artifact@v4
133+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
128134
with:
129135
name: coverage-s3
130136
path: .coverage*
@@ -133,8 +139,10 @@ jobs:
133139
integration-test-adls:
134140
runs-on: ubuntu-latest
135141
steps:
136-
- uses: actions/checkout@v6
137-
- uses: actions/setup-python@v6
142+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
143+
with:
144+
persist-credentials: false
145+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
138146
with:
139147
python-version: '3.12'
140148
- name: Install UV
@@ -151,7 +159,7 @@ jobs:
151159
if: ${{ failure() }}
152160
run: docker compose -f dev/docker-compose-azurite.yml logs
153161
- name: Upload coverage data
154-
uses: actions/upload-artifact@v4
162+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
155163
with:
156164
name: coverage-adls
157165
path: .coverage*
@@ -160,8 +168,10 @@ jobs:
160168
integration-test-gcs:
161169
runs-on: ubuntu-latest
162170
steps:
163-
- uses: actions/checkout@v6
164-
- uses: actions/setup-python@v6
171+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
172+
with:
173+
persist-credentials: false
174+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
165175
with:
166176
python-version: '3.12'
167177
- name: Install UV
@@ -178,7 +188,7 @@ jobs:
178188
if: ${{ failure() }}
179189
run: docker compose -f dev/docker-compose-gcs-server.yml logs
180190
- name: Upload coverage data
181-
uses: actions/upload-artifact@v4
191+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
182192
with:
183193
name: coverage-gcs
184194
path: .coverage*
@@ -188,8 +198,10 @@ jobs:
188198
runs-on: ubuntu-latest
189199
needs: [integration-test, integration-test-s3, integration-test-adls, integration-test-gcs]
190200
steps:
191-
- uses: actions/checkout@v6
192-
- uses: actions/setup-python@v6
201+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
202+
with:
203+
persist-credentials: false
204+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
193205
with:
194206
python-version: '3.12'
195207
- name: Install UV
@@ -199,7 +211,7 @@ jobs:
199211
- name: Install dependencies
200212
run: uv sync --group dev
201213
- name: Download all coverage artifacts
202-
uses: actions/download-artifact@v8
214+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
203215
with:
204216
pattern: coverage-*
205217
merge-multiple: true
@@ -209,8 +221,10 @@ jobs:
209221
cibw-dev-env-smoke-test:
210222
runs-on: ubuntu-latest
211223
steps:
212-
- uses: actions/checkout@v6
213-
- uses: actions/setup-python@v6
224+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
225+
with:
226+
persist-credentials: false
227+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
214228
with:
215229
python-version: '3.12'
216230
- name: Install UV

0 commit comments

Comments
 (0)