Skip to content

Pin GitHub Actions to commits instead of tags#2243

Merged
priteau merged 14 commits intostackhpc/2025.1from
pin-actions
Apr 2, 2026
Merged

Pin GitHub Actions to commits instead of tags#2243
priteau merged 14 commits intostackhpc/2025.1from
pin-actions

Conversation

@Alex-Welsh
Copy link
Copy Markdown
Member

Updates all actions that were previously pinned to a tag, to be pinned to the latest commit hash

This is to mitigate the risk of supply chain attacks that target upstream GitHub actions, and avoid node 20 deprecation warnings at the same time.

@Alex-Welsh Alex-Welsh requested a review from a team as a code owner March 31, 2026 10:32
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

Copy link
Copy Markdown
Member

@seunghun1ee seunghun1ee left a comment

Choose a reason for hiding this comment

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

Can you comment which version or tag each SHA is pointing at? (If that's available)

Pins actions/checkout to v6.0.2 commit hash instead of the tag.
…a40e8e0b5a5461e7c

Updates actions/download-artifact from v7 to v8.0.1 and pins to a specific commit hash instead of the tag.
Pins actions/setup-python to v6.2.0 commit hash instead of the tag.
…fdaad77386f024f

Updates actions/upload-artifact from v6 to v7.0.0 and pins to a specific commit hash instead of the tag.
…6d141179aa583294

Updates docker/build-push-action from v6 to v7.0.0 and pins to a specific commit hash instead of the tag.
…00b2ab88fb2

Updates docker/login-action from v3 to v4.0.0 and pins to a specific commit hash instead of the tag.
…a6bfe6a94e05cf

Updates docker/metadata-action from v5 to v6.0.0 and pins to a specific commit hash instead of the tag.
…baf45bbb4f8b9deedd

Updates docker/setup-buildx-action from v3 to v4.0.0 and pins to a specific commit hash instead of the tag.
…c25e6d187d

Updates dorny/paths-filter from v3 to v4.0.1 and pins to a specific commit hash instead of the tag.
…8fb23f2ac83bb6c85

Updates hashicorp/setup-terraform from v3 to v4.0.0 and pins to a specific commit hash instead of the tag.
…9d195d2ece0

Pins peter-evans/create-pull-request to v8.1.0 commit hash instead of the tag.
…162a307590698245be95

Updates slackapi/slack-github-action from v1.26.0 to v3.0.1 and pins to a specific commit hash instead of the tag.
Actions have been compromised a lot recently. All this action does is
install packages, so it's not worth the risk. Just install the packages
directly in the workflow.
@Alex-Welsh
Copy link
Copy Markdown
Member Author

Can you comment which version or tag each SHA is pointing at? (If that's available)

Done, also got Gemini to script the process so it's faster and less susceptible to dumb Alex errors. New script pulls the head commit from the latest release, so it's a bit smarter as well. Gist is here

I've also tweaked the the slack action invocation because it was jumping a few versions, so needed a fix

@priteau priteau merged commit aa80e4e into stackhpc/2025.1 Apr 2, 2026
30 of 35 checks passed
@priteau priteau deleted the pin-actions branch April 2, 2026 14:14
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.

3 participants