Pin actions to full-length commit SHAs#190
Merged
data-douser merged 3 commits intomainfrom Mar 27, 2026
Merged
Conversation
This commit: - pins each GitHub Action, regardless of publisher/maintainter, to its full-length commit SHA (instead of tag) to ensure that all actions refs are immutable; - updates the .github/instructions/*.md for actions and workflows;
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. OpenSSF Scorecard
Scanned Files
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the repository’s CI/CD security posture by making all external GitHub Action references immutable (pinning to full commit SHAs) and updating Copilot workflow-editing instructions accordingly.
Changes:
- Pin external
uses:references in workflows and composite actions to full 40-character commit SHAs with trailing# <tag>comments. - Update Copilot instructions to require SHA pinning (and expand scope to include
.github/actions/YAML).
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/update-codeql.yml | Pin actions/checkout and actions/setup-node to commit SHAs (plus comment tags). |
| .github/workflows/release.yml | Pin actions/download-artifact and actions/upload-artifact to commit SHAs. |
| .github/workflows/release-vsix.yml | Pin checkout/setup-node/upload-artifact to commit SHAs. |
| .github/workflows/release-tag.yml | Pin checkout/setup-node to commit SHAs. |
| .github/workflows/release-npm.yml | Pin checkout/setup-node/upload-artifact to commit SHAs. |
| .github/workflows/release-codeql.yml | Pin checkout/upload-artifact to commit SHAs. |
| .github/workflows/query-unit-tests.yml | Pin checkout/setup-node to commit SHAs. |
| .github/workflows/query-unit-tests-swift.yml | Pin checkout/setup-node to commit SHAs. |
| .github/workflows/lint-and-format.yml | Pin checkout/setup-node to commit SHAs. |
| .github/workflows/dependency-review.yml | Pin checkout and dependency-review-action to commit SHAs. |
| .github/workflows/copilot-setup-steps.yml | Pin checkout/setup-node/cache to commit SHAs. |
| .github/workflows/client-integration-tests.yml | Pin checkout/setup-node to commit SHAs in both jobs. |
| .github/workflows/build-server.yml | Pin checkout/setup-node to commit SHAs. |
| .github/workflows/build-and-test-extension.yml | Pin checkout/setup-node/cache to commit SHAs. |
| .github/skills/add-mcp-support-for-new-language/workflow-template.yml | Pin checkout and CodeQL init action to commit SHAs. |
| .github/instructions/github_workflows_yaml.instructions.md | Require SHA pinning and broaden instructions’ intended scope to actions/workflows YAML. |
| .github/actions/setup-codeql-environment/action.yml | Pin setup/caching/runtime actions inside the composite action to commit SHAs. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nathan Randall <70299490+data-douser@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nathan Randall <70299490+data-douser@users.noreply.github.com>
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.
This PR:
Outline of Changes
Key changes include:
Security and Workflow Best Practices
.github/workflows/and.github/actions/are now pinned to their full 40-character commit SHAs, with a trailing comment indicating the original tag (e.g.,# v6). This applies to actions such asactions/checkout,actions/setup-node,actions/cache,actions/setup-python,actions/setup-java,actions/setup-go,actions/setup-dotnet,ruby/setup-ruby,actions/dependency-review-action, andactions/upload-artifact. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26]Documentation and Instructions Update
.github/instructions/github_workflows_yaml.instructions.mdis updated to:.github/workflows/and.github/actions/directories.These changes significantly improve the security posture of the repository’s CI/CD pipelines and provide clear guidance for future workflow edits.