Skip to content

Commit be9f20d

Browse files
luisleo526ci-cxclaude
authored
ci: pin every third-party action to a full commit SHA with a version comment, and lint it in preflight (ORG-ACTIONPINS) [replaces #495] (#508)
* ci: pin every third-party action in the engine workflows to a full commit SHA with a version comment (ORG-ACTIONPINS) 66 `uses:` lines changed in .github/workflows/*.yml and .github/actions/setup-live-curl/action.yml: 65 mutable tags rewritten to `@<40-hex sha> # v<version>` and one bare SHA that lacked its comment. Each pin is the same major the file used before; no step, job, permission, environment, secret or token mint changes (a before/after comparison of the diff with the refs stripped is identical line for line). Resolved on 2026-10-24 22:48 with `git ls-remote --tags` on a spot box; every tag is lightweight, so the tag's sha is the commit: actions/checkout v4 11d5960a326750d5838078e36cf38b85af677262 v4.4.0 actions/upload-artifact v4 ea165f8d65b6e75b540449e92b4886f43607fa02 v4.6.2 actions/setup-python v5 a26af69be951a213d495a4c3e4e4022e16d87065 v5.6.0 actions/cache, cache/save, cache/restore v4 0057852bfaa89a56745cba8c7296529d2fc39830 v4.3.0 actions/create-github-app-token v1 d72941d797fd3113feb6b93fd0dec494b13a2547 v1.12.0 cloudflare/wrangler-action v3 9acf94ace14e7dc412b076f2c5c20b8ce93c79cd v3.15.0 The byte-pinned copies of the workflow text that scripts/ci_preflight.py, scripts/test_ci_preflight.py and scripts/test_ci_release_gate.py compare against (the embedded probe workflow, the release and cache expectations, the Wrangler deployment, test mutations and fixtures) are moved to the same pinned text so each still equals its workflow. Two tests read the real workflows and composite action and require a 40-hex sha and a version comment on every third-party reference. No documentation or comment sentence is deleted or rewritten. Lane: ci-fu-pins (Codex gpt-6.1-sol). Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * ci(preflight): refuse any third-party `uses:` that is not a 40-hex commit SHA with a same-line version comment; the lint accepts plain block-style YAML only (ORG-ACTIONPINS) scripts/ci_preflight.py gains `action_pin_findings`: every `uses:` in .github/workflows/*.yml and every composite .github/actions/**/action.yml (or .yaml) that is not a local `./` path or a `docker://` image must be `owner/action[/path]@<40 lowercase hex> # v<version>` on the same line; quoted values, step and job-level `uses:`, remote reusable workflows and a ref-less `uses:` are judged; the finding names file, line and the offending reference. The lint is a regression guard for our own reviewed workflow files, so it does not parse arbitrary YAML: it accepts plain block-style YAML and refuses, with a finding naming file, line, construct and source text, what it cannot follow: anchors, aliases, merge keys, explicit keys, tags, non-empty flow mappings, quoted keys, backslash escapes in quoted values, quoted values that do not end on their line, tab indentation, document markers, `uses` without a same-line scalar, unrecognised block lines, non-ASCII whitespace in structural positions, and any non-LF line break (bare CR, NEL, LS, PS, VT, FF) or C0 control character in the whole file. Allowed (surveyed on the real tree, twelve YAML files): plain block mappings and sequences, plain and quoted scalar values, empty `{}` and `[]` as a whole plain value, non-empty flow sequences, block-scalar bodies including `- |`. Quotes inside flow sequences count only at element start; delimiters of a refused flow collection are counted without quote masking and the refusal region ends at the first outdent. The `${{ ... }}` scan is linear. The loaders read the bytes and decode strict UTF-8 (a file that is not UTF-8 is a finding), so a bare CR is no longer erased before the refusal runs. The documented limit for exotic YAML is in docs/ci.md. The lint was read by sol and argon over five rounds (every finding closed or classified); the loader and the three promotion-guard tests that now also see the lint's quoted-key finding were fixed from the lab legs. Tests: 15 first-round and the later red-first tests (one per refused construct, each break character in a block-scalar body and in a comment, the C0 controls, flow-quote variants, outdent resumption, loader tests on real files in a temp layout, a real-tree zero-findings test, mutation controls for the refusal branch and the integration call). docs/ci.md describes the rule. This commit is the squash of the lint rounds of the series; the pins commit before it rewrites the workflow files. Lanes: ci-fu-pinlint, ci-fu-pins2/3/4/5 (Codex gpt-6.1-sol), ci-fu-pins6 and pins7 (Claude Sonnet 5.5 via claudock). Co-Authored-By: Claude Sonnet 5.5 <[email protected]> --------- Co-authored-by: ci-cx <ci-cx@invalid> Co-authored-by: Claude Sonnet 5.5 <[email protected]>
1 parent 0a43c2c commit be9f20d

14 files changed

Lines changed: 1547 additions & 134 deletions

‎.github/actions/setup-live-curl/action.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ runs:
3434
- name: Restore pinned WebSocket-enabled libcurl
3535
id: curl-cache
3636
if: ${{ inputs.cold-cache != 'true' }}
37-
uses: actions/cache/restore@v4
37+
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
3838
with:
3939
path: build-native-deps/curl-install
4040
key: curl-${{ inputs.cache-namespace }}-${{ steps.dependencies.outputs.version }}-${{ steps.dependencies.outputs.sha256 }}-${{ steps.dependencies.outputs.identity }}-${{ hashFiles('.github/actions/setup-live-curl/action.yml', 'scripts/build_live_curl.sh') }}-${{ runner.os }}-${{ runner.arch }}
@@ -48,7 +48,7 @@ runs:
4848
# job timeouts must not prevent a valid pinned installation from surviving.
4949
- name: Save pinned WebSocket-enabled libcurl
5050
if: ${{ inputs.cold-cache != 'true' && steps.curl-build.outcome == 'success' && steps.curl-cache.outputs.cache-hit != 'true' }}
51-
uses: actions/cache/save@v4
51+
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
5252
with:
5353
path: build-native-deps/curl-install
5454
key: ${{ steps.curl-cache.outputs.cache-primary-key }}

‎.github/workflows/ci-post.yml‎

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
steps:
122122
# The tested commit and its parents: a pull request's merge and the base
123123
# it merged into, a push's commit and its parent.
124-
- uses: actions/checkout@v4
124+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
125125
with:
126126
fetch-depth: 2
127127
persist-credentials: false
@@ -171,7 +171,7 @@ jobs:
171171
run: |
172172
echo "::error::authz did not pass; nothing of this run's code is checked out or run"
173173
exit 1
174-
- uses: actions/checkout@v4
174+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
175175
if: ${{ needs.authz.result == 'success' }}
176176
with:
177177
persist-credentials: false
@@ -203,7 +203,7 @@ jobs:
203203

204204
- name: Retain preflight diagnostics
205205
if: always()
206-
uses: actions/upload-artifact@v4
206+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
207207
with:
208208
name: ci-preflight
209209
path: build-ci-preflight/
@@ -220,13 +220,13 @@ jobs:
220220
run: |
221221
echo "::error::authz did not pass; nothing of this run's code is checked out or run"
222222
exit 1
223-
- uses: actions/checkout@v4
223+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
224224
if: ${{ needs.authz.result == 'success' }}
225225
with:
226226
persist-credentials: false
227227
fetch-depth: 0
228228
- name: Set up Python
229-
uses: actions/setup-python@v5
229+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
230230
with:
231231
python-version: '3.12'
232232
- name: Install the harness test runner
@@ -239,7 +239,7 @@ jobs:
239239
run: python3 scripts/ci_preflight.py --output-dir build-ci-preflight-slow --tier slow
240240
- name: Retain preflight diagnostics
241241
if: always()
242-
uses: actions/upload-artifact@v4
242+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
243243
with:
244244
name: ci-preflight-slow
245245
path: build-ci-preflight-slow/
@@ -286,14 +286,14 @@ jobs:
286286
ubuntu-24.04:Linux|macos-26:macOS) ;;
287287
*) echo "::error::post fleet runner OS $ACTUAL_OS cannot verify $REQUESTED_PLATFORM"; exit 1 ;;
288288
esac
289-
- uses: actions/checkout@v4
289+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
290290
if: ${{ needs.authz.result == 'success' }}
291291
with:
292292
persist-credentials: false
293293
fetch-depth: 0
294294

295295
- name: Set up Python
296-
uses: actions/setup-python@v5
296+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
297297
with:
298298
python-version: '3.12'
299299

@@ -317,7 +317,7 @@ jobs:
317317
# fallback. Only main writes this namespace, never a PR merge ref.
318318
- name: Restore ccache
319319
id: ccache-restore
320-
uses: actions/cache/restore@v4
320+
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
321321
with:
322322
path: ${{ env.CCACHE_DIR }}
323323
key: ccache-main-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build_type }}-${{ github.sha }}
@@ -346,15 +346,15 @@ jobs:
346346

347347
- name: Retain CI diagnostics
348348
if: always()
349-
uses: actions/upload-artifact@v4
349+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
350350
with:
351351
name: ci-diagnostics-${{ matrix.platform.os }}-${{ matrix.build_type }}
352352
path: ci-diagnostics/
353353
if-no-files-found: warn
354354

355355
- name: Save main ccache
356356
if: ${{ success() && github.ref == 'refs/heads/main' && steps.ccache-restore.outputs.cache-hit != 'true' }}
357-
uses: actions/cache/save@v4
357+
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
358358
with:
359359
path: ${{ env.CCACHE_DIR }}
360360
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
@@ -388,14 +388,14 @@ jobs:
388388
ubuntu-24.04:Linux|macos-26:macOS) ;;
389389
*) echo "::error::post fleet runner OS $ACTUAL_OS cannot verify $REQUESTED_PLATFORM"; exit 1 ;;
390390
esac
391-
- uses: actions/checkout@v4
391+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
392392
if: ${{ needs.authz.result == 'success' }}
393393
with:
394394
persist-credentials: false
395395
fetch-depth: 0
396396

397397
- name: Set up Python
398-
uses: actions/setup-python@v5
398+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
399399
with:
400400
python-version: '3.12'
401401

@@ -416,7 +416,7 @@ jobs:
416416
# Keep the main cache namespace shared with PR restores. Only main saves.
417417
- name: Restore ccache
418418
id: ccache-restore
419-
uses: actions/cache/restore@v4
419+
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
420420
with:
421421
path: ${{ env.CCACHE_DIR }}
422422
key: ccache-main-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build_type }}-${{ github.sha }}
@@ -440,15 +440,15 @@ jobs:
440440

441441
- name: Retain CI diagnostics
442442
if: always()
443-
uses: actions/upload-artifact@v4
443+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
444444
with:
445445
name: ci-diagnostics-${{ matrix.os }}-${{ matrix.build_type }}
446446
path: ci-diagnostics/
447447
if-no-files-found: warn
448448

449449
- name: Save main ccache
450450
if: ${{ success() && github.ref == 'refs/heads/main' && steps.ccache-restore.outputs.cache-hit != 'true' }}
451-
uses: actions/cache/save@v4
451+
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
452452
with:
453453
path: ${{ env.CCACHE_DIR }}
454454
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
@@ -477,14 +477,14 @@ jobs:
477477
run: |
478478
echo "::error::authz did not pass; nothing of this run's code is checked out or run"
479479
exit 1
480-
- uses: actions/checkout@v4
480+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
481481
if: ${{ needs.authz.result == 'success' }}
482482
with:
483483
persist-credentials: false
484484
fetch-depth: 0
485485

486486
- name: Set up Python
487-
uses: actions/setup-python@v5
487+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
488488
with:
489489
python-version: '3.12'
490490

@@ -504,7 +504,7 @@ jobs:
504504
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libeigen3-dev tzdata-legacy ccache
505505
506506
- name: Restore ccache
507-
uses: actions/cache@v4
507+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
508508
with:
509509
path: ${{ env.CCACHE_DIR }}
510510
key: ccache-${{ runner.os }}-${{ runner.arch }}-sanitizers-${{ github.sha }}
@@ -521,7 +521,7 @@ jobs:
521521

522522
- name: Retain CI diagnostics
523523
if: always()
524-
uses: actions/upload-artifact@v4
524+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
525525
with:
526526
name: ci-diagnostics-sanitizers
527527
path: ci-diagnostics/
@@ -547,14 +547,14 @@ jobs:
547547
run: |
548548
echo "::error::authz did not pass; nothing of this run's code is checked out or run"
549549
exit 1
550-
- uses: actions/checkout@v4
550+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
551551
if: ${{ needs.authz.result == 'success' }}
552552
with:
553553
persist-credentials: false
554554
fetch-depth: 0
555555

556556
- name: Set up Python
557-
uses: actions/setup-python@v5
557+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
558558
with:
559559
python-version: '3.12'
560560

@@ -574,7 +574,7 @@ jobs:
574574
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y cmake ninja-build libeigen3-dev tzdata-legacy libsqlite3-dev libssl-dev zlib1g-dev ccache
575575
576576
- name: Restore ccache
577-
uses: actions/cache@v4
577+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
578578
with:
579579
path: ${{ env.CCACHE_DIR }}
580580
key: ccache-${{ runner.os }}-${{ runner.arch }}-kernel-${{ github.sha }}
@@ -596,7 +596,7 @@ jobs:
596596

597597
- name: Retain CI diagnostics
598598
if: always()
599-
uses: actions/upload-artifact@v4
599+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
600600
with:
601601
name: ci-diagnostics-kernel
602602
path: ci-diagnostics/

‎.github/workflows/ci.yml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189
190190
# The tested commit and its parents: a pull request's merge and the base
191191
# it merged into, a push's commit and its parent.
192-
- uses: actions/checkout@v4
192+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
193193
with:
194194
fetch-depth: 2
195195
persist-credentials: false
@@ -239,7 +239,7 @@ jobs:
239239
run: |
240240
echo "::error::authz did not pass; nothing of this run's code is checked out or run"
241241
exit 1
242-
- uses: actions/checkout@v4
242+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
243243
if: ${{ needs.authz.result == 'success' }}
244244
with:
245245
persist-credentials: false
@@ -271,7 +271,7 @@ jobs:
271271

272272
- name: Retain preflight diagnostics
273273
if: always()
274-
uses: actions/upload-artifact@v4
274+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
275275
with:
276276
name: ci-preflight
277277
path: build-ci-preflight/
@@ -308,14 +308,14 @@ jobs:
308308
run: |
309309
echo "::error::authz did not pass; nothing of this run's code is checked out or run"
310310
exit 1
311-
- uses: actions/checkout@v4
311+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
312312
if: ${{ needs.authz.result == 'success' }}
313313
with:
314314
persist-credentials: false
315315
fetch-depth: 0
316316

317317
- name: Set up Python
318-
uses: actions/setup-python@v5
318+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
319319
with:
320320
python-version: '3.12'
321321

@@ -332,7 +332,7 @@ jobs:
332332
# fallback. Only main writes this namespace, never a PR merge ref.
333333
- name: Restore ccache
334334
id: ccache-restore
335-
uses: actions/cache/restore@v4
335+
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
336336
with:
337337
path: ${{ env.CCACHE_DIR }}
338338
key: ccache-main-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build_type }}-${{ github.sha }}
@@ -370,15 +370,15 @@ jobs:
370370

371371
- name: Retain CI diagnostics
372372
if: always()
373-
uses: actions/upload-artifact@v4
373+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
374374
with:
375375
name: ci-diagnostics-${{ matrix.platform.os }}-${{ matrix.build_type }}
376376
path: ci-diagnostics/
377377
if-no-files-found: warn
378378

379379
- name: Save main ccache
380380
if: ${{ success() && github.ref == 'refs/heads/main' && steps.ccache-restore.outputs.cache-hit != 'true' }}
381-
uses: actions/cache/save@v4
381+
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
382382
with:
383383
path: ${{ env.CCACHE_DIR }}
384384
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}

‎.github/workflows/corpus-parity-subset.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ jobs:
107107
# Credentials stay persisted, exactly as the nightly job above: the
108108
# submodule clone and `git lfs pull` below go out over https and the
109109
# nightly is the configuration that is known to work for them.
110-
- uses: actions/checkout@v4
110+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
111111
with:
112112
fetch-depth: 1
113113

114114
- name: Set up Python
115-
uses: actions/setup-python@v5
115+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
116116
with:
117117
python-version: '3.12'
118118

@@ -147,7 +147,7 @@ jobs:
147147
148148
- name: Restore the corpus chart feed
149149
id: feed
150-
uses: actions/cache@v4
150+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
151151
with:
152152
path: corpus/data
153153
key: corpus-feed-${{ steps.pin.outputs.gitlink }}
@@ -175,7 +175,7 @@ jobs:
175175
done
176176
177177
- name: Restore ccache
178-
uses: actions/cache@v4
178+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
179179
with:
180180
path: ${{ env.CCACHE_DIR }}
181181
key: ccache-${{ runner.os }}-${{ runner.arch }}-corpus-parity-subset-${{ github.sha }}
@@ -207,7 +207,7 @@ jobs:
207207
208208
- name: Retain parity diagnostics
209209
if: failure()
210-
uses: actions/upload-artifact@v4
210+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
211211
with:
212212
name: corpus-parity-subset-diagnostics
213213
path: corpus-parity-diagnostics/

0 commit comments

Comments
 (0)