Skip to content

ci: pin GitHub Actions to commit SHAs - #57

Merged
desaintmartin merged 1 commit into
mainfrom
ci/pin-actions-sha
Oct 2, 2026
Merged

desaintmartin merged 1 commit into
mainfrom
ci/pin-actions-sha

Conversation

@desaintmartin

Copy link
Copy Markdown
Member

Why

Tags are mutable. A compromised action owner can move a tag and run code with the workflow secrets. A full commit SHA is immutable.

What

  • Pins 16 action references to full commit SHAs. A comment gives the exact release tag.
  • Floating tags (for example @v4) resolve to the newest release in the same major. No major version changes.
  • pypa/gh-action-pypi-publish already had a SHA. It gets a # v1.4.2 tag comment.
  • Old majors stay: actions/checkout@v2, actions/setup-python@v2, azure/setup-helm@v1, github/codeql-action/*@v1. CodeQL v1 is deprecated. A separate change must upgrade it.
  • Adds .github/dependabot.yml with the github-actions ecosystem, weekly. Dependabot keeps the SHAs and the tag comments current.

Tags are mutable. A compromised action owner can move a tag and
run code with the workflow secrets. A full SHA is immutable.

Dependabot updates the github-actions ecosystem weekly to keep the
pins current.
@desaintmartin
desaintmartin merged commit 328db47 into main Oct 2, 2026
5 checks passed
@desaintmartin
desaintmartin deleted the ci/pin-actions-sha branch October 2, 2026 14:25
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.

1 participant