TL;DR: A malware campaign called Megalodon is spreading through GitHub repositories via fake automated commits, with OXSecurity reporting 3,500+ infected YAML files and over 5,000 repositories allegedly affected, while the malware steals cloud and developer credentials from CI/CD pipelines. The attack shows that repository trust, commit provenance, and pipeline execution controls must be treated as identity controls, not just code hygiene.
At a glance
What this is: A GitHub CI/CD malware campaign is abusing fake automated commits to execute inside pipelines, steal credentials, and spread through repositories at scale.
Why it matters: IAM and NHI teams need to treat repository identities, pipeline trust, and CI/CD secrets as a governed access surface because compromised automation can become a rapid propagation path.
By the numbers:
- 3,500+ repositories already carrying an infected YAML file show the campaign has moved beyond isolated compromise, according to OXSecurity.
- Over 5,000 GitHub repositories have allegedly been infected with CI/CD credential-stealing malware, according to OXSecurity.
Context
GitHub CI/CD pipelines are part of the identity plane because they execute code with credentials, tokens, and privileged automation context. When malware can enter through a fake commit and then run as trusted pipeline logic, the control failure is not just malicious code, but a broken trust model around non-human identities and repository provenance.
This campaign matters because CI/CD systems often hold the exact secrets attackers want next: cloud keys, SSH keys, API tokens, and environment variables. Once those are stolen, the repository stops being a software delivery asset and becomes a propagation and exfiltration channel.
The article describes a live malware campaign rather than a theoretical weakness, so the reader should interpret it as an operational governance problem. The central question is whether the organisation can distinguish legitimate automation from injected automation before the pipeline executes.
Key questions
Q: What breaks when CI/CD pipelines can be modified by untrusted repository input?
A: When untrusted repository input can change pipeline logic, attackers can turn build automation into code execution. The pipeline may run malicious commands, expose secrets, and let an attacker alter build outputs or release artifacts. In practice, that can expand a single repository compromise into wider environment access, especially when workflows have write permissions or shared credentials.
Q: Why do CI/CD systems increase the impact of compromised credentials?
A: CI/CD systems often hold powerful secrets that can unlock source code, deployment pipelines, cloud environments, and internal services. That concentration makes them attractive to attackers, because one exposed credential can provide broad downstream access. The risk grows further when secrets are long-lived, reused across systems, or not tightly monitored for unexpected use.
Q: What are the signs that a repository infection is becoming a supply chain issue?
A: Repeated workflow patterns, identical malicious YAML across many repositories, and bot-like commits that appear legitimate are strong warning signs. When the same payload shows up at scale, the problem has moved from a single compromise to a repeatable propagation mechanism. That is when repository review becomes a supply chain control problem, not a local incident.
Q: How should teams compare secret rotation with pipeline isolation when CI/CD is compromised?
A: Secret rotation is necessary after exposure, but it does not stop malware from reusing the same trust path if the pipeline still has broad privileges. Pipeline isolation changes where secrets can be read, which limits what the attacker can do next. In practice, rotation addresses the stolen material, while isolation addresses the mechanism that exposed it.
Technical breakdown
How fake automated commits turn repository trust into execution trust
The campaign uses fake bot-style commits to make malicious changes look like ordinary automation, then relies on repository owners merging them into CI/CD workflows. In GitHub, a commit that lands in a workflow file can change what the pipeline executes, which means provenance of the commit becomes provenance of the runtime. That is why repository identity, branch protection, and workflow approval matter together. If the merge path accepts untrusted automation, the attacker does not need to break the pipeline first. They only need to get code into the pipeline’s trusted execution path.
Practical implication: separate commit acceptance from workflow execution and require stronger review for files that define pipeline behaviour.
Why CI/CD secrets are a high-value collection target
CI/CD runners often inherit environment variables, cloud credentials, package tokens, and other secrets needed to build and deploy software. Malware running in that context can enumerate credentials, query cloud configuration, and steal tokens without needing broad initial access elsewhere in the enterprise. The article’s mention of AWS profiles, GitHub tokens, SSH keys, and API keys shows how one infected pipeline can expose multiple identity domains at once. This is not just secret leakage in the abstract. It is credential concentration inside a system that is designed to be automated and fast.
Practical implication: minimise the secret set available to build jobs and isolate high-trust credentials from general CI/CD runtime access.
What infected YAML files mean for pipeline governance
A YAML workflow file is not just configuration. In CI/CD systems it is executable policy that defines triggers, permissions, and downstream actions. When thousands of repositories contain the same infected YAML pattern, the issue becomes repeatable governance failure rather than a single bad repository. That is why scanning only source code is insufficient. Organisations need to treat workflow files, reusable actions, and bot identities as part of the identity and access perimeter. The technical lesson is that pipeline definitions are privileged assets and must be controlled with the same rigor as production access paths.
Practical implication: inventory and review workflow files as privileged assets, then tie changes to stricter approval and detection rules.
Threat narrative
Attacker objective: The attacker’s objective is to harvest reusable CI/CD and cloud credentials at scale while turning trusted automation into a propagation channel.
- Entry occurs through fake automated commits that make malicious workflow changes look like normal repository automation.
- Credential access happens when the malware executes inside the CI/CD pipeline and enumerates cloud keys, API tokens, SSH keys, and environment data.
- Lateral movement follows when stolen secrets can be reused across repositories, build systems, and cloud services that trust the same credentials.
- Impact is mass credential theft and broader repository compromise across thousands of GitHub projects.
Breaches seen in the wild
- reviewdog Action compromise 2025: A stolen maintainer token poisoned reviewdog/action-setup, leaking CI secrets including the tj-actions bot token used in the next attack.
- CircleCI breach 2023: Malware stole a CircleCI engineer's SSO session; attackers exfiltrated customers' CI/CD secrets and keys, forcing a platform-wide rotation.
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
Commit provenance has become an identity control, not a code review detail. This campaign succeeds because the pipeline treats a merged commit as evidence of legitimacy, even when the commit was designed to impersonate automation. That assumption was tolerable when repository changes were mostly human-authored and slow. It fails when malicious code can masquerade as a bot and inherit execution trust immediately. Practitioners need to recognise that provenance now governs who or what is allowed to run, not just what gets merged.
CI/CD credential concentration is the real blast-radius problem. The malware does not need a broad enterprise foothold if build runners already hold cloud keys, GitHub tokens, SSH material, and environment secrets. That concentration turns one infected workflow into many downstream identities and services. The named concept here is pipeline privilege spillover: credentials exposed in one automated path can be reused everywhere that trusts the same delivery system. The implication is that identity scope must be segmented at the pipeline layer, not assumed at the repository boundary.
Secrets governance fails when automation and authentication are designed in separate silos. CI/CD tooling often assumes that anything inside the runner is temporary and therefore implicitly safe, but the article shows that temporary execution still has durable identity consequences. Once a runner can read secrets, the damage is no longer confined to one build. That means secrets inventory, workflow permissions, and bot identity governance have to be managed as one control plane. Practitioners should stop treating build automation as a low-risk exception to identity governance.
OWASP-NHI controls are directly relevant because the pipeline itself behaves like a non-human identity estate. The infected workflow, bot account, token, and runner together form an NHI chain with ownership, scope, and offboarding requirements. This article demonstrates why secret leakage and overprivileged NHI patterns are not edge cases in software delivery. They are the default failure modes when automation is trusted more than it is governed. The practical conclusion is that NHI governance must extend into CI/CD design, not stop at vault policy.
Security teams should expect repository compromise to become a supply chain amplification event. When the same malicious YAML pattern appears across thousands of repositories, one compromise can become an ecosystem problem. That is a governance signal, not only a malware signal. Organisations that still separate software supply chain controls from identity controls will miss the shared root cause: privileged automation without lifecycle oversight. The practitioner takeaway is to align pipeline governance, secrets governance, and third-party action review under one model.
From our research library:
- 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, according to the State of Secrets Sprawl 2026.
- 96% of organisations store secrets outside of secrets managers in vulnerable locations including code, config files, and CI/CD tools, according to the Ultimate Guide to NHIs.
- Read next: Guide to the Secret Sprawl Challenge
What this signals
Pipeline privilege spillover: When a CI/CD runner can read cloud keys, SSH material, and API tokens in one execution context, a single infected workflow can become a multi-system identity event. Organisations need to treat build automation as a governed identity surface, not a convenience layer.
The next programme question is whether workflow permissions, runner secrets, and bot identities are controlled together or left to separate teams. If those controls are split, the same malware path can keep reappearing in different repositories with the same effect.
The article also reinforces a broader governance point: repository trust is no longer enough if the workflow file itself can change what trusted automation does. That pushes pipeline review, secret scoping, and offboarding of machine credentials into one lifecycle model.
For practitioners
- Tighten workflow change approval Require separate approval for repository changes that modify CI/CD workflows, reusable actions, or bot-triggered automation paths.
- Reduce pipeline secret exposure Remove broad cloud keys and long-lived API tokens from build jobs, then limit each runner to the smallest credential set needed for the task.
- Inventory infected repositories Search repositories for suspicious YAML patterns, fake bot identities, and repeated workflow signatures that indicate the same malware family.
- Separate build trust from release trust Treat code submission, workflow execution, and release publication as distinct trust decisions so one merged commit cannot automatically grant all privileges.
Key takeaways
- A fake commit can be enough to turn CI/CD into an execution and exfiltration channel when workflow trust is not separately governed.
- The campaign already spans thousands of repositories, which shows that the problem is repeatable malware propagation rather than an isolated repository incident.
- The control gap is not only secret rotation. It is the lack of strong separation between code approval, workflow execution, and privileged automation access.
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 campaign steals secrets from CI/CD runners and workflow contexts. |
| NHI-05 — Overprivileged NHI | CI/CD runners and tokens often have more access than each job needs. | |
| NHI-07 — Long-Lived Secrets | The article recommends rotating credentials after pipeline compromise because durable secrets are reusable. | |
| Recommendation — Scan build logs, workflow files, and runner environments for leaked secrets and revoke exposed credentials immediately. Reduce runner and token scope so pipeline identities cannot read or reuse broad production credentials. Replace long-lived pipeline secrets with short-lived credentials and rotate any exposed material immediately. | ||
| MITRE ATT&CK | TA0006;TA0008 — Credential Access; Lateral Movement | The malware steals credentials and can reuse them across repositories and services. |
| Recommendation — Map the infection path to credential access and lateral movement to prioritise detections around runner abuse. | ||
| CIS Controls v8 | CIS-5 — Account Management | The article centers on compromised automation identities and stale credentials in build systems. |
| Recommendation — Apply account management controls to CI/CD identities and remove unused tokens, keys, and bot accounts. | ||
Key terms
- CI/CD runner: A CI/CD runner is the execution environment that performs build, test, or deployment jobs. It often has access to source code, tokens, and cloud credentials, which makes it a high-value identity surface when workflows are compromised.
- Workflow file: A workflow file defines the automated steps a CI/CD platform will execute when triggered. Because it can grant or consume credentials at runtime, it functions as privileged policy, not just configuration, and changes to it can materially alter the system's identity trust boundary.
- Policy provenance: The ability to trace an AI-driven decision back to the exact policy, document, or record that informed it. In identity governance, provenance is what makes a recommendation reviewable and defensible. Without it, even a correct answer may fail audit or incident investigation requirements.
- Secrets Governance: Secrets governance is the discipline of controlling where credentials are stored, who can use them, how long they remain valid, and how they are removed. It links discovery, rotation, offboarding, and auditability so that a secret does not outlive the legitimate need for access.
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 responsible for identity security strategy or NHI governance in your organisation, it is worth exploring.
Published by the NHIMG editorial team on August 2, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org