Repository navigation
ci: pin remote actions to immutable commits - #18
Merged
Merged
Conversation
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
Pin 15 mutable GitHub Actions references to full 40-character commit SHAs. Tags (including version tags such as
v4) and branches can be moved by an upstream maintainer or an attacker with control of that account, changing code that runs with CI credentials without a change in this repository. Commit pins make action-source updates explicit and reviewable.Changes
Action pins / Check immutable action referenceson pull requests, default-branch pushes, and manual dispatch. It parses YAML in tracked workflows andaction.yml/action.yamlfiles, including composite actions and reusable workflow references, and rejects remote references without a full commit SHA (or a SHA-256 digest for Docker actions).ubuntu-24.04, with a pinned checkout, read-only contents permission, and no persisted checkout credentials or downloaded linter dependencies.Based on
tlon/multi-sessionat66817cfec3eae2b5241066932421bb02f417c75e. Reference resolution date: 2026-11-06.How did I test?
Risks and impact
The action commits are the current targets of the existing references, not major-version upgrades. Pinning prevents future ref movement; it does not establish that upstream code is trustworthy or freeze packages, container images, binaries, or nested actions downloaded by that code. Existing shell installers and job/service container tags need a separate review. Action updates now require changing the SHA explicitly.
Make Check immutable action references a required status check in branch protection/rulesets to block merges that fail it. This PR adds the check but does not change repository or organization settings. Application builds and deployments are not run locally for this workflow-only change.
GitHub recommends full-length commit SHA pins.
Rollback plan
Revert this commit. This restores mutable references and removes the pin check.
Screenshots
Not applicable; CI configuration only.