Pin all GitHub Actions versions using pinact#4354
Open
borchero wants to merge 1 commit intoactions:mainfrom
Open
Pin all GitHub Actions versions using pinact#4354borchero wants to merge 1 commit intoactions:mainfrom
pinact#4354borchero wants to merge 1 commit intoactions:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the security posture of the repository’s GitHub Actions workflows by pinning all referenced actions to specific commit SHAs (generated via pinact), and removes the floating master reference for actions/create-release by switching to a fixed release version (also SHA-pinned).
Changes:
- Pin all
uses:references in workflows to commit SHAs (with version comments for traceability). - Replace
actions/create-release@masterwith a pinned release version. - Apply the above consistently across CI, release, dependency automation, CodeQL, and bot workflows.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/stale-bot.yml |
Pin actions/stale to a commit SHA. |
.github/workflows/release.yml |
Pin all actions (checkout, github-script, artifacts, docker actions, attestations) and replace actions/create-release@master with a pinned release SHA. |
.github/workflows/npm-audit.yml |
Pin checkout and setup-node to SHAs. |
.github/workflows/npm-audit-typescript.yml |
Pin checkout and setup-node to SHAs. |
.github/workflows/node-upgrade.yml |
Pin checkout to a SHA. |
.github/workflows/dotnet-upgrade.yml |
Pin checkout to a SHA in both jobs. |
.github/workflows/docker-publish.yml |
Pin checkout/github-script/docker actions/attestation to SHAs. |
.github/workflows/docker-buildx-upgrade.yml |
Pin checkout to a SHA in both jobs. |
.github/workflows/dependency-check.yml |
Pin checkout and setup-node to SHAs. |
.github/workflows/codeql.yml |
Pin checkout and CodeQL init/analyze actions to SHAs. |
.github/workflows/close-features-bot.yml |
Pin actions/stale to a commit SHA. |
.github/workflows/close-bugs-bot.yml |
Pin actions/stale to a commit SHA. |
.github/workflows/build.yml |
Pin checkout, upload-artifact, github-script, and docker actions to SHAs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
It is generally good practice (see e.g. this post) to pin actions to their commit SHAs to prevent the execution of malicious code.
This change would not only make the use of actions more secure in this repo, but also allow to more easily maintain forks in organizations where SHA pinning is enforced.
Changes
masterreference foractions/create-releasewith the latest release tag