Subscribe to the Non-Human & AI Identity Journal

How should teams respond when GitHub Actions runners are used for persistence?

They should treat the runner layer as a privileged execution boundary and verify ownership, registration history, and workflow integrity before restoring trust. Self-hosted runners that appeared during the incident should be removed or rebuilt, and workflow changes should be checked for direct-push modifications and hidden secret access.

Why This Matters for Security Teams

github actions runner are not just build infrastructure. When attackers persist on a runner, they can inherit a trusted execution boundary that often has repository access, network reach, and secret-handling capabilities. That changes the incident from a single workflow compromise into a platform-level identity problem. NHI Management Group has repeatedly shown how GitHub-centric compromise can expose sensitive material, including in the Reviewdog GitHub Action supply chain attack and the GitLocker GitHub extortion campaign.

The main mistake is treating a runner as disposable after the fact without proving it was clean at any point in the incident timeline. Current guidance from NIST SP 800-53 Rev 5 Security and Privacy Controls and the NIST Cybersecurity Framework 2.0 supports stronger asset control, but practitioners still need to verify runner registration, hosted image integrity, and workflow provenance before trust is restored. In practice, many security teams encounter runner persistence only after secrets have already been used from the build plane.

How It Works in Practice

The response should start with containment at the runner layer. Any self-hosted runner that appeared during the incident should be treated as untrusted until its ownership, registration history, and disk state are understood. If the runner was attacker-controlled, remove it from GitHub, revoke its tokens, and rebuild the host from a known-good image rather than trying to clean it in place. For ephemeral runners, validate whether the orchestration layer itself was abused to launch new instances or inject malicious startup logic.

Next, review workflow integrity, not just repository code. Attackers commonly persist by modifying workflow files, adding direct-push triggers, weakening branch protections, or inserting steps that read hidden secrets. Review recent changes to CI/CD pipeline exploitation case study patterns and compare them with the incident window. If a workflow had access to secrets, assume those secrets may have been observed even if exfiltration is not obvious in logs.

  • Remove or isolate any runner that was registered during the intrusion window.
  • Rebuild self-hosted runners from trusted golden images and rotate any tokens used to register them.
  • Audit workflow files for direct-push execution, unpinned actions, and secret access paths.
  • Revoke and rotate secrets that were available to the runner, especially if logs show command execution or network egress.

Use repository history, runner registration records, and CI logs together. A single clean scan is not enough if the attacker maintained persistence through registration tokens, cached credentials, or modified workflow dispatch logic. These controls tend to break down in highly automated delivery environments where runner creation is delegated across teams and inventory ownership is unclear.

Common Variations and Edge Cases

Tighter runner control often increases delivery friction, requiring organisations to balance pipeline speed against containment discipline. That tradeoff becomes more visible in large estates, where shared runner pools, autoscaling groups, and multiple GitHub organisations make ownership ambiguous. There is no universal standard for this yet, but best practice is evolving toward short-lived runners, strong workload identity, and policy checks at job start rather than trusting a static fleet.

Private runners used for production deployments deserve the strictest treatment because persistence there can bridge code, secrets, and infrastructure. In contrast, some teams rely on hardened, long-lived runners for performance reasons; if that model remains, they need aggressive segmentation, frequent rebuilds, and continuous attestation. NHI Management Group research shows why this matters: secrets exposure remains widespread, and the Ultimate Guide to NHIs documents how often organisations miss rotation and offboarding discipline. When runner abuse is part of a broader supply-chain event, the Shai Hulud npm malware campaign is a useful reminder that attacker persistence frequently rides on trusted automation rather than obvious malware on endpoints.

Teams should also avoid overconfidence in “ephemeral” labels. Ephemeral does not mean harmless if the orchestration layer, secrets injection path, or workflow permissions were compromised before the runner terminated.

Standards & Framework Alignment

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

OWASP Agentic AI Top 10, CSA MAESTRO and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Agentic AI Top 10 A01 Workflow abuse on runners mirrors autonomous execution abuse and hidden tool use.
CSA MAESTRO M2 Addresses runtime control of autonomous workload execution and tool access.
NIST AI RMF Supports governance of runtime risk, accountability, and continuous monitoring.
OWASP Non-Human Identity Top 10 NHI-01 Runner tokens and secrets are non-human identities that can persist and be abused.
NIST CSF 2.0 PR.AC-1 Access control and asset management apply directly to runner ownership and trust.

Constrain runner actions by job intent and validate each execution step before secrets are exposed.