ci: pin GitHub Actions to commit SHAs for supply chain security #56
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.
Problem
OpenSSF Scorecard gives 0/10 for Pinned-Dependencies because GitHub Actions are referenced by mutable version tags (e.g.,
@v5) instead of immutable commit SHAs.Solution
Pin all GitHub Actions to specific commit SHAs to prevent supply chain attacks. Each pinned SHA includes a comment with the original version tag for maintainability.
Pinned Actions
actions/checkout@v5→@08c6903...actions/create-github-app-token@v2→@6701853...actions/setup-python@v6→@e797f83...actions/upload-artifact@v4→@ea165f8...amannn/action-semantic-pull-request@v6→@48f2562...astral-sh/setup-uv@v7→@8585678...codecov/codecov-action@v5→@5a10915...github/codeql-action/*@v3→@5d5cd55...github/codeql-action/*@v4→@0499de3...ossf/scorecard-action@v2.4.3→@4eaacf0...pypa/gh-action-pypi-publish@release/v1→@ed0c539...Expected Impact
Pinned-Dependencies score: 0 → 10
This will improve the overall OpenSSF Scorecard from 6.5/10 to 7.5/10.
Testing
All workflow files validated by yamllint. CI tests will verify workflows still function correctly with pinned SHAs.
Maintenance
When updating action versions:
uses: actions/checkout@<new-sha> # v6Dependabot will notify when actions have new releases, but won't auto-update pinned SHAs.
🤖 Generated with Claude Code