ci: pin third-party GitHub Actions to commit SHAs#372
Merged
Conversation
Pin all external GitHub Actions to immutable commit SHAs (with a trailing version comment) rather than mutable version tags, following GitHub's security-hardening guidance. A mutable tag such as @v6 can be retargeted at malicious code if the action's repository is compromised (as in the March 2025 tj-actions/changed-files incident); a full commit SHA is immutable, so each run is reproducible and immune to tag-move attacks. Also add a 7-day Dependabot cooldown so action updates aren't picked up until they have been published for a week. Dependabot continues to maintain the pins, bumping both the SHA and the version comment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
Self-merging. We only use official GitHub Actions in this repository, so the actual risk is low; this is more about establishing the convention. |
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.
Summary
Hardens CI supply-chain security by pinning all external GitHub Actions to immutable commit SHAs instead of mutable version tags, and adds a Dependabot cooldown. This mirrors enthought/envisage#604.
Why
A
uses: owner/repo@v6reference resolves through a mutable git tag. If an attacker compromises an action's repository — or just gains the ability to move a tag — they can retargetv6at malicious code, and every workflow pinned to that tag runs it on the next CI run, with access to that job's secrets. This is what happened in the March 2025tj-actions/changed-filescompromise, where version tags were retroactively moved to a commit that exfiltrated CI secrets. Full-SHA pins are immutable, so each run is reproducible and immune to tag-move attacks. Follows GitHub's security-hardening guidance.Changes
Pin all external actions to commit SHAs with a trailing version comment:
actions/checkoutdf4cb1cactions/setup-pythonece7cb0actions/cache55cc834enthought/setup-edm-actione68a4e0Add a 7-day Dependabot cooldown (
cooldown: default-days: 7) so action updates aren't picked up until they've been published for a week, reducing exposure to a compromised release that gets yanked shortly after publication.Dependabot continues to maintain the SHA pins, bumping both the SHA and the version comment. The pinned versions match what apptools already used (checkout/setup-python/cache v6, setup-edm-action v4.2); this change is functionally a no-op beyond the pinning itself.
🤖 Generated with Claude Code