Skip to content

chore: Pin GitHub Actions jobs to SHA hashes for security.#3260

Open
connorshea wants to merge 1 commit intomainfrom
run-zizmor
Open

chore: Pin GitHub Actions jobs to SHA hashes for security.#3260
connorshea wants to merge 1 commit intomainfrom
run-zizmor

Conversation

@connorshea
Copy link
Copy Markdown
Member

@connorshea connorshea commented May 8, 2026

Motivation / Background

This PR has been created to pin GitHub Actions to SHA hashes, to prevent supply chain attacks if any of these Actions end up compromised and release a new version with malicious code.

It'd be a good idea to also enforce that SHA hashes be used in the repo settings, if that's desired.

I've updated all of the actions used to their latest versions (most already were there).

Dependanbot will still be able to update these actions and will keep the SHA hashes accordingly.

I've also set persist-credentials: false on some uses of checkout actions that didn't need it.

All of these were detected/partially auto-fixed by Zizmor: https://github.com/zizmorcore/zizmor

Additional information

We could opt not to do this, but there aren't really any downsides that I'm aware of.

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug, refactor something, or add a feature.
  • Tests and Rubocop are passing before submitting your proposed changes.

And also set `persist-credentials: false` on some uses of checkout actions that didn't need it.

These were detected/partially auto-fixed by Zizmor: https://github.com/zizmorcore/zizmor
Copilot AI review requested due to automatic review settings May 8, 2026 01:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Pins GitHub Actions used by the repo’s CI workflows to specific commit SHAs and tightens checkout behavior to reduce supply-chain risk and avoid persisting credentials where not needed.

Changes:

  • Pin actions/checkout, ruby/setup-ruby, and github/codeql-action to commit SHAs (with version comments).
  • Set persist-credentials: false for actions/checkout steps across workflows.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.github/workflows/ruby.yml Pin checkout/setup-ruby actions to SHAs; disable persisted credentials for checkout in test/lint jobs.
.github/workflows/codeql.yml Pin checkout and CodeQL actions to SHAs; disable persisted credentials for checkout.
.github/workflows/bench.yml Pin checkout/setup-ruby actions to SHAs; disable persisted credentials for checkout.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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