Megalodon GitHub Attack: 5,561 Repos Hit with Malicious CI/CD Workflows
The Hacker News reports a new automated campaign, dubbed Megalodon, that injected 5,718 malicious commits into 5,561 GitHub repositories within a mere six-hour window. This isn’t some casual defacement; the attacker leveraged throwaway accounts and forged author identities like “build-bot” and “ci-bot” to inject GitHub Actions workflows. The payload? Base64-encoded bash scripts designed to exfiltrate CI/CD secrets and environment variables.
This attack vector is insidious. By mimicking legitimate automation accounts, the attacker blends in, making detection difficult. The exfiltration of CI/CD secrets means direct access to deployment pipelines, source code, and potentially production environments. This isn’t just about stealing code; it’s about owning the entire build and deploy process, opening doors to supply chain attacks or even direct system compromise.
Defenders need to assume their CI/CD environments are prime targets. The attacker’s calculus is clear: compromise the automation, compromise everything it touches. This is a direct attack on the integrity of software development and deployment. Relying solely on code review won’t catch this if the workflow itself is subverted.
What This Means For You
- If your organization uses GitHub Actions or any CI/CD pipeline, you need to immediately audit all workflows for unauthorized changes, especially those introduced by bot-like accounts. Specifically, look for newly added base64-encoded bash payloads. Revoke any CI/CD secrets that may have been exposed and rotate all credentials used by your build processes. This isn't a hypothetical threat; it's an active campaign exploiting a critical trust boundary.
Related ATT&CK Techniques
🛡️ Detection Rules
3 rules · 6 SIEM formats3 detection rules auto-generated for this incident, mapped to MITRE ATT&CK. Sigma YAML is free — export to any SIEM format via the Intel Bot.
Megalodon Malicious GitHub Actions Workflow Injection
Indicators of Compromise
| ID | Type | Indicator |
|---|---|---|
| Megalodon-GitHub-Attack | Code Injection | GitHub Actions workflows containing base64-encoded bash payloads |
| Megalodon-GitHub-Attack | Information Disclosure | Exfiltration of CI/CD secrets |
| Megalodon-GitHub-Attack | Misconfiguration | Compromised GitHub repositories (5,561 affected) |