Skip to content

chore: pin third-party GitHub Actions to commit SHAs#374

Merged
keelerm84 merged 3 commits intomainfrom
security/SEC-7924/pin-github-actions
Mar 24, 2026
Merged

chore: pin third-party GitHub Actions to commit SHAs#374
keelerm84 merged 3 commits intomainfrom
security/SEC-7924/pin-github-actions

Conversation

@pkaeding
Copy link
Copy Markdown
Contributor

@pkaeding pkaeding commented Mar 24, 2026

Summary

Pin all third-party GitHub Actions to full-length commit SHAs to prevent supply chain attacks.

Addresses findings from the third-party-action-not-pinned-to-commit-sha Semgrep rule.

Test plan

  • Verify CI passes with pinned action SHAs

Note

Low Risk
Low risk: this only pins external GitHub Actions to specific commit SHAs; the main risk is CI behavior changing if the pinned revisions differ from the previously floating tags.

Overview
Pins third-party GitHub Actions to immutable commit SHAs for supply-chain hardening.

Updates ruby/setup-ruby in the composite setup action and googleapis/release-please-action in the release workflow to use full commit hashes (with version comments) instead of floating version tags.

Written by Cursor Bugbot for commit 7f70e34. This will update automatically on new commits. Configure here.

Pin all third-party GitHub Actions to full-length commit SHAs to prevent
supply chain attacks. Addresses findings from the
third-party-action-not-pinned-to-commit-sha Semgrep rule.
@pkaeding pkaeding requested a review from a team as a code owner March 24, 2026 01:46
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Co-authored-by: Matthew M. Keeler <keelerm84@gmail.com>
@keelerm84 keelerm84 merged commit e7a00bb into main Mar 24, 2026
10 checks passed
@keelerm84 keelerm84 deleted the security/SEC-7924/pin-github-actions branch March 24, 2026 18:51
kinyoklion added a commit to launchdarkly/openfeature-ruby-server that referenced this pull request Mar 30, 2026
## Summary

Pin all third-party GitHub Actions to full-length commit SHAs to prevent
supply chain attacks.

Addresses findings from the
[`third-party-action-not-pinned-to-commit-sha`](https://github.com/launchdarkly/semgrep-rules/blob/main/github-actions/third-party-action-not-pinned-to-commit-sha.yml)
Semgrep rule.

### Updates since initial revision

- Version comments now use fully qualified version numbers (e.g. `#
v4.4.0` instead of `# v4`)
- `ruby/setup-ruby` bumped from v1.295.0 (`319994f...`) to **v1.299.0**
(`3ff19f5e2baf30647122352b96108b1fbe250c64`), the latest v1 release
- `googleapis/release-please-action` confirmed at **v4.4.0**
(`16a9c90856f42705d54a6fda1823352bdc62cf38`), already the latest v4
release

Release links for verification:
- [ruby/setup-ruby
v1.299.0](https://github.com/ruby/setup-ruby/releases/tag/v1.299.0)
- [googleapis/release-please-action
v4.4.0](https://github.com/googleapis/release-please-action/releases/tag/v4.4.0)

## Review & Testing Checklist for Human

- [ ] Verify the pinned SHAs match the expected release tags using the
release links above
- [ ] Confirm CI passes with the updated `ruby/setup-ruby` v1.299.0
(bumped from v1.295.0)

### Notes

- The `slsa-framework/slsa-github-generator` reference on line 61 of
`release-please.yml` remains at `@v2.0.0` (floating tag) — this action
[cannot be pinned to a commit
SHA](launchdarkly/ruby-server-sdk#374 (comment)).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: changes only pin GitHub Action references to specific
commits, with no functional logic changes beyond potential action
version drift if the pinned SHAs differ from the floating tags.
> 
> **Overview**
> Pins third-party GitHub Actions to immutable commit SHAs to harden
CI/release workflows against supply-chain tampering.
> 
> Updates `ruby/setup-ruby@v1` usages (composite CI action, Windows CI
job, and docs publish workflow) to a specific commit SHA, and similarly
pins `googleapis/release-please-action@v4` in the release workflow to a
specific `v4.4.0` commit.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
12e5cd3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Link to Devin session:
https://app.devin.ai/sessions/56bd3c6eff084ef4802aaa48b08ebab6
Requested by: @kinyoklion

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
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.

2 participants