Skip to content

fix: pin third-party GitHub Actions to commit SHAs - #921

Merged
cv merged 1 commit into
mainfrom
fix/sha-pin-actions
Mar 25, 2026
Merged

cv merged 1 commit into
mainfrom
fix/sha-pin-actions

Conversation

@cjagwani

@cjagwani cjagwani commented Mar 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Pin rossjrw/pr-preview-action@v1 to ffa7509e91a3ec8dfc2e5536c4d5c1acdf7a6de9
  • Pin marocchino/sticky-pull-request-comment@v2 to 773744901bac0e8cbb5a0dc842800d45e9b2b405
  • Add .github/dependabot.yml for automated GitHub Actions updates

Mutable tags (@v1, @v2) can be moved to point at any commit. If either action's repo is compromised, the attacker gains the workflow's contents: write and pull-requests: write permissions. Pinning to SHAs eliminates this supply chain risk.

Fixes #578

Test plan

  • All pre-commit and pre-push hooks pass
  • Verify docs preview still deploys on a test PR touching docs/

Summary by CodeRabbit

  • Chores
    • Added automated dependency management for GitHub Actions with weekly update checks to maintain current tool versions
    • Enhanced workflow reliability and traceability by pinning GitHub Actions to specific commit hashes instead of floating version tags

Pin rossjrw/pr-preview-action and marocchino/sticky-pull-request-comment
to commit SHAs to prevent supply chain attacks via mutable tags.
Add dependabot config for automated GitHub Actions updates.

Fixes #578
@coderabbitai

coderabbitai Bot commented Mar 25, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 88332664-40c4-43f3-a6c4-0f6c487e46ea

📥 Commits

Reviewing files that changed from the base of the PR and between f4a68bf and 9c875c5.

📒 Files selected for processing (2)
  • .github/dependabot.yml
  • .github/workflows/docs-preview-deploy.yaml

📝 Walkthrough

Walkthrough

Adds Dependabot configuration for automated GitHub Actions updates and pins two GitHub Actions in the docs-preview workflow to specific commit SHAs instead of mutable version tags (@v1, @v2) to mitigate supply chain security risks.

Changes

Cohort / File(s) Summary
Security Hardening
.github/workflows/docs-preview-deploy.yaml
Replaced mutable version tags with pinned commit SHAs for two third-party actions: rossjrw/pr-preview-action (@v1 → @ffa7509e...) and marocchino/sticky-pull-request-comment (@v2 → @773744901...) across four step references.
Dependency Management
.github/dependabot.yml
New Dependabot configuration enabling automated version update checks for GitHub Actions ecosystem on a weekly schedule, supporting future maintenance of SHA-pinned action references.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Commit SHAs now locked in tight,
No more mutable tags taking flight,
Dependabot watching the way,
Security strengthened today! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: pinning third-party GitHub Actions to commit SHAs for security. It directly relates to the main objective of the PR.
Linked Issues check ✅ Passed The PR addresses the core requirements from issue #578: pins rossjrw/pr-preview-action and marocchino/sticky-pull-request-comment to commit SHAs, and adds Dependabot configuration for automated updates. The primary coding objectives are met.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #578 objectives: SHA pinning for GitHub Actions and Dependabot configuration. No unrelated or out-of-scope modifications are present.
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 fix/sha-pin-actions

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

@cv
cv merged commit 66b9f55 into main Mar 25, 2026
12 checks passed
@cv
cv deleted the fix/sha-pin-actions branch March 25, 2026 22:43
lakamsani pushed a commit to lakamsani/NemoClaw that referenced this pull request Apr 4, 2026
Pin rossjrw/pr-preview-action and marocchino/sticky-pull-request-comment
to commit SHAs to prevent supply chain attacks via mutable tags.
Add dependabot config for automated GitHub Actions updates.

Fixes NVIDIA#578
@wscurran wscurran added the bug-fix PR fixes a bug or regression label Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HIGH: Third-Party GitHub Action Not SHA-Pinned with Write Permissions

3 participants