TL;DR: GitHub Actions now reaches 51% adoption in CNCF’s 2024 survey and 33% in JetBrains’ 2024 developer report, but Orca Security argues that teams still underestimate how secrets exposure, overbroad tokens, mutable actions, and pull request injection turn automation into an attack surface. The governance gap is not the workflow engine itself, but the assumption that CI/CD automation can be trusted like ordinary application code.
At a glance
What this is: This is a security analysis of GitHub Actions that shows how common workflow patterns turn CI/CD into an attack surface for secrets exposure, privilege abuse, injection, supply chain poisoning, and runner compromise.
Why it matters: IAM, PAM, and CI/CD owners need to treat workflow identity, token scope, and action trust as governed access decisions, because build automation can inherit production-grade risk without production-grade controls.
By the numbers:
- GitHub Actions ranks as the second most-used CI/CD tool with a 33% adoption rate, according to Orca Security.
- GitHub Actions is now the most widely used CI/CD platform at 51% adoption, according to Orca Security.
Context
GitHub Actions is a CI/CD platform embedded in GitHub that runs workflows on events such as pushes, pull requests, schedules, and manual triggers. The security problem is not the automation model itself, but the way those workflows often inherit secrets, repository permissions, and trust in external code without equivalent governance.
For identity and access teams, GitHub Actions behaves like a privileged non-human identity environment. Each workflow, token, runner, and third-party action can expand blast radius when permissions are broad, secrets are exposed, or untrusted input reaches execution.
The article’s central claim is that teams have normalised high-trust automation in a low-trust threat environment. That is typical in modern CI/CD, which is exactly why the control gap matters now rather than later.
Key questions
Q: What breaks when GitHub Actions workflows are allowed to access secrets without approval?
A: When workflow secret access is not gated, an attacker can turn the CI runner into the exfiltration tool. A malicious workflow can dump secrets, upload them as an artifact, and remove traces before anyone notices. At that point, detection becomes reactive only, and organisations are left rotating credentials after exposure instead of preventing the theft in the first place.
Q: Why do overprivileged CI/CD components create such high supply chain risk?
A: Overprivileged pipeline components turn a routine build system into a high-value attack path. If an attacker reaches a runner, token, or job editor, they can move laterally, alter builds, leak secrets, or inject malicious code. Least privilege limits how far compromise can spread and reduces the blast radius when credentials or automation are abused.
Q: What are the signs that a GitHub Actions workflow_run setup is unsafe?
A: The clearest warning signs are privileged jobs that check out untrusted repository code, parse artifact contents directly into shell commands, or rely on interpolated workflow inputs. Risk also rises when workflows run on pull requests from forks without strong approval controls. These patterns show the privileged workflow is treating attacker-controlled input as trusted execution context.
Q: How should teams compare untrusted PR workflows and privileged release workflows?
A: Untrusted pull request jobs should validate code and produce non-sensitive outputs, while privileged release jobs should operate only on trusted artefacts and approved inputs. When the same workflow both ingests contributor code and has secrets or deployment access, the separation of duties has already broken down.
Technical breakdown
Why secrets in workflows become reusable attack material
Secrets in GitHub Actions are not just configuration values. They are credentials that can grant repository, cloud, database, or API access to whatever code runs inside the job. Exposure happens through hardcoding, logs, debugging output, mis-scoped environment variables, or untrusted actions that can read the runtime context. Once a secret reaches a workflow runner, the threat is no longer theoretical because the secret is immediately usable, not merely observable. The key technical issue is that workflow execution collapses code, identity, and privileged transport into one runtime boundary.
Practical implication: Treat every secret available to a workflow as live access and minimise which jobs can ever see it.
Why overprivileged GITHUB_TOKEN settings widen blast radius
GitHub automatically issues a GITHUB_TOKEN to workflows, but its default permissions can be far broader than a specific job needs. That matters because write access to source, releases, issues, or repository secrets turns ordinary automation into an account with lateral impact across the repository lifecycle. Least privilege in CI/CD is not just about reducing permissions at deployment time; it is about constraining what the workflow identity can modify, publish, or read during execution. Older repositories are especially risky because they may still carry legacy write-all defaults.
Practical implication: Set workflow permissions explicitly and review legacy repositories for inherited write access.
How mutable actions and PR-triggered execution create supply chain risk
Third-party actions act like imported code with the same runtime trust as first-party steps. When teams pin to tags or branches, they accept mutable references that can be repointed to malicious code later. PR-triggered workflows add a second problem: if untrusted contributor input reaches a job that also has elevated permissions or secrets, the workflow can execute attacker-controlled code with trusted credentials. That combination turns CI/CD from a build system into a supply chain intermediary, where compromise can propagate through dependencies, artifacts, and runner state.
Practical implication: Pin external actions to immutable commits and keep untrusted PR code away from privileged execution paths.
Threat narrative
Attacker objective: The attacker wants trusted automation to hand over repository access, secrets, or build infrastructure so they can poison releases or pivot into connected systems.
- Entry occurs when attackers abuse leaked secrets, mutable third-party actions, or PR-controlled input to reach a workflow execution context.
- Credential access follows when the workflow exposes repository tokens, cloud credentials, or other secrets to the malicious step.
- Escalation and impact occur when the attacker uses privileged workflow context to modify code, poison artifacts, exfiltrate data, or persist on a self-hosted runner.
Breaches seen in the wild
- Code Formatting Tools Credential Leaks: Widely used code formatting tools cause massive credential and secrets leaks in enterprise environments.
- Miasma and Hades Supply Chain Worms: Self-propagating supply chain worms Miasma and Hades compromise npm, PyPI, and Azure credential stores.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
GitHub Actions is best understood as a non-human identity estate, not just a build tool. Each workflow identity, token, action reference, and runner permission creates a governed access path. When teams treat that path like ordinary application code, they miss the fact that CI/CD is executing with production-relevant authority. The practitioner conclusion is straightforward: workflow access must be governed as identity, not merely reviewed as code.
Mutable workflow trust is the core governance gap. Tags, branches, and marketplace actions create a moving trust boundary that is incompatible with stable access review assumptions. The article shows that the real problem is not automation volume alone, but the assumption that imported workflow dependencies remain what they were when approved. Practitioners need to reframe external action trust as a lifecycle issue, not a one-time review event.
Pull request execution and artifact reuse collapse separation-of-duties boundaries. A low-trust contributor can influence code that later runs in a high-trust job, which means the workflow chain becomes the attack path. That pattern aligns with OWASP-NHI concerns around overprivileged machine identities and with broader supply-chain controls that assume trusted inputs stay trusted. The practitioner conclusion is to separate untrusted build steps from privileged release steps.
Self-hosted runners extend CI/CD risk from software into infrastructure. Once a runner persists beyond a single job, the identity problem becomes environmental because compromise can survive between executions. That turns ephemeral automation into a foothold with lasting reach, especially when runners sit near production systems or internal services. The practitioner conclusion is that runner isolation is part of identity governance, not a separate operations concern.
Ephemeral workflow authority is the named concept here. GitHub Actions grants time-bound execution, but many organisations manage it as if it were durable access. That assumption fails when jobs inherit secrets, use mutable actions, and process untrusted inputs in one session. The implication is that CI/CD governance must move from periodic review of code files to runtime control of who and what can act inside the workflow boundary.
From our research library:
- 88% of security professionals are concerned about secrets sprawl, with 49% of those in larger organisations described as "very concerned", according to the 2024 State of Secrets Management Survey.
- Breaches involving third parties rose to 48% of all breaches, a 60% increase on the previous year, according to Verizon's 2026 Data Breach Investigations Report.
- Read next: Guide to the Secret Sprawl Challenge
What this signals
Workflow identity needs the same governance discipline as any other privileged non-human identity. GitHub Actions jobs inherit credentials, execute imported code, and often reach sensitive systems, so the control question is not whether automation exists but whether its runtime authority is bounded. The practical shift is to manage workflow identities, action provenance, and runner trust as one access model.
Secret sprawl becomes more dangerous when automation can consume secrets without human review. Once a workflow can read and relay credentials at machine speed, a single mistake or compromise can propagate across repositories and environments before normal detection catches up. That is why secrets handling, token scoping, and action trust need to be treated as runtime controls, not documentation checkboxes.
Ephemeral workflow authority: the access granted to a CI/CD job may exist only for minutes, but the blast radius can last far longer if logs, artifacts, or runners retain what the job touched. Practitioners should design for the shortest possible trust window and the smallest possible post-run residue.
For practitioners
- Restrict workflow permissions by default Start each repository with explicit minimal permissions and grant only the scopes a job truly needs. Legacy repositories should be checked for write-all defaults and reduced to read-only or narrower scopes where possible.
- Pin third-party actions to immutable commits Replace tag-based references such as version branches with commit hashes so action code cannot be silently repointed after approval. Review transitive dependencies inside reused actions before allowing them to run with repository secrets.
- Separate untrusted pull request code from privileged jobs Keep contributor-controlled code away from workflows that have secrets, release permissions, or deployment access. Use a split build model so validation and privileged publishing do not share the same trust boundary.
- Harden secrets handling in workflow steps Move credentials out of scripts, logs, and hardcoded values, and ensure only the minimum jobs can read each secret. Assume any secret visible to a runner is immediately usable by the code running there.
- Treat self-hosted runners as high-risk infrastructure Use ephemeral runners where possible, segment their network access, and rebuild them from clean images after use. Persistent runners should be monitored as infrastructure with a compromise blast radius, not as disposable build hosts.
Key takeaways
- GitHub Actions becomes risky when teams treat workflow execution as ordinary code rather than as a privileged identity path.
- Secrets exposure, broad token scope, mutable actions, and PR-triggered execution are the main mechanics that turn automation into attack surface.
- The limiting control is not a single setting but tighter runtime governance over tokens, actions, runners, and trust boundaries.
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 CIS Controls v8 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | The article centers on secrets leaking through workflows, logs, and exposed runtime contexts. |
| NHI-05 — Overprivileged NHI | Overbroad GITHUB_TOKEN permissions are a core attack path in the article. | |
| NHI-03 — Vulnerable Third-Party NHI | Third-party actions and reused dependencies are a major supply chain trust risk. | |
| Recommendation — Scan workflows and runners for secret leakage and revoke any credential exposed to build jobs. Reduce workflow token scope to the minimum permissions each job requires. Review external actions as third-party identities and pin them to immutable references. | ||
| MITRE ATT&CK | TA0006;TA0008 — Credential Access; Lateral Movement | The article describes credential theft and pivoting from workflows into connected systems. |
| Recommendation — Map workflow abuse to credential access and lateral movement to prioritise detections. | ||
| CIS Controls v8 | CIS-5 — Account Management | GitHub Actions tokens and runner access behave like managed accounts that need lifecycle control. |
| Recommendation — Apply account management discipline to workflow tokens, service access, and runner identities. | ||
Key terms
- Workflow Identity: A workflow identity is the non-human identity represented by an automated CI/CD process when it authenticates, accesses secrets, or performs actions in other systems. In practice, it is the authority carried by the pipeline itself, and it must be governed with explicit scope, review, and revocation.
- Mutable Action Reference: A mutable action reference is a workflow pointer that can change without the workflow file changing, such as a moving tag or version label. In CI/CD, this creates a trust dependency on repository integrity, because the same label can later resolve to different code and different security behaviour.
- Workflow Injection: Workflow injection is a technique where attacker-controlled input is placed into a CI/CD workflow so it executes unwanted commands. It often appears through pull requests, comments, issue fields, or dispatch events. The risk is remote code execution inside the build environment with access to sensitive tokens and artifacts.
- Self-hosted runner: A CI/CD execution environment managed by the organisation rather than the platform vendor. It often has broad access to source, secrets, and deployment targets, which makes it a high-value persistence and exfiltration point if workflow controls are weak.
Deepen your knowledge
NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
Published by the NHIMG editorial team on June 11, 2026.
Updated on October 10, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org