The Certified Forgery: How Attackers Exploited the Trust Gap Behind GitHub SHA Pinning
The museum was renowned for its collection.
Every painting was carefully cataloged. Every acquisition received a unique identification number. Every piece was protected against unauthorized modification.
The conservators had developed a sophisticated verification system.
Once a painting entered the collection, its identity was recorded.
If somebody attempted to replace it with another painting, the discrepancy would be detected.
If somebody modified the original work, the verification process would reveal the alteration.
The system appeared reliable.
But somewhere outside the museum, a talented forger had discovered a weakness in its logic.
He didn’t need to replace an authenticated painting after it had entered the collection.
He needed the museum to authenticate the wrong painting in the first place.
He created a fraudulent masterpiece, associated it with a respected artist and persuaded the museum to register it.
The identification number was recorded.
The certificate was issued.
The painting was protected against modification.
Every subsequent inspection confirmed that it remained exactly the same.
But it was still a forgery.
The museum had perfected the protection of its acquisitions without perfecting the verification of their origins.
A comparable security challenge exists within modern software development.
GitHub Actions workflows frequently depend on external code. SHA pinning helps ensure that the selected code version cannot be silently replaced through a mutable reference.
However, recent software supply chain incidents have demonstrated the limitations of that protection when the selected commit is itself malicious.
The distinction is fundamental.
Immutability protects against subsequent modification.
Provenance helps establish where something came from and whether its origin can be trusted.
One cannot automatically replace the other.
Phase 1 — The Museum’s Trusted Collection
A modern software development environment resembles an enormous museum.
Its collection contains thousands of components acquired from different sources.
Some were created internally.
Others came from external developers, open-source communities or commercial vendors.
GitHub Actions allows development teams to assemble automated workflows for software testing, building, packaging and deployment.
Rather than developing every automation component themselves, organizations frequently incorporate existing actions maintained by third parties.
These dependencies accelerate development and reduce repetitive work.
But they also introduce external trust relationships.
An action may execute within a pipeline that has access to source code, repository tokens, deployment credentials or cloud infrastructure.
The security of the workflow therefore depends partly on the security of the components it incorporates.
Every new painting brought into the museum represented another decision about whom the institution was prepared to trust.
Phase 2 — The Museum Introduces Identification Numbers
Originally, the museum identified its paintings using names.
But names could be reused.
An external supplier could associate an existing name with a different painting.
The conservators needed a more reliable identification mechanism.
In GitHub Actions, a comparable problem exists with mutable tags.
A workflow can reference a third-party action using a version tag. However, that tag may later point to a different commit.
SHA pinning addresses this risk by referencing a specific commit identifier instead.
The selected reference remains associated with that particular revision rather than following subsequent tag changes.
This provides an important integrity safeguard.
An attacker who compromises a maintainer account and redirects a version tag cannot automatically redirect a workflow that is already pinned to an uncompromised commit.
The museum had stopped relying on the name written beneath the painting. It had started identifying the painting itself.
Phase 3 — The Security System Proves Its Worth
In March 2025, the museum’s new security philosophy demonstrated its value.
The compromise of tj-actions/changed-files illustrated how dangerous mutable dependencies could become.
Attackers redirected action tags toward malicious code, threatening workflows across more than 23,000 repositories using the affected action.
Workflows referencing unaffected commit SHAs were protected against that particular tag-manipulation mechanism.
The incident reinforced the importance of pinning dependencies.
GitHub subsequently provided organization-level controls that allow administrators to require SHA-pinned actions.
For many security teams, this represented a significant improvement in software supply chain protection.
And it was.
But the success of the mechanism also encouraged a dangerous assumption.
Some organizations began treating the presence of a pinned SHA as evidence that an action was trustworthy.
The museum had successfully prevented someone from replacing its paintings. It began to believe that this also protected it against acquiring forgeries.
Phase 4 — The Forger Creates His Masterpiece
The criminal understood that replacing a registered painting would be difficult.
So he changed his strategy.
He created a new painting and attempted to associate it with an established artist.
GitHub’s repository architecture supports forks, which are independent copies of existing projects.
Forks allow developers to experiment, contribute improvements and maintain alternative versions of software.
However, related repositories can share access to Git objects through their repository network.
This creates a security-relevant distinction between a commit being accessible through a repository and that commit belonging to its legitimate upstream development history.
An impostor commit can exploit that ambiguity.
A reference may appear associated with a recognizable project even though the commit originated outside its trusted upstream branches.
If an organization chooses that malicious revision as its dependency, pinning will preserve the malicious selection rather than correct it.
The cryptographic mechanism has not necessarily failed.
It is performing the task it was designed to perform.
The failure lies in deciding what should be trusted before applying that mechanism.
The forger didn’t need to defeat the museum’s identification system. He needed the museum to register his painting.
Phase 5 — The Forgery Disguised as a Security Improvement
The criminal understood something else about the museum.
Its conservators were particularly attentive to restoration work intended to protect valuable paintings.
A fraudulent restoration could therefore provide a convincing disguise.
During the March 2026 Trivy compromise, malicious code was presented as though it belonged to GitHub’s official checkout action.
The attackers described the modification as a security correction.
A workflow pinned to that malicious commit could satisfy ordinary SHA-format enforcement while still executing attacker-controlled code.
The deception exploited the trust associated with both a recognizable project and an apparently defensive modification.
Security-related changes can appear especially persuasive when teams are under pressure to remediate vulnerabilities quickly.
But a change described as a security improvement deserves the same provenance and code-review scrutiny as any other dependency update.
The forger presented his work not as a replacement masterpiece, but as an improvement intended to protect the original collection.
Phase 6 — The Forgery Reaches Another Gallery
The technique was not confined to a single incident.
In May 2026, similar abuse affected actions-cool/issues-helper.
The campaign resulted in credential theft from affected CI/CD workflows.
This demonstrated the practical consequences of introducing malicious code into trusted automation.
A pipeline may possess permissions that an external attacker could not otherwise obtain.
It may interact with cloud services, publish software artifacts or access sensitive repositories.
A compromised action can potentially inherit some of those capabilities, depending on the workflow’s configuration.
The extent of the resulting damage depends on which credentials are available, their privileges and the surrounding infrastructure.
A malicious action does not automatically gain unrestricted access to every connected system.
Nevertheless, the relationship between automated execution and enterprise credentials makes these environments attractive targets.
The fraudulent painting was no longer simply occupying space on a gallery wall. It had become a gateway to the museum’s most valuable possessions.
Phase 7 — Three Questions the Certificate Cannot Answer
The museum director ordered a review of its authentication process.
The investigation revealed three questions that the existing identification mechanism could not fully resolve.
Who created the painting?
A commit identifier establishes which revision has been selected.
It does not independently establish that an authorized maintainer created, approved or reviewed that revision.
Commit authorship, cryptographic signatures and trusted project approval are related but distinct considerations.
Does the painting belong to the artist’s official collection?
An action reference can satisfy an organization’s SHA requirement without demonstrating that its commit belongs to a trusted upstream branch.
Repository membership and commit provenance therefore require additional validation.
What materials were used after the painting was registered?
Some actions obtain additional components during execution.
A Docker-based action, for example, may build a container using dependencies whose versions remain mutable.
Consequently, fixing the action’s source revision does not necessarily fix every component that ultimately executes.
These three questions reveal separate dimensions of supply chain trust:
Identity.
Origin.
Execution-time integrity.
The certificate identified the painting. It could not answer every question about its creation, its history or the materials used to produce it.
Phase 8 — The Museum Introduces a More Detailed Registry
The museum decided that recording individual paintings was no longer sufficient.
It needed a registry that also documented their associated materials and dependencies.
GitHub’s 2026 Actions security roadmap introduced important improvements in this direction.
Workflow lockfiles became generally available on October 28, 2026.
They record the resolved commits of actions and their indirect dependencies, helping make subsequent executions more predictable.
They also require locked commits to be present on a branch of the relevant source repository, reducing exposure to commits accessible only through external forks.
This represents a meaningful improvement over relying exclusively on individual SHA references.
However, a recorded dependency can still contain malicious code.
A legitimate upstream branch can itself be compromised.
A trusted maintainer account can be abused.
And additional software retrieved during execution may remain outside the protection of the workflow lockfile.
The original reporting also notes that GitHub Enterprise Server does not currently support these lockfiles.
The museum had introduced a much more comprehensive registry. But registering a painting still did not establish that the painting deserved to be there.
Phase 9 — The Materials That Arrive After Authentication
One of the museum’s paintings required regular restoration.
Its conservators had carefully documented the original work.
But the pigments, solvents and other materials used in subsequent restoration processes came from external suppliers.
Those materials introduced another layer of dependency.
The same challenge applies to runtime software components.
A pinned Docker-based GitHub Action may still retrieve external packages or base container images when its environment is built.
If those inputs use mutable references, their contents can change independently of the pinned action revision.
This creates a difference between the integrity of the source definition and the integrity of the resulting execution environment.
Organizations seeking reproducible, trustworthy execution should examine additional inputs, including:
Container base images.
Operating-system packages.
Language-specific dependencies.
Downloaded utilities.
External installation scripts.
Build-time and runtime resources.
Where possible, these components should also be constrained to reviewed and verifiable versions.
Container image digests can help prevent unexpected changes to referenced images.
Dependency lockfiles and controlled artifact repositories can provide additional protection.
Protecting the painting was important. Protecting everything subsequently applied to it was equally necessary.
Phase 10 — The Museum Expands Faster Than Its Inspectors
The museum began acquiring paintings at an unprecedented rate.
Automated systems identified new works, recommended acquisitions and processed catalog entries.
The collection expanded faster than the conservators could manually inspect every addition.
Modern development environments face a comparable challenge as AI-assisted and agentic software development increases the volume of generated code and automated changes.
Development agents can suggest workflow modifications, introduce dependencies and recommend new software components.
These capabilities offer substantial productivity benefits.
But dependency decisions still require security validation.
A generated workflow that includes a syntactically correct SHA reference is not inherently trustworthy.
Automation must operate within appropriate policy boundaries.
Organizations should therefore consider applying automated provenance checks, dependency review requirements and approved component policies to both human-generated and AI-generated changes.
The objective is not to prevent automation.
It is to ensure that the speed of software creation does not exceed the organization’s ability to enforce trust.
The museum could automate the acquisition of paintings. It could not afford to automate blind confidence in their authenticity.
Phase 11 — How to Keep the Forgeries Out
Preventing impostor commits from entering production workflows requires complementary security controls.
1. Continue enforcing SHA pinning
Pinning remains valuable protection against unauthorized changes to mutable action references.
Its limitations are a reason to complement it, not abandon it.
2. Verify upstream commit membership
Confirm that selected revisions belong to the expected project’s trusted development history and appropriate release branches.
3. Validate provenance
Review the origin of dependencies, maintainer approvals and available signatures or attestations.
A valid signature should also be evaluated against an appropriate trust policy.
4. Review dependency updates
Inspect changes before introducing new action revisions, particularly when modifications affect installation, credential access or workflow execution.
5. Adopt workflow lockfiles
Use dependency locking where supported to improve execution consistency and visibility into transitive dependencies.
6. Secure container and runtime inputs
Use reviewed container images, immutable digests and controlled package sources wherever practical.
7. Maintain approved action catalogs
Restrict sensitive workflows to independently reviewed or explicitly approved automation components.
8. Minimize pipeline privileges
Grant each workflow and job only the repository and infrastructure permissions it requires.
9. Reduce reliance on long-lived credentials
Use appropriately scoped, short-lived authentication mechanisms, such as federated identities, where supported.
10. Audit existing workflows
Review established action references, investigate suspicious commit origins and assess whether potentially compromised dependencies had access to sensitive credentials.
Where exposure is suspected, revoke or rotate affected secrets and investigate their subsequent use.
Together, these measures address several different questions:
What code will execute?
Where did it come from?
Who approved it?
What else will it load?
And what will it be allowed to access?
A secure museum doesn’t merely register its paintings. It verifies their origins, controls their restoration and limits what each supplier can access.
The Final Scene — The Painting That Never Changed
The museum director stood before the fraudulent masterpiece.
It was protected behind reinforced glass.
Its identification number matched the registry.
Its condition had remained unchanged since acquisition.
Every routine inspection had been successful.
The verification mechanism had performed exactly as intended.
But the painting was still a forgery.
The director finally understood that the museum had been asking only one part of the security question.
It had focused on whether the painting had changed.
It had neglected to establish whether the painting was legitimate when it entered the collection.
The same distinction applies to GitHub Actions.
SHA pinning is a crucial security measure.
Workflow lockfiles strengthen dependency consistency.
Immutable references help protect against unauthorized substitution.
But those mechanisms must be accompanied by provenance validation, trustworthy dependency selection, runtime security and appropriate execution privileges.
Otherwise, organizations may successfully preserve the very code an attacker wanted them to execute.
The director removed the fraudulent painting from the exhibition.
Its official identification number was still intact.
Its protective glass had never been broken.
Its certificate had never changed.
And that was precisely the lesson.
The museum had guaranteed that nobody could change the forgery.
It had forgotten that an immutable forgery is still a forgery.
Sources: The Hacker News — Hackers Found a Way Around GitHub SHA Pinning and LavX News.


Comentarios