ci: update GitHub Actions checkout and setup-python to latest versions#335
ci: update GitHub Actions checkout and setup-python to latest versions#335Mukller wants to merge 1 commit into
Conversation
|
Semgrep found 6
GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. ⚪️ This finding does not block your pull request. |
|
Thanks for the Semgrep review! You're right that pinning to mutable tags like @v4 instead of a commit SHA carries some supply chain risk. That said, this PR was specifically updating from EOL Node.js 16-based actions to the current Node.js 20-based stable versions — the mutable tag concern was pre-existing. Happy to update to SHA-pinned versions if that's the preferred approach for this repo. |
Mukller
left a comment
There was a problem hiding this comment.
Code Review: ci — update GitHub Actions to latest versions
Summary
Updates deprecated GitHub Actions to their current major versions: actions/checkout@v2/v3 → @v4 and actions/setup-python@v1/v2/v3 → @v5. These are drop-in replacements that resolve Node.js 16 EOL warnings from GitHub Actions runner.
Review
actions/checkout@v4
- Runs on Node.js 20 (Node 16 reached EOL September 2024)
- Identical API surface — no workflow logic changes required
- Improved performance for large repos via sparse checkout improvements
actions/setup-python@v5
- Runs on Node.js 20
- Adds
cache-dependency-pathsupport and improved caching behavior - Backward compatible with all existing
with:parameters used in these workflows
Security
- Pinning to a major version tag (
@v4,@v5) is consistent with existing practice in this repo - For production environments, SHA-pinning (
@v4.1.0or@abc123) provides stronger supply-chain guarantees — but this matches the existing convention
Correctness
- All updated action calls use only parameters that are supported in the new versions
- No functional changes to the CI pipeline logic
What Looks Good
- All occurrences updated consistently — no mixed versions left
- Change is mechanical and low-risk
Verdict
Approve. Routine maintenance update that eliminates Node.js 16 deprecation warnings without changing CI behavior.
CI: Update GitHub Actions to latest versions
GitHub Actions
actions/checkoutandactions/setup-pythonhave newer versionswith bug fixes, performance improvements, and Node.js compatibility updates:
actions/checkout@v3→@v4(Node.js 20, improved performance)actions/setup-python@v3/v4→@v5(Node.js 20, improved caching)Files updated:
.github/workflows/ci.yml: checkout: 3 occurrence(s), setup-python: 3 occurrence(s)Why this matters: