Skip to main content
ISSUE-701HighThird-party actions

Third-party action is not pinned by commit SHA

Control:CTRL-701Third-party actions must be pinned by commit SHA

📋 What is this?

A workflow step (or a job-level reusable-workflow call) references a third-party action by a mutable ref (tag like v4 or branch like main) instead of a 40-character commit SHA. A tag backed by an immutable release is accepted: it can never be moved or deleted.

⚠️ Impact

Tag and branch refs are mutable. The March 2025 tj-actions/changed-files compromise (CVE-2025-30066) retagged a stable version to point at malicious code that exfiltrated repo secrets from every CI run consuming the action, and there were thousands of them.

🔧 How to fix

Replace each uses: owner/repo@vX with uses: owner/repo@<40-char-sha> # vX.Y.Z, or, when the action publishes immutable releases, reference the exact released tag (uses: owner/repo@v4.2.1). Use Dependabot or Renovate to bump the SHA when upstream releases.

✗ BeforeAny of these tags can be moved upstream and start serving different code.
# .github/workflows/test.yml: ❌ Mutable refs everywhere
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: tj-actions/changed-files@v45
- uses: some-third-party/action@main
✓ AfterEvery `uses:` carries a full SHA; the trailing comment names the release.
# .github/workflows/test.yml: ✅ Pinned by SHA
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: tj-actions/changed-files@cc733854b1f224978ef800d29e4709d5ee2883e4 # v46.0.5
- uses: some-third-party/action@a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4 # v2.1.0

💡 Tips

  • A tag backed by an immutable release counts as pinned, for steps and reusable workflows. Only the exact released tag qualifies: docker/build-push-action@v7.4.0 is accepted, the floating @v7 (no release behind it) is not, and neither is a tag that a same-named branch shadows. Plumber reads the release with GET /repos/{owner}/{repo}/releases/tags/{tag}, so this needs a GitHub token. Without one, or when the release cannot be read, the reference is reported. Accepted references are listed in the JSON report under actionPinningResult.immutableReleaseRefs with pinnedVia: immutable_release.
  • List actions and github under trustedOwners to skip the rule for first-party GitHub-owned actions.
  • Local actions (uses: ./.github/actions/foo) are exempt from this rule because the local reference itself lives in the same repo, but a third-party action it pulls in through that local composite is judged like any other nested reference.
  • This control skips uses: docker://… steps and leaves them out of actionRefsTotal / actionRefsUnpinned. ISSUE-101, ISSUE-102 and ISSUE-103 judge their images.
  • Pair with ISSUE-702, ISSUE-707 and ISSUE-709 for a complete supply-chain ruleset (archived repos, impostor SHAs, stale pins).
  • This control also judges references pulled in by a composite action or a called workflow, at the same severity, with the chain in the message and a link to the container. See Nested references.

⚙️ Configure this control

On the Plumber Platform: open the Policies page and set control CTRL-701 on the policy that governs the project.

With the CLI alone: set it in your configuration file. Every field and default is in the controls configuration reference, CTRL-701.