Skip to content

Commit 4023647

Browse files
committed
ci: SHA-pin all remaining workflow actions
Fix benchmark.yml, brand-assets.yml, ci.yml, release.yml, security.yml: - Pin all actions to full commit SHAs - Add missing toolchain: stable inputs - Required for repository ruleset compliance
1 parent 95fab52 commit 4023647

File tree

5 files changed

+75
-35
lines changed

5 files changed

+75
-35
lines changed

.github/workflows/benchmark.yml

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,17 @@ jobs:
2727
contains(github.event.pull_request.labels.*.name, 'performance')
2828
2929
steps:
30-
- uses: actions/checkout@v4
30+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
3131
with:
3232
fetch-depth: 0
3333

3434
- name: Install Rust toolchain
35-
uses: dtolnay/rust-toolchain@stable
35+
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
36+
with:
37+
toolchain: stable
3638

3739
- name: Cache cargo
38-
uses: actions/cache@v4
40+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
3941
with:
4042
path: |
4143
~/.cargo/registry
@@ -96,7 +98,7 @@ jobs:
9698
continue-on-error: true
9799

98100
- name: Store benchmark results
99-
uses: benchmark-action/github-action-benchmark@v1
101+
uses: benchmark-action/github-action-benchmark@cc9ac13ce81cd106a4e7040fc2ab73a38ce02988 # v1
100102
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
101103
with:
102104
tool: "cargo"
@@ -110,7 +112,7 @@ jobs:
110112
continue-on-error: true
111113

112114
- name: Upload Criterion plots
113-
uses: actions/upload-artifact@v4
115+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
114116
with:
115117
name: criterion-plots
116118
path: target/criterion/
@@ -124,13 +126,15 @@ jobs:
124126
runs-on: ubuntu-latest
125127

126128
steps:
127-
- uses: actions/checkout@v4
129+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
128130

129131
- name: Install Rust toolchain
130-
uses: dtolnay/rust-toolchain@stable
132+
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
133+
with:
134+
toolchain: stable
131135

132136
- name: Cache cargo
133-
uses: actions/cache@v4
137+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
134138
with:
135139
path: |
136140
~/.cargo/registry
@@ -159,7 +163,7 @@ jobs:
159163
echo "$BINARY_SIZE_BYTES" > binary_size.txt
160164
161165
- name: Upload binary size
162-
uses: actions/upload-artifact@v4
166+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
163167
with:
164168
name: binary-size
165169
path: binary_size.txt
@@ -172,10 +176,12 @@ jobs:
172176
runs-on: ubuntu-latest
173177

174178
steps:
175-
- uses: actions/checkout@v4
179+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
176180

177181
- name: Install Rust toolchain
178-
uses: dtolnay/rust-toolchain@stable
182+
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
183+
with:
184+
toolchain: stable
179185

180186
- name: Clean build
181187
run: cargo clean
@@ -217,10 +223,12 @@ jobs:
217223
runs-on: ubuntu-latest
218224

219225
steps:
220-
- uses: actions/checkout@v4
226+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
221227

222228
- name: Install Rust toolchain
223-
uses: dtolnay/rust-toolchain@stable
229+
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
230+
with:
231+
toolchain: stable
224232

225233
- name: Install cargo-tree
226234
run: cargo install cargo-tree || true
@@ -259,10 +267,12 @@ jobs:
259267
if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'profiling')
260268

261269
steps:
262-
- uses: actions/checkout@v4
270+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
263271

264272
- name: Install Rust toolchain
265-
uses: dtolnay/rust-toolchain@stable
273+
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
274+
with:
275+
toolchain: stable
266276

267277
- name: Install flamegraph
268278
run: cargo install flamegraph
@@ -276,7 +286,7 @@ jobs:
276286
continue-on-error: true
277287

278288
- name: Upload flamegraph
279-
uses: actions/upload-artifact@v4
289+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
280290
with:
281291
name: flamegraph
282292
path: flamegraph.svg

.github/workflows/brand-assets.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
asset_archive: ${{ steps.package.outputs.archive }}
5757
steps:
5858
- name: Checkout code
59-
uses: actions/checkout@v4
59+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
6060
with:
6161
fetch-depth: 0 # Full history for change detection
6262

@@ -167,7 +167,7 @@ jobs:
167167
168168
- name: Upload artifact
169169
if: steps.changes.outputs.brand == 'true'
170-
uses: actions/upload-artifact@v4
170+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
171171
with:
172172
name: brand-assets-${{ steps.version.outputs.version }}
173173
path: |

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ jobs:
138138

139139
- name: Install Rust toolchain
140140
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
141+
with:
142+
toolchain: stable
141143
with:
142144
toolchain: stable
143145
components: clippy
@@ -181,6 +183,8 @@ jobs:
181183

182184
- name: Install Rust toolchain
183185
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
186+
with:
187+
toolchain: stable
184188
with:
185189
toolchain: stable
186190
components: rustfmt
@@ -212,6 +216,8 @@ jobs:
212216
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
213217
with:
214218
toolchain: stable
219+
with:
220+
toolchain: stable
215221

216222
- name: Configure sccache
217223
uses: mozilla-actions/sccache-action@676c0e67b665684f17941acf5cc3af83bcf10228 # v0.0.6
@@ -260,6 +266,8 @@ jobs:
260266
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
261267
with:
262268
toolchain: stable
269+
with:
270+
toolchain: stable
263271

264272
- name: Configure sccache
265273
uses: mozilla-actions/sccache-action@676c0e67b665684f17941acf5cc3af83bcf10228 # v0.0.6
@@ -320,6 +328,8 @@ jobs:
320328
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
321329
with:
322330
toolchain: stable
331+
with:
332+
toolchain: stable
323333

324334
- name: Install cargo-audit
325335
run: cargo install cargo-audit --locked
@@ -371,6 +381,8 @@ jobs:
371381
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
372382
with:
373383
toolchain: stable
384+
with:
385+
toolchain: stable
374386

375387
- name: Configure sccache
376388
uses: mozilla-actions/sccache-action@676c0e67b665684f17941acf5cc3af83bcf10228 # v0.0.6
@@ -452,6 +464,8 @@ jobs:
452464
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
453465
with:
454466
toolchain: stable
467+
with:
468+
toolchain: stable
455469

456470
- name: Install tarpaulin
457471
run: cargo install cargo-tarpaulin --locked

.github/workflows/release.yml

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,17 @@ jobs:
7474

7575
steps:
7676
- name: Checkout repository
77-
uses: actions/checkout@v4
77+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
7878
with:
7979
fetch-depth: 0 # Full history for changelog
8080

8181
- name: Install Rust toolchain
82-
uses: dtolnay/rust-toolchain@stable
82+
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
83+
with:
84+
toolchain: stable
8385

8486
- name: Setup Rust cache
85-
uses: Swatinem/rust-cache@v2
87+
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
8688
with:
8789
cache-on-failure: true
8890

@@ -186,7 +188,7 @@ jobs:
186188
echo "EOF" >> $GITHUB_OUTPUT
187189
188190
- name: Upload changelog artifact
189-
uses: actions/upload-artifact@v4
191+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
190192
with:
191193
name: changelog
192194
path: |
@@ -257,15 +259,17 @@ jobs:
257259

258260
steps:
259261
- name: Checkout repository
260-
uses: actions/checkout@v4
262+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
261263

262264
- name: Install Rust toolchain
263-
uses: dtolnay/rust-toolchain@stable
265+
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
266+
with:
267+
toolchain: stable
264268
with:
265269
targets: ${{ matrix.target }}
266270

267271
- name: Setup Rust cache
268-
uses: Swatinem/rust-cache@v2
272+
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
269273
with:
270274
key: release-${{ matrix.target }}
271275

@@ -330,7 +334,7 @@ jobs:
330334
331335
- name: Upload artifact (Unix)
332336
if: runner.os != 'Windows'
333-
uses: actions/upload-artifact@v4
337+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
334338
with:
335339
name: ${{ matrix.asset_name }}
336340
path: |
@@ -340,7 +344,7 @@ jobs:
340344

341345
- name: Upload artifact (Windows)
342346
if: runner.os == 'Windows'
343-
uses: actions/upload-artifact@v4
347+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
344348
with:
345349
name: ${{ matrix.asset_name }}
346350
path: |
@@ -359,7 +363,7 @@ jobs:
359363

360364
steps:
361365
- name: Checkout repository
362-
uses: actions/checkout@v4
366+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
363367

364368
- name: Set up QEMU
365369
uses: docker/setup-qemu-action@v3
@@ -435,7 +439,7 @@ jobs:
435439

436440
steps:
437441
- name: Checkout repository
438-
uses: actions/checkout@v4
442+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
439443

440444
- name: Download all artifacts
441445
uses: actions/download-artifact@v4
@@ -628,13 +632,15 @@ jobs:
628632
629633
steps:
630634
- name: Checkout repository
631-
uses: actions/checkout@v4
635+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
632636

633637
- name: Install Rust toolchain
634-
uses: dtolnay/rust-toolchain@stable
638+
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
639+
with:
640+
toolchain: stable
635641

636642
- name: Setup Rust cache
637-
uses: Swatinem/rust-cache@v2
643+
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
638644

639645
- name: Verify package
640646
run: |
@@ -668,7 +674,7 @@ jobs:
668674
669675
steps:
670676
- name: Checkout repository
671-
uses: actions/checkout@v4
677+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
672678

673679
- name: Setup Node.js
674680
uses: actions/setup-node@v4
@@ -846,15 +852,17 @@ jobs:
846852
847853
steps:
848854
- name: Checkout repository
849-
uses: actions/checkout@v4
855+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
850856

851857
- name: Setup Python
852858
uses: actions/setup-python@v5
853859
with:
854860
python-version: "3.12"
855861

856862
- name: Install Rust toolchain
857-
uses: dtolnay/rust-toolchain@stable
863+
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
864+
with:
865+
toolchain: stable
858866

859867
- name: Install maturin
860868
run: |

.github/workflows/security.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
3434
with:
3535
toolchain: stable
36+
with:
37+
toolchain: stable
3638

3739
- name: Install cargo-audit
3840
run: cargo install cargo-audit --locked
@@ -89,6 +91,8 @@ jobs:
8991
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
9092
with:
9193
toolchain: stable
94+
with:
95+
toolchain: stable
9296

9397
- name: Install cargo-license
9498
run: cargo install cargo-license
@@ -145,6 +149,8 @@ jobs:
145149

146150
- name: Install Rust toolchain
147151
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
152+
with:
153+
toolchain: stable
148154
with:
149155
toolchain: stable
150156
components: clippy
@@ -203,6 +209,8 @@ jobs:
203209
uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable
204210
with:
205211
toolchain: stable
212+
with:
213+
toolchain: stable
206214

207215
- name: Install cargo-sbom
208216
run: cargo install cargo-sbom

0 commit comments

Comments
 (0)