Join our Newsletter — 33% off our NHI Course

GitHub Actions Supply Chain Attack

A GitHub Actions supply chain attack happens when an attacker compromises a workflow, action, dependency, or secret in the build and release process to inject malicious code or steal credentials. In identity terms, it abuses CI/CD trust, NHI secrets, and permissions to move from code execution to repository, cloud, or production access.

How GitHub Actions Supply Chain Attacks Work

A GitHub Actions supply chain attack targets the trust chain inside CI/CD, not just the source code. By compromising a workflow, reusable action, dependency, or secret, an attacker can influence what gets built, signed, published, or deployed.

The reason this is so effective is that build automation often runs with broad repository and infrastructure permissions. Once an attacker can alter a workflow or steal a token, they may inherit access to private code, release pipelines, package registries, cloud roles, or deployment targets.

Why This Attack Pattern Is So Dangerous

This attack pattern is dangerous because CI/CD systems sit at a high-trust intersection of code, secrets, and release authority. A small compromise in a workflow file or third-party action can cascade into many downstream systems, especially when the pipeline has write access to repositories or can publish artifacts automatically.

The blast radius can extend well beyond the original repository. A compromised action may exfiltrate credentials from logs or runner memory, modify release artifacts, or introduce malicious steps into future builds, making the compromise persistent until the trust chain is repaired.

Common Entry Points and Abuse Paths

Attackers often start with leaked tokens, unpinned third-party actions, unsafe workflow triggers, or poisoned dependencies. In practice, the attack may involve maintainer account takeover, malicious pull request handling, compromised publishing tokens, or workflow logic that exposes secrets to untrusted code.

GitHub Actions is especially sensitive to trust-boundary mistakes such as over-scoped secrets, mutable tags for actions, and workflows that execute code from forks without strong isolation. Those conditions let an attacker turn routine automation into a delivery mechanism for credential theft or release tampering.

What Organisations Should Protect First

The highest-value assets are the build credentials, deployment secrets, signing material, package publishing tokens, and any cloud or production roles reachable from the pipeline. CI/CD Pipeline Identity Security Guide is a useful starting point for understanding how those identities and trust policies should be structured.

Defenders should treat pipeline identity as a production control plane, not just a developer convenience. That means checking which workflows can mint tokens, which actions are trusted, which secrets are exposed to jobs, and whether the pipeline can reach release or cloud environments without unnecessary standing privilege.

Risk and Threat Considerations

When GitHub Actions is compromised, the attacker often gets more than code execution. The same workflow path that builds software can also expose secrets, sign releases, or deploy to production, which turns a single foothold into a broad trust abuse opportunity.

Failure mechanism: A malicious or altered workflow, action, or dependency executes in a privileged pipeline context and harvests secrets, manipulates artifacts, or pivots into repository and cloud access.

Impact: The organisation can face secret exposure, tampered releases, unauthorized deployment, lateral movement into cloud services, and long-lived compromise if stolen credentials are not rotated quickly.

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 MITRE ATT&CK address the attack and risk surface, while NIST SP 800-53 Rev 5, SLSA and OWASP ASVS set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-02 — Secret Leakage Workflow compromise often exposes CI/CD secrets and tokens.
NHI-05 — Overprivileged NHI CI/CD identities often have excessive repository and release permissions.
NHI-07 — Long-Lived Secrets Persistent publishing tokens and stored secrets are common attack enablers.
Recommendation — Limit secret exposure in workflows and rotate any credentials revealed during compromise. Reduce pipeline permissions to the minimum needed for build and release tasks. Replace durable pipeline secrets with short-lived, federated credentials where possible.
NIST SP 800-53 Rev 5 IA-5 — Authenticator Management Pipeline tokens, keys, and secrets require lifecycle control and rotation.
AC-6 — Least Privilege Build and release jobs should not hold unnecessary write or deploy authority.
Recommendation — Enforce rotation, storage, and revocation discipline for pipeline authenticators and tokens. Constrain workflow permissions to the smallest set needed for each job.
SLSA Supply-chain Levels for Software Artifacts Build provenance and tamper resistance are central to this attack class.
Recommendation — Adopt provenance controls so build and release integrity can be verified end to end.
OWASP ASVS V9 — Self-contained Tokens Tokens used in automation can be leaked, replayed, or over-scoped.
Recommendation — Design pipeline token use so stolen credentials do not confer broad reusable access.
MITRE ATT&CK T1552 — Unsecured Credentials Attackers commonly steal secrets from workflows, logs, and runners.
Recommendation — Hunt for credential exposure in build logs, runner state, and workflow outputs.

Practitioner Guidance

Why practitioners should care: Treat every GitHub Actions workflow as an enforceable security boundary, because the pipeline can directly create, use, and leak the same credentials that protect production. OWASP Non-Human Identity Top 10 is a useful reference for the recurring control failures around secret leakage, overprivilege, and reuse.

Common misunderstanding: Many teams secure the repository but leave the workflow identity, action supply chain, and publishing path under-governed. That leaves a gap where code review can be strong while runtime trust remains weak.

Practitioner takeaway: Pin actions, minimise secret exposure, separate build from publish authority, and review pipeline trust the same way you would review any other privileged access path.

For broader threat context and incident patterns, ENISA Threat Landscape, NIST SSDF (SP 800-218), and SLSA give complementary ways to think about build integrity, provenance, and software supply-chain hardening.