ci: upgrade actions, pin to SHAs, and harden workflows#1766
Merged
jeanduplessis merged 8 commits intomainfrom Mar 31, 2026
Merged
ci: upgrade actions, pin to SHAs, and harden workflows#1766jeanduplessis merged 8 commits intomainfrom
jeanduplessis merged 8 commits intomainfrom
Conversation
Upgrade actions/setup-node from v4 to v6 and dorny/paths-filter from v3 to v4 to resolve the Node.js 20 deprecation warning. Both updated versions ship with Node 24 runtimes.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (9 files)
Reviewed by gpt-5.4-20260305 · 212,321 tokens |
- actions/checkout v4 → v6 (trufflehog.yml) - actions/cache v4 → v5 (ci.yml, deploy-production.yml, chromatic.yml) - actions/upload-artifact v4 → v5 (chromatic.yml) - actions/download-artifact v4 → v5 (chromatic.yml) - docker/login-action v3 → v4 (deploy-kiloclaw.yml) All pinned to commit SHAs for supply-chain security.
setup-node@v6 no longer auto-caches pnpm. Add explicit cache: 'pnpm' to deploy-kiloclaw and deploy-workers to avoid full reinstalls.
Pin every action reference to its commit SHA with a version comment: - actions/setup-node → v6.3.0 - actions/cache → v5.0.4 - actions/checkout → v6.0.2 - actions/upload-artifact → v5.0.0 - actions/download-artifact → v5.0.0 - pnpm/action-setup → v2.4.1 / v4.4.0 - useblacksmith/checkout → v1 - useblacksmith/build-push-action → v2.1.0 - useblacksmith/setup-docker-builder → v1.6.0 - cloudflare/wrangler-action → v3.14.1 - slackapi/slack-github-action → v2.1.1 - oven-sh/setup-bun → v2.2.0 - chromaui/action → v16.0.0 (was @latest) - trufflesecurity/trufflehog → v3.93.0 - dorny/paths-filter → v4.0.1 - docker/login-action → v4.0.0
Chromatic was already on v4 while everything else was on v2. Align all workflows on the same version to reduce maintenance surface.
pnpm/action-setup v4 errors when both 'version' is specified in the workflow config and 'packageManager' is set in package.json. Remove the explicit version so v4 auto-detects from packageManager.
- Add least-privilege permissions: contents: read to 5 workflows that were missing explicit permissions blocks (bump-openclaw, chromatic, deploy-kiloclaw, deploy-production, deploy-workers) - Add timeout-minutes to all jobs to prevent hung runners from burning minutes indefinitely (5-30 min depending on job type) - Remove dead deploy-gateway job (disabled with if: false due to missing R2_ACCOUNT_ID secret) - Replace manual pnpm cache logic in chromatic job with setup-node's built-in cache: 'pnpm' - Standardize node-version quoting (remove unnecessary quotes in chromatic.yml)
iscekic
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Problem
GitHub Actions warned that
actions/setup-node@v4anddorny/paths-filter@v3run on the deprecated Node.js 20 runtime. Node 20 actions will be forced to Node 24 starting June 2, 2026, and removed from runners September 16, 2026. Additionally, several other actions were outdated, none were pinned to commit SHAs, and multiple workflows had security and reliability gaps.Solution
cache: 'pnpm'to deploy workflows wheresetup-node@v6dropped implicit pnpm caching.pnpm/action-setupon v4.4.0 across all workflows (was split between v2 and v4), removing the now-conflictingversion: latestparameter.permissions: contents: readto 5 workflows that were missing explicit permissions blocks.timeout-minutesto every job to prevent hung runners from burning minutes indefinitely.deploy-gatewayjob (disabled withif: falsedue to missingR2_ACCOUNT_IDsecret).setup-node's built-incache: 'pnpm'.node-versionquoting (remove unnecessary quotes inchromatic.yml).Actions upgraded:
actions/setup-nodev4v6.3.0actions/cachev4v5.0.4actions/checkoutv4v6.0.2actions/upload-artifactv4v5.0.0actions/download-artifactv4v5.0.0dorny/paths-filterv3v4.0.1docker/login-actionv3v4.0.0pnpm/action-setupv2/v4v4.4.0chromaui/action@latestv16.0.0Why this approach
Pinning to commit SHAs prevents a compromised or hijacked tag from injecting malicious code into CI. The version comment after each SHA preserves readability. All actions are official major version bumps from their maintainers — no behavioral changes beyond the runtime upgrade. Adding permissions and timeouts are low-risk hardening measures recommended by GitHub's security best practices.
Verification
version: latestin pnpm/action-setup stepsVisual Changes
N/A
Reviewer Notes
actions/setup-nodeskipped v5 and went straight to v6.chromaui/actionwas previously pinned to@latest(mutable) — now pinned to v16.0.0 SHA.setup-node@v6drops implicit pnpm caching; explicitcache: 'pnpm'was added where missing.pnpm/action-setup@v4errors when bothversionis specified in the workflow andpackageManageris set inpackage.json— allversion: latestparameters were removed.deploy-gatewayjob indeploy-production.ymlwas removed entirely. If it needs to be restored, theR2_ACCOUNT_IDsecret must be configured first.trufflehog.ymlintentionally keepsactions/checkoutinstead ofuseblacksmith/checkoutfor security scanning integrity.