fix: pin GitHub Actions to SHA hashes for supply chain security#332
Merged
fix: pin GitHub Actions to SHA hashes for supply chain security#332
Conversation
Co-authored-by: zkoppert <6935431+zkoppert@users.noreply.github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
There was a problem hiding this comment.
Pull request overview
This PR aims to improve supply-chain security by replacing mutable GitHub Action version tags in workflows with immutable commit SHAs (optionally annotated with version comments).
Changes:
- Pin
actions/checkout,actions/setup-python,actions/upload-artifact, andactions/staleto full-length commit SHAs with inline version comments in multiple workflows. - Update the
super-linterworkflow action reference to a different SHA and add a version comment. - Minor non-workflow edits: Python formatting tweaks and a small comment typo fix in markdown-lint config.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
test_cleanowners.py |
Reformats ASCII encoding in test fixtures (non-functional). |
cleanowners.py |
Reformats a multiline ValueError message string. |
.github/workflows/python-ci.yml |
Pins checkout and setup-python to SHAs with version comments. |
.github/workflows/docker-ci.yml |
Pins checkout to a SHA with a version comment. |
.github/workflows/scorecard.yml |
Pins checkout and upload-artifact to SHAs with version comments. |
.github/workflows/copilot-setup-steps.yml |
Pins checkout and setup-python to SHAs with version comments. |
.github/workflows/super-linter.yaml |
Pins checkout to a SHA; changes super-linter SHA and adds version comment. |
.github/workflows/stale.yaml |
Pins actions/stale to a SHA with a version comment. |
.github/linters/.markdown-lint.yml |
Fixes a comment typo (“singe” → “single”). |
Comment on lines
+60
to
+64
| raise ValueError(f"""Organization {organization} is not an organization and | ||
| REPOSITORY environment variable was not set. | ||
| Please set valid ORGANIZATION or set REPOSITORY environment | ||
| variable | ||
| """ | ||
| ) | ||
| """) |
There was a problem hiding this comment.
The multiline ValueError message includes indentation inside the triple-quoted string (the leading spaces before REPOSITORY..., Please set..., etc.), which will show up in the rendered error text and make it harder to read/copy. Consider dedenting the string or constructing it without embedded indentation so the message is clean.
See below for a potential fix:
raise ValueError(
f"Organization {organization} is not an organization and\n"
"REPOSITORY environment variable was not set.\n"
"Please set valid ORGANIZATION or set REPOSITORY environment\n"
"variable"
)
zkoppert
approved these changes
Feb 10, 2026
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.
Pull Request
Proposed Changes
GitHub Actions workflow files were using mutable version tags (e.g.,
@v6.0.2) instead of immutable SHA hashes, creating a supply chain security risk where tags could be moved to point at malicious commits.All unpinned actions have been updated to use full 40-character SHA hashes with inline version comments for readability:
actions/checkout@v6.0.2→@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2actions/setup-python@v6.2.0→@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0actions/upload-artifact@v6.0.0→@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0actions/stale@v10.1.1→@997185467fa4f803885201cee163a9f38240193d # v10.1.1Files updated:
.github/workflows/python-ci.yml.github/workflows/docker-ci.yml.github/workflows/scorecard.yml.github/workflows/copilot-setup-steps.yml.github/workflows/super-linter.yaml.github/workflows/stale.yamlSHA hashes were verified against official GitHub release tags to ensure correctness. Version comments preserve human readability while maintaining immutable references.
Readiness Checklist
Author/Contributor
make lintand fix any issues that you have introducedmake testand ensure you have test coverage for the lines you are introducing@jeffrey-luszczReviewer
fix,documentation,enhancement,infrastructure,maintenanceorbreakingOriginal prompt