Skip to content

chore: migrate to Node 24 runtime (v3) - #215

Merged
bryanbeverly merged 1 commit into
masterfrom
chore/node24-v3
May 30, 2026
Merged

bryanbeverly merged 1 commit into
masterfrom
chore/node24-v3

Conversation

@bryanbeverly

Copy link
Copy Markdown
Contributor

Summary

Migrates gitleaks-action from the Node 20 GitHub Actions runtime to Node 24, released as v3.0.0.

  • action.yml: using: "node20" -> using: "node24"
  • @actions/core bumped from 1.10.0 to 1.11.1 for Node 24 compatibility
  • dist/index.js rebuilt via ncc
  • Workflow examples updated: actions/checkout@v3/@v4 -> @v6, gitleaks-action@v2 -> @v3
  • README.md updated with v3 migration guide and Node 20 deprecation timeline

Why v3 (major bump)?

Node 24 requires runner v2.327.1+. Self-hosted runner operators who haven't updated would break silently if we shipped this under the existing @v2 tag. A major version bump gives all consumers explicit opt-in.

Node 20 deprecation timeline

Date What happens
June 2, 2026 GitHub flips runner default to Node 24. Node 20 actions require ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true to keep running.
September 16, 2026 Node 20 removed from GitHub-hosted runners. gitleaks-action@v2 stops working entirely.

After merge

  1. Tag v3.0.0 and create a GitHub Release with migration notes
  2. Create rolling v3 tag pointing to the same commit
  3. Open a GitHub Discussion or Issue announcing v2 deprecation
  4. Update consumer repos (gitleaks/gitleaks, gitleaks/.github, gitleaks/website) to reference @v3

Test plan

  • CI passes on this PR (the gitleaks-action-HEAD.yml workflow tests the action from ./, confirming it runs on Node 24)
  • Verify dist/index.js bundle is correct (rebuilt with npx ncc build src/index.js -o dist)
  • After tagging v3.0.0, verify a consumer workflow using gitleaks/gitleaks-action@v3 runs successfully

Made with Cursor

- Update action.yml from node20 to node24
- Bump @actions/core from 1.10.0 to 1.11.1
- Rebuild dist/ bundle
- Update example.yml: checkout@v3 -> @v6, gitleaks-action@v2 -> @V3
- Update gitleaks-action-HEAD.yml: checkout@v4 -> @v6
- Add v2 -> v3 migration guide to README

GitHub is deprecating Node 20 for Actions on June 2, 2026
(opt-out required) with full removal on September 16, 2026.
This is a breaking change released as v3.0.0 to give users
explicit control over the upgrade.

Co-authored-by: Cursor <cursoragent@cursor.com>
Twodragon0 added a commit to Twodragon0/claudesec that referenced this pull request May 21, 2026
Audit of every SHA-pinned action in .github/workflows/ found one
real node20 user left after #157 bumped dependency-review-action to
v5.0.0: gitleaks/gitleaks-action@ff98106e (v2.3.9, latest). The
upstream node24 migration is in flight (gitleaks/gitleaks-action#215,
still open as of 2026-05-19), so waiting for a tagged release would
risk missing the GitHub deadline.

Replace the action wrapper with a direct gitleaks CLI install plus
`gitleaks dir` scan against the working tree. CLI binary is pinned to
v8.30.1 with sha256 verification against the published checksums file.
This preserves the secret-scan layer while removing the node20
dependency. PR-comment functionality is already covered by the local
pre-commit gitleaks hook and the separate GitGuardian Security Checks
service.

Also cleans up two stale workflow comments uncovered during the audit:

- `actions/dependency-review-action` is now v5.0.0 (node24) — the
  "still uses node20" NOTE at the call site is outdated post-#157.
- `ludeeus/action-shellcheck@00cae500` is a composite action (no node
  runtime), so it was never affected by the node20 deprecation; the
  previous NOTE misclassified it.

Audit summary of the 12 other SHA-pinned actions: all on `node24` or
`composite` runtimes, no further action needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Twodragon0 added a commit to Twodragon0/claudesec that referenced this pull request May 21, 2026
Audit of every SHA-pinned action in .github/workflows/ found one
real node20 user left after #157 bumped dependency-review-action to
v5.0.0: gitleaks/gitleaks-action@ff98106e (v2.3.9, latest). The
upstream node24 migration is in flight (gitleaks/gitleaks-action#215,
still open as of 2026-05-19), so waiting for a tagged release would
risk missing the GitHub deadline.

Replace the action wrapper with a direct gitleaks CLI install plus
`gitleaks dir` scan against the working tree. CLI binary is pinned to
v8.30.1 with sha256 verification against the published checksums file.
This preserves the secret-scan layer while removing the node20
dependency. PR-comment functionality is already covered by the local
pre-commit gitleaks hook and the separate GitGuardian Security Checks
service.

Also cleans up two stale workflow comments uncovered during the audit:

- `actions/dependency-review-action` is now v5.0.0 (node24) — the
  "still uses node20" NOTE at the call site is outdated post-#157.
- `ludeeus/action-shellcheck@00cae500` is a composite action (no node
  runtime), so it was never affected by the node20 deprecation; the
  previous NOTE misclassified it.

Audit summary of the 12 other SHA-pinned actions: all on `node24` or
`composite` runtimes, no further action needed.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bryanbeverly
bryanbeverly merged commit e0c47f4 into master May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant