Skip to content

ci: pin third-party actions to commit SHAs - #8439

Open
alexisLefebvre wants to merge 1 commit into
api-platform:4.3from
alexisLefebvre:pin-github-actions-sha
Open

ci: pin third-party actions to commit SHAs#8439
alexisLefebvre wants to merge 1 commit into
api-platform:4.3from
alexisLefebvre:pin-github-actions-sha

Conversation

@alexisLefebvre

Copy link
Copy Markdown
Contributor
Q A
Branch? 4.3
Bug fix? no
New feature? no
Deprecations? no
Issues
License MIT
Doc PR

What

Every third-party GitHub Action used by the workflows is now referenced by its full commit SHA instead of a mutable tag, with the resolved version kept as a trailing comment so it stays readable and Dependabot-updatable.

Version levels are unchanged — each SHA is the current head of the major tag already in use. The one behavioural change is elastic/elastic-github-actions/elasticsearch, previously tracking master: it has no tags upstream, so it is pinned to the current master head.

Why

A tag is a movable pointer. Anyone who can push to an action's repository — its maintainer, or an attacker holding a compromised account or token — can repoint v6 at arbitrary code, which then runs inside these workflows with access to their secrets and, for pull_request_target jobs, write-scoped tokens. This is the supply-chain vector behind the tj-actions/changed-files compromise. A commit SHA is immutable, so what CI executes is what was reviewed here.

Dependabot's github-actions ecosystem is already enabled and understands the <sha> # <version> form, so updates keep arriving as regular PRs.

🤖 Generated with Claude Code

Mutable tags let an upstream maintainer or a compromised account
change what runs in CI without any change here. SHAs remove that,
and Dependabot still bumps them monthly via the trailing version
comment.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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