TL;DR: An autonomous bot campaign exploited misconfigured GitHub Actions workflows to trigger code execution, steal credentials, and in some cases compromise repositories, according to Exaforce. The pattern shows that workflow trust, token scope, and prompt injection are now security controls, not just developer conveniences.
At a glance
What this is: This article analyses how an autonomous bot abused GitHub Actions workflow trust to execute code, steal credentials, and compromise repositories.
Why it matters: It matters because CI/CD workflows now sit inside the identity and privilege boundary, so IAM, PAM, and NHI controls must cover tokens, triggers, and agentic misuse.
By the numbers:
- AI-related credential leaks surged 81.5% year-over-year in 2025, with the surrounding AI infrastructure leaking 5x faster than core LLM providers.
- 28.65 million new hardcoded secrets were detected in public GitHub commits in 2025 alone, a 34% year-over-year increase and the largest single-year jump ever recorded.
👉 Read Exaforce's analysis of hackerbot-claw and GitHub workflow tampering
Context
GitHub Actions has become part of the software supply chain control plane, which means workflow design now affects both security posture and identity governance. When untrusted pull requests, branch names, comments, or generated prompts can influence execution, the boundary between developer automation and attacker-controlled runtime becomes too thin to trust by default. In this article's primary topic, GitHub workflow abuse, the core failure is not sophistication but over-permissioned automation.
The identity angle is real because the attacker is not only exploiting code paths. They are also targeting write-capable tokens, workflow permissions, and AI assistant instructions that can authorise actions on behalf of the repository. That makes CI/CD credentials a non-human identity problem, and prompt injection into an LLM-enabled workflow becomes a privilege-abuse issue rather than just a content-safety issue.
Key questions
Q: How should security teams stop forked pull requests from reaching privileged GitHub Actions jobs?
A: Security teams should separate validation from privilege. Forked pull requests should run in workflows with no write permissions, no deployment secrets, and no path to protected environments. Trust should be assigned only after branch origin, event type, and job scope are verified, because the dangerous step is untrusted code executing inside a privileged runner.
Q: Why do misconfigured CI/CD workflows increase credential theft risk?
A: They combine execution, secrets access, and often write permission in a single runtime. If an attacker can influence the trigger or the command path, the runner may expose tokens that were meant for automation, not adversarial use. Once those credentials are stolen, the attacker can persist changes, widen access, or pivot into the broader supply chain.
Q: What breaks when GitHub workflow inputs are treated as trusted data?
A: Shell commands, expression syntax, and AI prompts can all become execution paths when they consume branch names, filenames, comments, or generated instructions. That turns metadata into code and gives attackers a low-friction route to remote execution or token exfiltration. Strong parsing and allowlisting are the difference between normal automation and adversarial control.
Q: How should organisations govern AI agents that can modify repository code?
A: They should treat the agent as a delegated non-human identity with tightly bounded authority. Separate instruction input from execution rights, require human approval for write actions, and log every agent-initiated change with enough context to support review. If the agent can edit code without that separation, prompt injection becomes a privilege escalation path.
Technical breakdown
How misconfigured GitHub Actions become an execution boundary
GitHub Actions can execute code in response to events such as pull requests, comments, and workflow runs. The danger appears when workflows trust user-controlled inputs too early, especially in pull_request_target setups where the job can access repository secrets and write permissions. If a workflow evaluates branch names, filenames, or comments inside shell commands or expression syntax, the attacker can turn metadata into executable instructions. That is not a GitHub bug so much as a control-plane design failure: automation inherits trust from the repo but not from the contributor.
Practical implication: treat every trigger that touches untrusted input as a potential privilege boundary and restrict it with explicit approval gates.
Why token scope and repository permissions shape the blast radius
In CI/CD, the real target is often not code execution itself but the token exposed inside the runner. A write-capable GitHub token can push malicious changes, alter workflows, or create persistence in the repository. Once a token is available to a job that can be induced to run attacker content, the runner becomes a credential-harvesting environment. The blast radius depends on whether the workflow uses default permissions, short-lived credentials, or tightly scoped job-level access. Without that separation, one weak workflow can become a repository-level compromise.
Practical implication: minimise runner permissions and remove write access from jobs that do not absolutely need it.
How LLM prompt injection changes workflow abuse
The novel element in this campaign is that an AI assistant inside the workflow can be manipulated through prompt injection. If the workflow gives the model access to repository context and write permissions, the model can be steered into taking actions that look like legitimate automation. That creates an identity problem for agentic systems: the model is not just generating text, it is acting as a delegated principal inside CI/CD. Controls must therefore bind instructions, tools, and permissions together, otherwise social engineering targets the machine collaborator instead of the human.
Practical implication: separate LLM instructions from execution authority and require human validation before any write action.
Threat narrative
Attacker objective: The attacker sought to convert workflow trust into repository control by stealing credentials, executing code, and using that access to persist malicious changes.
- Entry began with automated probing of public GitHub repositories for misconfigured workflows that accepted untrusted inputs or exposed elevated triggers.
- Escalation occurred when the workflow runner executed attacker-influenced commands, allowing credential theft or code execution inside the CI/CD environment.
- Impact followed when stolen tokens or manipulated prompts enabled repository writes, malicious code insertion, or broader supply chain compromise.
NHI Mgmt Group analysis
GitHub workflow abuse is now an identity governance problem, not only a DevSecOps problem. The moment a workflow can read secrets, write code, or invoke an assistant on behalf of a repository, it is functioning as a non-human identity with delegated authority. That requires lifecycle controls, permission review, and revocation discipline that many engineering teams still do not apply to CI/CD. The practitioner conclusion is simple: every workflow with secrets access needs identity-style governance.
Prompt injection in CI/CD creates a new named risk: workflow delegation abuse. The issue is not that the model is dangerous in isolation, but that the model is allowed to act inside a trust boundary without clear separation between instruction, context, and execution rights. This is where agentic AI security meets NHI governance, because the model is effectively an acting principal when it can trigger writes or approvals. The practitioner conclusion is to govern the model like a delegated identity, not a chatbot.
Standing write privilege in runners is the real blast-radius multiplier. The campaign did not need exotic exploits because the vulnerable workflows already had enough authority to cause damage if induced to run. In identity terms, persistent write access in automation expands the attack window far beyond the moment of initial trigger. The practitioner conclusion is to remove standing privilege from CI jobs wherever possible and make elevation task-scoped.
Detection must key on sequences, not isolated events. A pull request event, environment creation, and a completed workflow run may be individually benign, but together they can describe attacker progression through the CI/CD control plane. This is analogous to identity threat hunting in NHI estates, where a single token use means little without context on trigger source, scope, and downstream behaviour. The practitioner conclusion is to detect event chains across identity, workflow, and repository telemetry.
What this signals
Workflow authority is now a governance boundary. As GitHub, CI runners, and AI assistants take on more operational work, teams need to map each automation path to a clear owner, scope, and revocation process. The key signal is whether a workflow can still act after the original task is complete, because that is where standing privilege turns into exploitable drift. For organisations building policy around non-human identities, this is the moment to connect pipeline governance to Ultimate Guide to NHIs , Static vs Dynamic Secrets and NIST AI Risk Management Framework.
GitHub telemetry should be treated as identity telemetry. A suspicious pull request is not just a developer event when it can lead to token use, environment creation, or code execution. Security teams should prepare for correlation across repository, workflow, and identity logs so that abuse chains surface quickly enough to contain them. The practical takeaway is to align detections with the access lifecycle, not with code review alone.
The bigger programme lesson is that agentic automation and CI/CD are converging on the same control problem: who or what is allowed to act, under which conditions, and with what revocation path. That means IAM, PAM, and NHI teams should stop treating workflow permissions as an implementation detail and start treating them as governed access paths. Teams that do this well will have a much smaller blast radius when the next bot starts probing their repositories.
For practitioners
- Reduce workflow privilege by default Strip write permissions from GitHub Actions jobs unless a step truly requires them, and separate read-only validation from release or merge workflows. Use short-lived credentials where possible so a compromised job cannot reuse a standing token beyond the task it was meant to perform.
- Block untrusted input from shell and expression contexts Review every workflow that interpolates pull request data, branch names, filenames, or comments into shell commands or expression syntax. Treat these values as attacker-controlled input and move any evaluation behind strict allowlists and explicit parsing logic.
- Add sequence-based detections for workflow abuse Correlate pull request creation, environment creation, token use, and workflow completion events to catch abuse patterns that single-event alerting misses. Prioritise cases where a new or unknown principal triggers a workflow that can write back to the repository.
- Govern LLM-enabled workflows as delegated identities If an AI assistant can read repository context and act on code or approvals, require human approval before any write operation and separate the model's instructions from its execution rights. The same control logic used for NHI approvals should apply here, because the model is operating with delegated authority.
Key takeaways
- GitHub Actions abuse shows that CI/CD workflows can function like non-human identities when they hold secrets, write permissions, and execution authority.
- The attack chain succeeded because ordinary repository trust signals were allowed to reach privileged automation without enough separation or approval.
- Teams should govern workflows, tokens, and LLM-enabled actions as access paths, not just as build plumbing, if they want to reduce repository compromise risk.
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, OWASP Agentic AI Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-01 | Workflow tokens and runner access behave like non-human identities in this attack pattern. |
| OWASP Agentic AI Top 10 | The prompt-injection case involves an AI assistant being steered into unsafe actions. | |
| MITRE ATT&CK | TA0006 , Credential Access; TA0008 , Lateral Movement; TA0004 , Privilege Escalation | The article describes credential theft, escalation, and repository compromise through workflow abuse. |
| NIST CSF 2.0 | PR.AC-4 | Least-privilege access control is central to reducing runner and token abuse. |
| NIST SP 800-53 Rev 5 | AC-6 | Least privilege directly addresses over-permissioned GitHub Actions jobs. |
Review workflow entitlements against least-privilege expectations and remove unnecessary write access.
Key terms
- Pull Request Target Risk: A workflow risk pattern where untrusted pull request content is processed in a privileged context. Because the job may run with write access or access to secrets, the boundary between review and execution collapses. The control failure is not the pull request itself, but the permissions attached to the trigger.
- Workflow Delegation Risk: The point at which an operational tool or AI system begins to shape decisions that were previously owned by humans. In identity and security programmes, this matters because recommendation can become de facto authority if boundaries, approvals, and audit trails are not clearly defined.
- Repository Control Plane: The set of systems and permissions that decide how code is built, tested, approved, and shipped. In modern software delivery, this plane includes GitHub, CI runners, tokens, and automation rules, so a compromise here can affect both code integrity and credential exposure.
- Runner Credential Exposure: The moment a CI/CD job can access tokens, secrets, or other sensitive credentials during execution. If the runner is exposed to attacker-controlled input, those credentials may be harvested and reused outside the intended task, expanding the impact from a single job to repository or supply chain compromise.
What's in the full article
Exaforce's full blog post covers the operational detail this post intentionally leaves for the source:
- Query examples for spotting pull_request.create, environment.create, and workflow completion sequences
- Repository-specific detection logic for suspicious principals and tampered workflow runs
- Examples of payload patterns such as ${IFS}, base64 decoding, and command substitution in branch or file names
- The prompt-injection case where an LLM-enabled workflow was manipulated into unauthorised code changes
👉 The full Exaforce post covers the attack chains, detection logic, and workflow abuse examples
Deepen your knowledge
NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and secrets management. It helps identity and security practitioners apply governance discipline to automation, credentials, and delegated access paths.
Published by the NHIMG editorial team on August 2, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org