Skip to content

chore: pin external GitHub Actions to commit SHAs#41

Closed
joel-phantom wants to merge 1 commit intomasterfrom
autopilot/sec-7928-patch-remaining-repos-with-unpinned-github-actions-from-sec
Closed

chore: pin external GitHub Actions to commit SHAs#41
joel-phantom wants to merge 1 commit intomasterfrom
autopilot/sec-7928-patch-remaining-repos-with-unpinned-github-actions-from-sec

Conversation

@joel-phantom
Copy link
Copy Markdown

@joel-phantom joel-phantom commented Apr 2, 2026

Summary

  • Pin all unpinned external GitHub Action uses: references to full 40-character commit SHAs
  • Original version tags/branches preserved as inline comments for maintainability
  • No other CI changes included

Motivation

Supply chain security hardening: pinning actions to immutable commit SHAs prevents silent changes from compromised or force-pushed tags.

Part of the org-wide audit tracked in SEC-6683 and SEC-7928.

Test plan

  • CI passes on this branch
  • Verify pinned SHAs match the expected versions

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Chores
    • Pinned GitHub Actions to specific commit SHAs across all CI/CD workflows to ensure reproducible and secure builds.

Pin all unpinned external GitHub Action `uses:` references to their
current full 40-character commit SHAs, with original ref in a comment.

This is part of the org-wide supply chain security hardening effort.

Refs: SEC-7928, SEC-6683
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

📝 Walkthrough

Walkthrough

GitHub Actions workflows across the repository were updated to pin external actions to specific commit SHAs instead of floating version tags. This change was applied consistently across all CI/CD workflow files to enhance security and reproducibility.

Changes

Cohort / File(s) Summary
CI Workflow Action Pinning
.github/workflows/android-ci.yml, .github/workflows/detox.yml, .github/workflows/ios-ci.yml, .github/workflows/macos-ci.yml, .github/workflows/windows-ci.yml
Pinned actions/checkout and actions/setup-node to specific commit SHAs. android-ci.yml additionally pinned actions/setup-java and gradle/gradle-build-action. windows-ci.yml additionally pinned microsoft/setup-msbuild to a specific commit SHA.
Release Workflow Action Pinning
.github/workflows/release.yml
Pinned actions/checkout (v4) and actions/setup-node (v3) to specific commit SHAs.
Maintenance Workflow Action Pinning
.github/workflows/stale.yml
Pinned actions/stale v3.0.14 to a specific commit SHA.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: pin external GitHub Actions to commit SHAs' directly and accurately describes the main change across all modified workflow files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch autopilot/sec-7928-patch-remaining-repos-with-unpinned-github-actions-from-sec

Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgithub/​gradle/​gradle-build-action@​fe583dc97e032f41ccc310ea5176f2d7306abbc4 ⏵ a8f75513eafdebd8141bd1cd4e30fcd194af8dfa99 +11100100100100

View full report

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/release.yml:
- Line 25: Update the GitHub Actions step that references the setup-node action
so it uses the v4 release; locate the line containing "uses:
actions/setup-node@..." in the release workflow and change the reference from v3
to v4 (e.g., actions/setup-node@v4) so the release.yml aligns with other CI
workflows and receives ongoing updates and Node.js 20+ support.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 034dceea-9e73-4d02-b40b-14e6a3af0b20

📥 Commits

Reviewing files that changed from the base of the PR and between 413d5ea and 739ee63.

📒 Files selected for processing (7)
  • .github/workflows/android-ci.yml
  • .github/workflows/detox.yml
  • .github/workflows/ios-ci.yml
  • .github/workflows/macos-ci.yml
  • .github/workflows/release.yml
  • .github/workflows/stale.yml
  • .github/workflows/windows-ci.yml


- name: Setup Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Is actions/setup-node v3 still actively maintained, and are there any official recommendations to migrate workflows from v3 to v4?

💡 Result:

No, actions/setup-node v3 is not actively maintained. The last release for v3 was v3.0.0 in February 2022. Active development and releases are on v6 (latest v6.3.0 in March 2026), with v4, v5, and v6 receiving updates including dependency bumps and feature enhancements into 2026. Official documentation and examples use v6, and GitHub Docs recommend v4 or later. Yes, there are official recommendations to migrate from v3 to v4 (and newer). The repository README lists breaking changes for v4, v5, v6, implying migration from older versions like v3. Issues and deprecation notices for older versions (e.g., v2 relying on deprecated cache) urge upgrading to v4. GitHub Docs examples use actions/setup-node@v4. Stack Overflow and issues highlight Node 16 deprecation in v3 actions, recommending v4 which uses Node 20+.

Citations:


🏁 Script executed:

#!/bin/bash
# Find all workflow files and check setup-node versions
find .github/workflows -type f -name "*.yml" -o -name "*.yaml" | while read file; do
  echo "=== $file ==="
  grep -n "setup-node" "$file" || echo "(no setup-node found)"
done

Repository: phantom/react-native-webview

Length of output: 851


Upgrade actions/setup-node from v3 to v4 for consistency and maintenance.

The release workflow uses setup-node@v3, which has been unmaintained since February 2022. All other CI workflows (android-ci, detox, ios-ci, macos-ci, windows-ci) use v4, which receives ongoing updates and supports Node.js 20+. Aligning to v4 removes the maintenance drift and aligns with GitHub's official recommendations for migration.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml at line 25, Update the GitHub Actions step
that references the setup-node action so it uses the v4 release; locate the line
containing "uses: actions/setup-node@..." in the release workflow and change the
reference from v3 to v4 (e.g., actions/setup-node@v4) so the release.yml aligns
with other CI workflows and receives ongoing updates and Node.js 20+ support.

@joel-phantom joel-phantom deleted the autopilot/sec-7928-patch-remaining-repos-with-unpinned-github-actions-from-sec branch April 2, 2026 19:09
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