Skip to content

CI actions pinned to mutable version tags instead of immutable SHAs #230

Closed

Description

@ooloth

Why

GitHub Actions pinned to floating tags like @v4 or @stable resolve to whatever commit the upstream maintainer points that tag at, so a compromised or silently-updated action alters CI behaviour without any visible change in this repository.

Current state

.github/workflows/ci.yml lines 12–18 reference actions/checkout@v4, dtolnay/rust-toolchain@stable, and Swatinem/rust-cache@v2. These are mutable tags: the upstream maintainer can move them to any commit at any time. If a tag is silently moved to a broken or malicious commit, CI picks it up on the next run with no review gate and no diff visible in this repo.

Ideal state

  • Each uses: entry in .github/workflows/ci.yml is pinned to a full 40-character commit SHA (e.g. actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683)
  • Each pinned SHA has a comment beside it naming the version it pins (e.g. # v4)
  • CI behaviour changes only when a PR in this repository explicitly updates a SHA
  • A CI failure or security incident caused by an upstream action change is impossible without a visible diff in .github/workflows/ci.yml

Starting points

  • .github/workflows/ci.yml lines 12–18: the uses: entries for each action

QA plan

  1. Read .github/workflows/ci.yml — expect all uses: entries to contain full 40-character SHAs, not tag names or branch names
  2. Push a test branch and observe CI — expect it to pass with the pinned actions
  3. For each pinned SHA, verify it corresponds to the expected tag by looking up the commit on the upstream GitHub repository

Done when

All uses: entries in .github/workflows/ci.yml reference immutable commit SHAs rather than mutable version tags.

Activity

  1. ooloth commented on Nov 5, 2026

    @ooloth
    OwnerAuthor

    Finished by #401 (merged as 5c7dec4). Every uses: entry in .github/workflows/ci.yml is pinned to a full commit SHA with its version in a comment, and a rustup step replaces dtolnay/rust-toolchain. The repository now also requires actions pinned to a full-length commit SHA, so a workflow that uses a tag fails. Dependabot proposes new pins.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions