Skip to content

Replace all external github action runner tags with hashes#361

Merged
sirbrillig merged 1 commit into2.xfrom
pin-action-runner-versions
Mar 9, 2026
Merged

Replace all external github action runner tags with hashes#361
sirbrillig merged 1 commit into2.xfrom
pin-action-runner-versions

Conversation

@sirbrillig
Copy link
Owner

This PR pins all GitHub Actions action runners to full commit SHAs rather than mutable version tags. This protects against supply chain attacks where a compromised action author could push malicious code under an existing tag (e.g. v2) and have it silently execute in CI with access to repository tokens.

Each pinned SHA has the corresponding version tag noted in a comment for readability.

Actions pinned:

  • actions/checkout @ v6
  • shivammathur/setup-php @ v2
  • ramsey/composer-install @ v3
  • coverallsapp/github-action @ v2
  • phpcsstandards/xmllint-validate @ v1

@sirbrillig sirbrillig self-assigned this Mar 9, 2026
@sirbrillig sirbrillig merged commit 51eedc0 into 2.x Mar 9, 2026
66 checks passed
@sirbrillig sirbrillig deleted the pin-action-runner-versions branch March 9, 2026 23:00
@jrfnl
Copy link
Collaborator

jrfnl commented Mar 9, 2026

@sirbrillig Sorry for the confusion, but this PR is not the right way to do this.

The v# branches/tags are moving tags/branches, which I expect will mean that you've now effectively disabled Dependabot.

Would you like me to submit a PR to fix this ?

@sirbrillig
Copy link
Owner Author

@jrfnl Oh! Sorry. I misunderstood. My understanding was that Dependabot handled hard-coded branch hashes but I don't have a ton of experience with action runners. Yes, if you have time to submit a PR I'd be happy to accept it, or if it would be easier just let me know what you mean and I can try to implement it.

@jrfnl
Copy link
Collaborator

jrfnl commented Mar 10, 2026

@sirbrillig Simpler to PR it than to explain. See #362

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants