Skip to content

Update GitHub Actions to pinned SHA versions#571

Merged
lukebakken merged 1 commit intorabbitmq:mainfrom
lukebakken:lukebakken/check-actions-versions
Jan 12, 2026
Merged

Update GitHub Actions to pinned SHA versions#571
lukebakken merged 1 commit intorabbitmq:mainfrom
lukebakken:lukebakken/check-actions-versions

Conversation

@lukebakken
Copy link
Copy Markdown
Collaborator

The workflow files use unpinned action versions (e.g., @v2, @v1), which can introduce breaking changes or security vulnerabilities when action maintainers publish new releases under the same tag.

This change updates all GitHub Actions to use pinned SHA versions with version comments for readability:

  • actions/checkout@v2@8e8c483 (v6.0.1)
  • erlef/setup-beam@v1@e6d7c94 (v1.20.4)
  • actions/upload-artifact@v4@b7c566a (v6.0.0)
  • ncipollo/release-action@v1.13.0@b7eabc9 (v1.20.0)
  • peter-evans/repository-dispatch@v2@2895959 (v4.0.1)

Additionally, this adds a new workflow and script to detect outdated actions automatically. The check-actions-updates.sh script uses actions-up to identify available updates and fails the workflow when updates are found, ensuring the team is notified to keep actions current.

The workflow files use unpinned action versions (e.g., `@v2`, `@v1`),
which can introduce breaking changes or security vulnerabilities when
action maintainers publish new releases under the same tag.

This change updates all GitHub Actions to use pinned SHA versions with
version comments for readability:

- `actions/checkout@v2` → `@8e8c483` (v6.0.1)
- `erlef/setup-beam@v1` → `@e6d7c94` (v1.20.4)
- `actions/upload-artifact@v4` → `@b7c566a` (v6.0.0)
- `ncipollo/release-action@v1.13.0` → `@b7eabc9` (v1.20.0)
- `peter-evans/repository-dispatch@v2` → `@2895959` (v4.0.1)

Additionally, this adds a new workflow and script to detect outdated
actions automatically. The `check-actions-updates.sh` script uses
`actions-up` to identify available updates and fails the workflow when
updates are found, ensuring the team is notified to keep actions current.
@lukebakken lukebakken self-assigned this Jan 9, 2026
@kjnilsson
Copy link
Copy Markdown
Contributor

Thanks @lukebakken - how would we ever know if any dep is poison before we update and run it?

@lukebakken
Copy link
Copy Markdown
Collaborator Author

lukebakken commented Jan 12, 2026

how would we ever know if any dep is poison before we update and run it?

Are you concerned about the SHAs? The actions-up program does what it intends. There's no auto-updating happening here either - the only thing the workflow does is fail if there's an update, then someone has to come along and do the work manually.

I could add a "double-check" to verify that the referenced SHA actually does point to a tag in the linked repo... which is, again, what actions-up does but I suppose trusting a node/npm-based app requires more faith than it should 😸

@lukebakken lukebakken marked this pull request as draft January 12, 2026 14:13
@lukebakken lukebakken marked this pull request as ready for review January 12, 2026 14:13
@kjnilsson
Copy link
Copy Markdown
Contributor

Are you concerned about the SHAs? The actions-up program does what it intends. There's no auto-updating happening here either - the only thing the workflow does is fail if there's an update, then someone has to come along and do the work manually.

Just wonder how I (a mere mortal) can ensure that the updated versions are ok to use (from a security POV).

@lukebakken
Copy link
Copy Markdown
Collaborator Author

Just wonder how I (a mere mortal) can ensure that the updated versions are ok to use (from a security POV)

How does anyone do it now? 🤷‍♂️

@kjnilsson
Copy link
Copy Markdown
Contributor

How does anyone do it now? 🤷‍♂️

not a scoobie :)

Copy link
Copy Markdown
Collaborator

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

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

I think dependabot might be able to create update PRs for this? I'm not totally sure what dependabot will do with actions tied to revisions but this old issue makes me think it might work: dependabot-core#4691

@lukebakken
Copy link
Copy Markdown
Collaborator Author

Yeah I put together this process to avoid setting up any bots 😸

@lukebakken lukebakken merged commit 0361982 into rabbitmq:main Jan 12, 2026
5 checks passed
@lukebakken lukebakken deleted the lukebakken/check-actions-versions branch January 12, 2026 15:22
@michaelklishin
Copy link
Copy Markdown
Contributor

This is a very unorthodox way to managing action dependencies. In particular with automation for upgrades.

Well, maybe this is better than everyone using (and syncing once a year or so) their own forks of every popular action repository.

@kjnilsson
Copy link
Copy Markdown
Contributor

@lukebakken on reflection can we not have this run for every PR build but rather as a separate daily job?

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.

4 participants