Subscribe to the Non-Human & AI Identity Journal
Home Glossary Threats, Abuse & Incident Response GitHub Actions cache poisoning
Threats, Abuse & Incident Response

GitHub Actions cache poisoning

← Back to Glossary
By NHI Mgmt Group Updated August 2, 2026 Domain: Threats, Abuse & Incident Response

GitHub Actions cache poisoning is a supply chain attack in which an attacker seeds or manipulates cached build artefacts so a later trusted workflow restores and executes malicious content. It exploits trust across workflow stages, especially when cache keys, permissions, and provenance checks are too broad.

Expanded Definition

GitHub Actions cache poisoning is a workflow compromise pattern in which an attacker influences the contents of a reusable cache so a later job restores untrusted code or artefacts under a trusted build context. It is closely related to broader CI/CD trust failures, but the defining feature is the abuse of cache reuse across jobs, branches, or pull request boundaries.

Definitions vary across vendors and incident write-ups, but the security issue is consistent: a cache is treated as an optimisation layer, then silently becomes an execution path. In NHI security terms, the risk is amplified when GitHub tokens, repository permissions, or build credentials allow write access to cacheable paths without strict branch isolation. NIST SP 800-53 Rev 5 frames this kind of issue through configuration management, least privilege, and software integrity controls, while supply chain guidance from NIST SP 800-53 Rev 5 Security and Privacy Controls helps anchor the governance model.

The most common misapplication is assuming cache scope is harmless when a cache key is broad, branch protection is incomplete, or untrusted workflows can write artefacts that trusted jobs later restore.

Examples and Use Cases

Implementing cache controls rigorously often introduces slower builds and more complex key design, requiring organisations to weigh pipeline speed against provenance assurance.

These cases show that cache poisoning is not only about code execution. It can also alter dependency resolution, embed malicious build steps, or expose secrets that downstream jobs assume are safe.

Why It Matters in NHI Security

Cache poisoning matters because CI/CD systems often operate with privileged non-human identities such as GitHub tokens, runner credentials, package publishing keys, and deployment secrets. Once a poisoned cache is trusted by an automated workflow, the attacker can pivot from artefact tampering into secret theft, release manipulation, or persistent supply chain compromise. That is why this term belongs in NHI governance, not just application security.

NHI Management Group research shows that 96% of organisations store secrets outside secrets managers in vulnerable locations, and 97% of NHIs carry excessive privileges. In a cache-poisoning scenario, those conditions turn a build optimisation into an identity abuse pathway. The same exposure pattern is visible in the Shai Hulud npm malware campaign and the SpotBugs Token GitHub Supply Chain Attack, where trust in automation became the compromise multiplier.

Organisations typically encounter the real cost only after a release artifact, dependency bundle, or signing step has already been altered, at which point cache poisoning becomes operationally unavoidable to address.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST Zero Trust (SP 800-207) and NIST SP 800-63 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-02Covers secret misuse and trust failures in non-human identity workflows.
OWASP Agentic AI Top 10A-04Highlights tool and workflow trust boundaries that attackers can subvert.
NIST CSF 2.0PR.DSData integrity and protection controls apply to cached build artefacts.
NIST Zero Trust (SP 800-207)SC-7Zero trust requires continuous validation across pipeline trust boundaries.
NIST SP 800-63Identity assurance principles inform how privileged automation credentials are constrained.

Protect cached artefacts with integrity checks, scoped permissions, and monitored restore events.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on August 2, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org