fix: pin GitHub Actions dependencies to SHA hashes#112
Merged
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>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves supply-chain security hygiene by pinning GitHub Actions workflow dependencies to immutable commit SHA hashes (instead of mutable version tags), and includes a couple of small text/formatting tweaks in the Python code and Docker metadata.
Changes:
- Pin
actions/*dependencies in multiple GitHub Actions workflows to full commit SHAs with inline version comments. - Update
super-linter/super-linterreference in the linter workflow (note: this is also a version bump). - Fix spelling of “occurring” in user-facing descriptions and adjust an auth error raise formatting.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
measure_innersource.py |
Fix docstring spelling (“occurring”). |
auth.py |
Reformat ValueError raise message for missing auth env vars. |
Dockerfile |
Fix spelling in image/action labels (“occurring”). |
.github/workflows/stale.yaml |
Pin actions/stale to a commit SHA with version comment. |
.github/workflows/scorecard.yml |
Pin actions/checkout and actions/upload-artifact to commit SHAs. |
.github/workflows/python-package.yml |
Pin actions/checkout and actions/setup-python to commit SHAs. |
.github/workflows/linter.yaml |
Pin actions/checkout and actions/setup-python; also updates super-linter SHA/version. |
.github/workflows/docker-image.yml |
Pin actions/checkout to a commit SHA. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Zack Koppert <zkoppert@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.
Pull Request
Proposed Changes
All GitHub Actions workflow files were using version tags (e.g.,
@v6.0.2) instead of pinned SHA hashes, creating a supply chain security risk where tags could be moved to point at different commits.Changes Made
Pinned all GitHub Actions dependencies to immutable SHA hashes with inline version comments for maintainability:
de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0997185467fa4f803885201cee163a9f38240193d # v10.1.1Files Updated
.github/workflows/scorecard.yml.github/workflows/linter.yaml.github/workflows/docker-image.yml.github/workflows/python-package.yml.github/workflows/stale.yamlOther actions (ossf/scorecard-action, github/codeql-action, super-linter, github/contributors, peter-evans/create-issue-from-file, github/ospo-reusable-workflows) were already using SHA hashes.
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,maintenance, orbreakingOriginal prompt