GitHub Actions impostor commits slip past SHA pinning
Pinning every GitHub Action to a full 40-character commit SHA has been the standard advice for CI/CD hygiene since 2025. Two attacks this year show where that advice stops. A pinned SHA guarantees the code will not change under you. It says nothing about whether that commit belongs to the project you think you are running.
What happened
On 19 March 2026, an attacker holding stolen credentials pushed a commit to the Trivy repository that changed its actions/checkout step to point at an "imposter commit". That commit looked like part of GitHub's official checkout action but was not on any of its branches. It contained a composite action that downloaded malicious Go source from a typosquatted domain, and the Trivy release pipeline compiled it into the published v0.69.4 binaries and images. The same attacker force-pushed 76 of 77 tags in aquasecurity/trivy-action and all 7 tags in aquasecurity/setup-trivy to credential-stealing code.
The incident is tracked as CVE-2026-33634 (CVSS 4.0 score 9.4). CISA added it to the Known Exploited Vulnerabilities catalog on 26 March. The full exposure windows and safe versions are in the Trivy security advisory.
On 18 May 2026 the pattern repeated. Every version tag of actions-cool/issues-helper (53 tags) and actions-cool/maintain-one-comment (15 tags) was moved to commits that do not exist on any branch of those repositories. The payload read the memory of the runner process to pull out decrypted workflow secrets and sent them to an external server.
Why the pin did not help
GitHub stores forks of a repository in a shared network, so a commit pushed to a fork, or a commit left dangling outside any branch, can still be fetched by SHA through the original repository's name. A reference like actions/checkout@70379aad... is a valid 40-character SHA, it passes the organisation-level "require SHA pinning" policy GitHub introduced in August 2025, and it will never change. It just was never written by the people who maintain actions/checkout.
Pinning has a real track record. When tj-actions/changed-files (CVE-2025-30066) had its tags repointed in March 2025, teams pinned to older SHAs were not affected. The weakness is narrower: a pin freezes code, it does not prove where the code came from. Actions that build a container from a Dockerfile or download tools when they run add another gap, because those inputs were never part of the pinned commit.
What GitHub changed
GitHub released workflow dependency lockfiles in public preview on 14 October 2026 and made them generally available on 28 October. A lockfile at .github/workflows/actions.lock, generated with the gh actions-lock CLI extension, records the exact commit for every action and its transitive dependencies, together with the source repository's owner and repository IDs. GitHub's documentation says a commit that exists only in a fork, or that is no longer reachable from the recorded branch or tag, is rejected when the workflow runs. That directly blocks the fork-only impostor trick.
Lockfiles do not judge whether the locked code is safe, and GitHub says so in its announcement. Reusable workflow calls are not covered and still need their own SHA pins, and inputs, secrets and the runner image sit outside the lockfile.
What to do now
- Search your workflows for
aquasecurity/trivy-action,aquasecurity/setup-trivy,actions-cool/issues-helperandactions-cool/maintain-one-comment. If any ran during the exposure windows, treat every secret those jobs could reach as stolen and rotate it. Look for repositories namedtpcp-docsin your organisation, a sign the Trivy payload's fallback exfiltration fired. - Move to known-safe versions: Trivy 0.69.3 or earlier (or any later clean release),
trivy-action0.35.0 or later,setup-trivy0.2.6 as recreated. - Keep SHA pinning, and check each pinned SHA appears on a branch or release tag of the upstream repository before you accept it.
- Generate a lockfile with
gh actions-lockand turn on the "Require lockfile" policy where your plan supports it. - Give workflow tokens the smallest permissions that work, and keep long-lived cloud keys out of jobs that run third-party actions.
Pipeline files are code, and our AI-assisted code review reads `.
