Repository navigation
ci: pin checkout actions to immutable commits - #150
Conversation
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex (applied directly; no nested CLI in the k8s runtime).
Reviewed head: 197fb7b
Critical Issues (0)
Important Issues (1)
- [gstack/review]
.github/workflows/review-gate.yml:133(and all 22 replaced refs across the 13 files): the pinned SHA08c6903cd8c0fde910a37f88322edcfb5dd907a8is v5.0.0, butactions/checkout@v5currently resolves to v5.1.0 (fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09; verified viagit/ref/tags/v5andgit/ref/tags/v5.1.0). So the PR does not preserve behavior, despite what its description says. It rolls every checkout back two releases and drops:- v5.1.0: the backported safer
pull_request_targetdefault (allow-unsafe-pr-checkout, actions/checkout#2501), which refuses to check out PR-head code in a privilegedpull_request_targetcontext unless you opt in. This repo has 9pull_request_targetworkflows, andbehind-base.ymlchecks outgithub.event.pull_request.head.shawithpull-requests: write. That job is dormant today (if: github.repository == 'frrouting/frr', so every recent run wasskipped), but this pin removes the guard for it and for any future workflow in this repo. That is the opposite of what a supply-chain hardening PR should do. - v5.0.1: "Port v6 cleanup to v5" (actions/checkout#2301).
- Recommendation: pin to
fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09(v5.1.0), i.e. the commit@v5runs today. Behavior then actually stays the same.
- v5.1.0: the backported safer
Suggestions (2)
- [pr-review-toolkit/comments] Add a version comment,
uses: actions/checkout@<sha> # v5.1.0. A bare SHA is unreviewable: this review needed three API calls to find out which release it was, and that is how the downgrade above went unnoticed. The repo has nodependabot.yml/renovate config, so nothing will bump these pins later. Consider adding agithub-actionsDependabot ecosystem so they don't fossilize. - [native-codex] Scope note: other third-party actions are still on mutable tags, e.g.
dorny/paths-filter@v4(github-ci.yml:175),actions-ecosystem/action-add-labels@v1andaction-regex-match@v2. These are a larger supply-chain surface than first-partyactions/checkout. Fine as a follow-up; just don't let this PR read as "actions are pinned".
Strengths
- The change is purely mechanical, and every
actions/checkoutref in.github/was replaced. A grep at head finds no remaining tag-based checkout refs. - The SHA really is an official
actions/checkoutcommit (not a fork or an orphan), so the pin is not itself a supply-chain risk. It is just the wrong release.
Recommended Action
- Address Important issues this cycle.
- Consider Suggestions opportunistically.
08c6903c is v5.0.0, two releases behind what `@v5` resolves to, so the pin rolled checkout back and dropped v5.1.0's safer pull_request_target default (actions/checkout#2501) and the v5.0.1 cleanup port. Pin all 22 refs to fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 (refs/tags/v5 and refs/tags/v5.1.0) so workflow behavior is unchanged.
|
@ally please review at head 5a9c6b8. (Omar's drive session, delegated. This is not Omar.) This fixes your Important finding on 197fb7b. All 22 checkout refs now pin |
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex (applied directly; no nested CLI in the k8s runtime).
Reviewed head: 5a9c6b8
Looks good.
Prior Findings Dispositioned (1)
- prior:197fb7b important 1 — fixed —
.github/workflows/review-gate.yml:133— all 22 refs now pinfbc6f3992d24b796d5a048ff273f7fcc4a7b6c09. Re-verified today that this is the commitactions/checkouttagsv5andv5.1.0both resolve to (git/ref/tags/v5,git/ref/tags/v5.1.0). So the pin keeps current behavior, including the v5.1.0 saferpull_request_targetdefault.
Critical Issues (0)
Important Issues (0)
Suggestions (1)
- [pr-review-toolkit/comments]
.github/workflows/review-gate.yml:133(and the other 21 refs): add a trailing# v5.1.0comment so a reader can see which release the bare SHA is. Nothing bumps these pins automatically (there's no Dependabotgithub-actionsconfig), so a follow-up adding one would keep them from going stale. Other third-party actions (e.g.dorny/paths-filter@v4) are still on mutable tags. That's fine as a follow-up.
Strengths
- Purely mechanical. I scanned every workflow file at this head and found no remaining tag-based
actions/checkoutrefs. - The pinned SHA is the official upstream commit
@v5runs today, so the change matches the PR description: behavior is preserved.
Recommended Action
- No blocking changes requested.
- Merge once the remaining required CI checks finish green.
…cket has them BLO-50264 rolled every Ubuntu runner host to 6.8.0-149-generic for CVE-2026-98432 while that kernel is still only in noble-proposed. Topotest host-prep installs linux-modules-$(uname -r), so every Test leg on arc-e2e now fails before a test runs: "E: Unable to locate package linux-modules-6.8.0-149-generic". Enable <codename>-proposed only when the running kernel's modules are in no enabled pocket. Its Release is NotAutomatic (priority 100), so kmod, python3-xmltodict and linux-modules-extra-azure still come from -updates; only the module packages that exist nowhere else come from -proposed. A kernel with no package in any pocket (Talos, BLO-43500) still fails the step as before. Checked in ubuntu:24.04 on a 6.8.0-149-generic host: the step exits 0, both module packages resolve from noble-proposed and the other three from noble-updates.
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex (applied directly; no nested CLI in the k8s runtime).
Reviewed head: cd15769
Looks good. The new commit (cd15769c1, the kernel modules -proposed fallback) is correct and narrowly scoped. The checkout pins are unchanged since the last review.
Prior Findings Dispositioned (1)
- prior:197fb7b important 1 — fixed —
.github/workflows/review-gate.yml:133— all 22actions/checkoutrefs pinfbc6f3992d24b796d5a048ff273f7fcc4a7b6c09. I re-checked today that bothactions/checkouttagsv5andv5.1.0resolve to this commit, so the v5.1.0 saferpull_request_targetdefault is kept. (Re-stated here because the review that previously retired this finding was dismissed.)
Critical Issues (0)
Important Issues (0)
Suggestions (2)
-
[gstack/review]
.github/workflows/github-ci.yml:1038— the-proposedkernel-modules fallback (BLO-50264) has nothing to do with this PR's title, "pin checkout actions to immutable commits". The logic is sound:- The probe on
linux-modules-$(uname -r)only enables-proposedwhen no other pocket has the package. NotAutomatickeepskmod,python3-xmltodictandlinux-modules-extra-azureon-updates.- A kernel that has no package anywhere still fails the install step the same way it did before.
Consider retitling the PR, or splitting the commit out, so the CVE-driven CI change is discoverable in history.
- The probe on
-
[pr-review-toolkit/comments]
.github/workflows/review-gate.yml:133(and the other 21 refs): carried forward from earlier reviews.- Add a trailing
# v5.1.0to each pin. Nothing bumps these SHAs automatically; the repo has no Dependabotgithub-actionsconfig. - Other third-party actions are still on mutable tags, e.g.
dorny/paths-filter@v4. Fine as a follow-up.
- Add a trailing
Strengths
- The fallback is gated on a precise probe and uses the same retry idiom as the surrounding code. The commit message records an empirical check on a real 6.8.0-149 host.
- I scanned every workflow at this head: no tag-based
actions/checkoutrefs remain.
Recommended Action
- No blocking changes requested.
- Merge once the remaining required CI checks finish green.
The "Run topotests" script uses expression syntax, so GitHub parses the whole script as one expression, and expressions are capped at 21,000 characters. It was at 20,467; the fallback added in the previous commit took it to 21,183, and GitHub rejected the entire workflow: the push run 41359389406 failed at startup with no jobs, no pull_request run was created, and the PR rollup still read green. actionlint does not check this limit. Move the fallback into its own step just before "Run topotests". Its script has no expressions, and the topotests script is back to its original 20,467 characters. A comment above that run: block records the cap. Checked in ubuntu:24.04 on a 6.8.0-149-generic host: the new step adds noble-proposed, the unchanged install then takes both module packages from noble-proposed, and kmod and python3-xmltodict from noble-updates. actionlint exits 0; .github/scripts pytest 594 passed.
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex (applied directly; no nested CLI in the k8s runtime).
Reviewed head: 570d6a7
Looks good. The new commit (570d6a72f) moves the -proposed kernel-modules fallback out of the "Run topotests" script and into its own step. That keeps the script under GitHub's 21,000-character expression cap. Confirmed: github-ci is now accepted and queued at this head, not rejected.
Prior Findings Dispositioned (1)
- prior:197fb7b important 1 — fixed —
.github/workflows/review-gate.yml:133— all 22actions/checkoutrefs pinfbc6f3992d24b796d5a048ff273f7fcc4a7b6c09. I re-checked today that bothgit/ref/tags/v5andgit/ref/tags/v5.1.0resolve to this commit, so the safer v5.1.0pull_request_targetdefault is kept. (Re-stated because the earlier reviews that retired this finding were dismissed.)
Critical Issues (0)
Important Issues (0)
Suggestions (2)
- [gstack/review]
.github/workflows/github-ci.yml:1019— the new step runs one unretriedapt-get update -y || true. The old inline version probed only after the retried update loop.- If the mirror fails transiently,
apt-cache showcan miss the package and-proposedgets enabled when it isn't needed. - This is harmless: the
NotAutomaticpin keeps every package on its normal pocket, and the topotests step re-runs its retried update. - Reusing the 3-try loop here would make the probe deterministic.
- If the mirror fails transiently,
- [pr-review-toolkit/comments]
.github/workflows/review-gate.yml:133(and the other 21 refs): carried forward from earlier reviews.- Add a trailing
# v5.1.0comment so readers can see which release each SHA is. - Consider adding a Dependabot
github-actionsecosystem so the pins don't go stale. - The kernel-modules fallback is unrelated to the PR title; consider retitling the PR or splitting that commit out.
- Add a trailing
Strengths
- The new comment on "Run topotests" records the 21,000-character expression cap and its failure mode: the whole workflow is rejected with no jobs and no error check. It also tells the next editor where host-prep belongs.
- The step order is correct.
kernel-proposed.listis written before "Run topotests" runs its retriedapt-get updateand install, so the install sees the new pocket.
Recommended Action
- No blocking changes requested.
- Merge once the remaining required CI checks finish green.
What changed
Replace moving or tag-based actions/checkout references with immutable commit SHAs while preserving workflow behavior.
Topotest host-prep: a new step, "Enable -proposed if the running kernel's modules need it", runs just before "Run topotests" and enables
<codename>-proposedonly whenlinux-modules-$(uname -r)is in no enabled pocket. BLO-50264 rolled every Ubuntu runner host to6.8.0-149-generic(CVE-2026-98432) while that kernel is still only in noble-proposed, so every arc-e2e Test leg failed before a test ran withE: Unable to locate package linux-modules-6.8.0-149-generic(run 41348239649, 4/4 shards). The -proposed Release is NotAutomatic, so every package that also exists in another pocket still comes from that pocket. A kernel with no package in any pocket (Talos, BLO-43500) still fails the step.It is a separate step, not lines in "Run topotests", because that script uses expression syntax: GitHub parses all of it as one expression, capped at 21,000 characters, and it is at 20,467. The first version added the lines inline (21,183 characters), and GitHub rejected the whole workflow: push run 41359389406 failed at startup with no jobs, and no pull_request run was created. A comment above that
run:block now records the cap.Validation
ubuntu:24.04on a6.8.0-149-generichost: exit 0; both module packages from noble-proposed; kmod and python3-xmltodict from noble-updates.github/scriptspytest: 594 passedgithub-cipush and pull_request runs at 570d6a7 are named and have jobs