ci: pin all workflow actions to commit SHAs - #519
Conversation
ci.yml, pr-ci.yml, and codeql.yml referenced actions by mutable tags (actions/checkout@v4, actions/setup-node@v4, github/codeql-action@v3) while codex-plugin-scanner.yml already used SHA pins. A mutable tag can be re-pointed if the action repo is compromised, so tag references leave the release pipeline exposed to upstream supply-chain attacks. Pin every action to its full commit SHA with the tag noted inline, matching the convention codex-plugin-scanner.yml already established: - actions/checkout@v4 -> 34e114876b0b11c390a56381ad16ebd13914f8d5 (same pin already trusted in codex-plugin-scanner.yml) - actions/setup-node@v4 -> 49933ea5288caeca8642d1e84afbd3f7d6820020 - github/codeql-action/*@V3 -> dd903d2e4f5405488e5ef1422510ee31c8b32357 (v3.36.2) Dependabot's github-actions ecosystem entry keeps these pins updated. https://claude.ai/code/session_01XNtnkLbBiXZxfQQYLMpucB
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Warning Review limit reached
More reviews will be available in 28 minutes and 36 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Warning Review limit reached
More reviews will be available in 27 minutes and 40 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Review follow-up on the SHA-pinning change: codeql-action v3 is deprecated in favor of v4, so pin init/autobuild/analyze to the v4 tag SHA (8aad20d150bbac5944a9f9d289da16a4b0d87c1e = v4.36.2) instead of keeping the v3 line that will stop receiving security updates. https://claude.ai/code/session_01XNtnkLbBiXZxfQQYLMpucB
Audit roadmap §4.4.1: merge .github/workflows/pr-ci.yml into ci.yml so a
single workflow runs on push to main and on pull requests, removing the
duplicated job definitions.
Consolidation details:
- ci.yml now triggers on both push (main) and pull_request (main); the
concurrency group keys on the PR number (falling back to ref) so PR
runs and push runs never cancel each other.
- The test matrix (Node 20.x/22.x), lint, release-harness, scripts-windows,
and codex-compat jobs are unchanged and now also run on PRs.
- The PR-only coverage-threshold gate is preserved as the `validate`
("PR Validation") job, gated with `if: github.event_name == 'pull_request'`.
- pr-ci.yml's `node22-smoke` ("Node 22 Smoke") job is dropped: every one of
its steps (typecheck, tests, audit:ci, build) is subsumed by the 22.x leg
of the test matrix, which now runs on PRs. Branch protection contexts
referencing "PR CI / *" or "Node 22 Smoke" need updating to "CI / *".
Closes ndycode#523: add a Node 18 runtime smoke pipeline validating the
engines floor (node >=18):
- `build-package` (Node 20): npm ci, build, npm pack, upload the tarball
artifact (actions/upload-artifact pinned to v4.6.2 SHA).
- `node18-smoke` (Node 18.17.x, needs build-package): download the tarball
(actions/download-artifact pinned to v4.3.0 SHA), `npm install -g` it with
no checkout and no devDependencies, then smoke-run
`codex-multi-auth --version` and `codex-multi-auth --help`.
test/ci-workflows.test.ts updated to assert the consolidated layout
(pr-ci.yml absent, PR coverage gate, Windows parity, Node 18 smoke design).
Stacked on the action-pinning branch (PR ndycode#519) since both touch every
`uses:` line in these workflows; this commit reuses its pinned SHAs.
https://claude.ai/code/session_01XNtnkLbBiXZxfQQYLMpucB
Summary
Part 3 of the repo-wide audit (#517, #518).
ci.yml,pr-ci.yml, andcodeql.ymlreferenced actions by mutable tags whilecodex-plugin-scanner.ymlalready used SHA pins — an inconsistent supply-chain posture. A mutable tag can be re-pointed if the upstream action repo is compromised (as happened withtj-actions/changed-filesin 2025), which would execute attacker code with access to the CI environment.Changes
Every
uses:reference is now pinned to a full commit SHA with the tag noted inline, matching the conventioncodex-plugin-scanner.ymlalready established:actions/checkout@v434e11487…14f8d5codex-plugin-scanner.ymlactions/setup-node@v449933ea5…820020v4tag on github.com/actions/setup-nodegithub/codeql-action/{init,autobuild,analyze}@v3dd903d2e…32357v3→ v3.36.2 tag on github.com/github/codeql-actionNo workflow logic changes — pin-only diff.
Maintenance:
.github/dependabot.ymlalready has agithub-actionsecosystem entry, so Dependabot will keep these SHA pins updated (it understands the# vNcomment convention).Testing
YAML untouched apart from the
uses:lines;grepconfirms zero unpinneduses:references remain across all four workflows. CI on this PR itself exercises the pinned checkout/setup-node paths.https://claude.ai/code/session_01XNtnkLbBiXZxfQQYLMpucB
Generated by Claude Code
note: greptile review for oc-chatgpt-multi-auth. cite files like
lib/foo.ts:123. confirm regression tests + windows concurrency/token redaction coverage.Greptile Summary
pin-only supply-chain hardening across
ci.yml,pr-ci.yml, andcodeql.yml, replacing mutable action tags with full commit SHAs and aligning all four workflow files to the same pinning convention already established incodex-plugin-scanner.yml.codeql-actionis also silently upgraded from v3 to v4 in the process, addressing the deprecation flagged in a prior review thread.ci.yml/pr-ci.yml: five jobs each now pinactions/checkoutandactions/setup-nodeto the same SHAs used in the trustedcodex-plugin-scanner.ymlbaseline.codeql.yml:init,autobuild, andanalyzeall pinned to8aad20d1…1e # v4— consistent single SHA across the three sub-actions; includes a quiet major-version bump from v3 to v4.uses:line replacements throughout.Confidence Score: 5/5
safe to merge — pure
uses:line replacements with no logic, trigger, or permission changesevery changed line is a tag-to-SHA substitution; the checkout SHA matches the trusted baseline already in
codex-plugin-scanner.yml, the codeql-action upgrade to v4 is a straightforward major-version bump with no breaking changes for javascript-typescript analysis, and dependabot is already configured to keep these pins currentno files require special attention
Important Files Changed
Reviews (2): Last reviewed commit: "ci: move codeql-action pin from deprecat..." | Re-trigger Greptile