A security practice once seen as a strong defense against software supply chain attacks has been bypassed by hackers. SHA pinning, which locks GitHub Actions to a specific version of code, was widely adopted to prevent unauthorized changes to software pipelines. Source: thehackernews.com.
What Happened
In March 2026, attackers hijacked the open-source security scanner Trivy. The malicious code they planted mimicked GitHub’s official checkout tool, making it appear legitimate.
The attack used a technique that exploited how GitHub Actions handles code dependencies. By embedding a malicious script that appeared to be part of the official GitHub checkout tool, the hackers made it look like the code was authorized and trusted.
Security researchers discovered that the malicious payload was triggered only when the SHA pinning mechanism was used. This created a false sense of security, as the pinned version of code would still execute the malicious script.
Key Facts
- The attack occurred in March 2026, during a period of increased scrutiny of software supply chains.
- Trivy is a widely used open-source tool for scanning software vulnerabilities.
- The malicious code was labeled as coming from GitHub’s official checkout tool, making it appear authentic.
- SHA pinning was intended to prevent unauthorized changes to code, but the attack showed it could be circumvented.
Background: How SHA Pinning Works
SHA pinning requires developers to specify a unique hash — a digital fingerprint — of a specific code version. When GitHub Actions runs, it checks if the current code matches that hash. If not, the workflow fails.
This method was designed to prevent attackers from injecting new code into a pipeline without authorization. It became a standard practice after high-profile supply chain attacks like the SolarWinds incident.
However, the March 2026 attack revealed a flaw: the malicious code could be embedded in a dependency that appears legitimate, and the pinning mechanism would still allow it to run if the hash matched.
Why It Matters
SHA pinning was considered a critical layer of defense in software development. Its compromise undermines trust in automated pipelines.
For companies using GitHub Actions, this means that even with strict version controls, attackers may still inject malicious code through trusted-looking dependencies.
It also raises concerns about how widely adopted tools like Trivy are used in production environments. If a tool is trusted, its code can be exploited if it is not properly vetted.

Limitations and Open Questions
The attack does not prove SHA pinning is entirely obsolete. It only shows that it can be circumvented under specific conditions.
One limitation is that SHA pinning only protects against changes to the code itself — not against malicious code in dependencies that are not directly visible.
There is no official response from GitHub yet about how it plans to address this vulnerability. Security experts say more testing is needed to understand the full scope.
Some researchers suggest combining SHA pinning with additional checks — such as code signing or runtime integrity verification — to strengthen defenses.
Another open question is whether similar attacks could be used against other tools in the software supply chain.
What to Watch Next
Security teams should monitor for similar attacks on other open-source tools that rely on trusted dependencies.
GitHub may release updates to its Actions platform in the coming months to improve dependency validation.
Companies that use automated pipelines should conduct regular audits of their dependencies and consider multi-layered security strategies.
For more on supply chain attacks, see Polymarket’s recovery after a supply chain attack.
For a case where AI agents were exploited in a medical software zero-day, see Amazon’s medical software breach.
Sources & further reading
Featured image: original publisher image. Via original publisher. Image source




