The GhostAction Breach: How Attackers Hijacked 1,900 GitHub Accounts to Hunt Secrets Across 30,000 Repositories
An analysis of the GhostAction campaign, where stolen personal access tokens weaponized CI/CD workflows to harvest AWS, OpenAI, and Anthropic API keys from Git histories.
Published: 2026.10.16
The Anatomy of the GhostAction Incursion and Its Macro Supply-Chain Shock
In early October, automated security monitors tracked an unprecedented campaign ripping through developer infrastructure. Attackers seized control of roughly 1,900 developer GitHub accounts. Rather than defacing codebases or holding source code for ransom, the adversaries turned developer privileges into a silent exfiltration engine. Dubbed “GhostAction” by threat researchers at GitGuardian and StepSecurity, the campaign injected credential-harvesting workflows into more than 30,000 software repositories across roughly 3,000 individual users and enterprise organizations.
Modern software organizations treat continuous integration and continuous delivery (CI/CD) pipelines as automated assembly lines. When a developer pushes code, automated runners test, package, and deploy the application. To do that work, the runner must have the keys to the kingdom: production database passwords, cloud deployment credentials, and third-party API keys. GhostAction turned this automated trust model against itself.
GhostAction Attack Lifecycle
From stolen developer identity to full historical credential exfiltration
Identity Theft
1,900 developer accounts compromised via leaked Personal Access Tokens
Silent Injection
Camouflaged workflow files added to over 30,000 target repositories
Automated Execution
GitHub Actions runners triggered using pre-configured repository secrets
History Scraping
actions/checkout@v4 clones full Git commit history (fetch-depth: 0)
Offsite Exfiltration
Harvested cloud and AI API keys transmitted over HTTP to rogue server
The attack required no zero-day exploit inside GitHub Actions itself. The infrastructure worked as designed: when an authenticated developer account committed a new workflow file, GitHub ran it. The attackers gave these malicious files reassuring, bureaucratic names like security-audit.yml and github_actions_security.yml. Because legitimate test jobs already called production variables, the disguised scripts immediately had read access to active environment secrets.
The payload evolved rapidly. Earlier iterations simply printed known CI/CD environment variables. The October escalation pulled down the entire commit timeline using actions/checkout@v4 with fetch-depth: 0. This instructed the runner to clone the complete Git history rather than just the latest commit snapshot.
The scripts systematically parsed commit logs for legacy AWS access keys, Google Cloud and Firebase tokens, GitLab and GitHub personal access tokens (PATs), and modern generative AI keys from OpenAI, Anthropic, and OpenRouter. Later versions of the payload even gathered surrounding lines of code to pair AWS Access Key IDs with their corresponding Secret Access Keys. The harvested keys were bundled and shipped over plain HTTP to an external server at 193.32.204.199.
The scale of the attack exposed a critical systemic blind spot: developers routinely assume that deleting an API token from their latest commit removes the risk. In reality, unless a team explicitly purges git commit trees or rotates the secret at the provider level, old credentials sit in repository commit histories indefinitely. GhostAction weaponized that historical debt on an industrial scale.
Hard Numbers from the Frontline: Comparing the August Probe and the October Surge
The GhostAction operation was not a one-off burst. Security telemetry shows a deliberate, multi-phase offensive that began with reconnaissance probes in late summer before exploding into thousands of organizations in October.
During August and September, the threat actors ran small-scale tests. Security telemetry tracked malicious workflows across 772 public repositories tied to 373 users and organizations. In that initial wave, the attackers triggered 3,669 workflow runs across 605 repositories. GitHub native approval controls blunted much of the initial damage: only 499 jobs managed to run, with 336 completing successfully. That preliminary run exfiltrated 26 credentials from 13 projects.
The real warning sign was repository hygiene. By October 5, weeks after the initial wave, only 16% of affected projects—just 124 out of 772 repositories—had actually removed the rogue workflows. Taking advantage of this inaction, the operators recycled 92 dormant workflows from earlier infrastructure dating back to late 2025.
| Campaign Phase / Vector | Summer Recon Wave (Aug–Sep) | October Blitzkrieg (Oct 8–9) | Enterprise Operational Risk Level |
|---|---|---|---|
| Compromised User Accounts | Estimated 120–150 developer accounts | ~1,900 accounts confirmed hijacked | Critical: Direct write-access credential theft |
| Targeted Repositories | 772 repositories across 373 orgs | 30,000+ repositories across 3,000 orgs | Extreme: Broad supply-chain penetration |
| Workflow Injection Method | Manual/semi-automated test scripts | Mass-automated batch commits | High: Camouflaged as standard audit jobs |
| Scope of Target Secrets | Active CI/CD environment variables | Deep Git history (fetch-depth: 0) | Catastrophic: Resurrects deleted historical keys |
| Credential Types Targeted | Basic cloud keys (AWS, GCP) | AWS, GitLab, GitHub, OpenAI, Anthropic | Critical: Exposes model endpoints and data pipelines |
| Remediation Speed (Cleaned Repos) | 16% cleanup rate after 30 days | Ongoing; thousands of unpatched projects | High: Lingering persistent access for attackers |
| Estimated Enterprise Triage Cost | $4,500–$12,000 per affected org | $45,000–$180,000 per affected org | Severe OPEX surge for audit and key rotation |
Note: Enterprise triage figures represent industry estimates based on average engineering billable hours ($120–$180/hr) for forensic audits, identity revocation, and multi-cloud key rotation.
Attack Velocity: Summer Probe vs. October Escalation
Comparing operational scale across both phases of the campaign
The data shows that the attackers used a two-step deployment on October 8 and 9. They pushed an updated payload to roughly 160 previously identified targets. Twenty minutes later, having validated that their historical scanning scripts worked without tripping platform circuit breakers, they deployed the payload across 28,000 new repositories in a coordinated surge.
The Direct Fallout on Engineering Budgets, Lead Times, and Cloud Integrity
When a security incident breaches the build pipeline, the resulting damage rarely stays confined to the software engineering department. It creates an operational tax that hits operating expenditures (OPEX), delivery timelines, and infrastructure governance.
OPEX and Blast-Radius Costs: The Hidden Toll of Secret Rotation
The most immediate financial hit from GhostAction is the cost of comprehensive secrets rotation. When an attacker steals a single static database password, changing that password is straightforward. But when an attacker scrapes 3,174 varied credentials spanning Amazon Web Services, Google Cloud, Firebase, Anthropic, and OpenAI, security teams cannot pick and choose what to rotate. Every credential that ever touched a compromised repository must be treated as breached.
Rotating an AWS root or administrative key requires auditing IAM policies, identifying every microservice relying on that role, issuing new access keys, updating secret stores, and validating production stability. For an enterprise engineering department with 50 microservices, a complete credential rotation cycle consumes between 80 and 200 engineer-hours. At standard enterprise engineering rates, an organization faces unexpected remediation costs ranging from $15,000 to over $100,000 per incident.
If an attacker captures an Anthropic or OpenAI API token with billing thresholds attached, the risk climbs further. Unauthorized third parties can route inference traffic through compromised corporate accounts, generating thousands of dollars in unbudgeted LLM inference fees within hours before automated rate limiters intervene.
Pipeline Delay and Deployment Friction: When CI/CD Becomes an Attack Vector
The second operational casualty is shipping velocity. In the wake of GhostAction, enterprise security teams frequently respond with blunt countermeasures: locking down runner environments, restricting third-party actions, and requiring manual manager approvals for every workflow modification.
These friction points disrupt lead times. In standard continuous delivery workflows, code merges trigger automated builds that deploy within minutes. Introducing mandatory multi-party approvals for configuration changes and freezing pipeline scripts can add hours or days to release cycles. Product fixes, customer patches, and feature updates stall in review queues while teams verify that .github/workflows/ files have not been tampered with.
Pipeline Hardening: Security vs. Delivery Velocity
The trade-offs engineering leaders face when locking down CI/CD runners
Defensive Guarantees
- ✓ Eliminates unauthorized workflow script execution
- ✓ Blocks runners from accessing external unknown IP addresses
- ✓ Prevents exposure of production secrets during pull requests
Operational Costs
- • Manual review requirements slow pull request merges
- • Self-hosted runner maintenance increases infrastructure overhead
- • Legacy deployment scripts require extensive refactoring
Persistent Supply-Chain Vulnerabilities and Zombie Infrastructure
The most dangerous element of GhostAction is its persistence. In the August wave, 84% of affected repositories remained uncleaned a month after the incident. This creates “zombie infrastructure”—compromised build scripts that sit dormant in secondary repositories until triggered by a casual commit or a dependency update.
Because the attackers targeted developer Personal Access Tokens (PATs) extracted from public data dumps, removing the malicious YAML file from the repository does not fix the underlying vulnerability. If the compromised developer account retains write access to the organization, the attacker can re-inject the payload at any time. Threat actors monitor their targets; when an organization quietly deletes a workflow without revoking the associated user token, the adversary simply commits a newly renamed runner script days later.
Defensive Countermeasures: How Modern Teams Neutralize Malicious Workflows
Relying on developers to spot rogue pull requests is no longer a viable defense. When an attacker uses a verified team member’s hijacked account, code review assumptions break down. Engineering teams need systemic controls that prevent unauthorized workflows from accessing sensitive credentials, even when a commit comes from a trusted identity.
Traditional CI/CD Trust vs. Zero-Trust Pipeline Architecture
Comparing default runner permissions against hardened enterprise controls
Legacy CI/CD Setup
Vulnerable by Default- • Long-lived Personal Access Tokens with broad write permissions
- • Static cloud keys stored in repository secrets
- • Full Git history cloned automatically on every run
- • Runners have unrestricted outbound internet access
Zero-Trust CI/CD Model
GhostAction Resilient- • Short-lived OIDC tokens scoped directly to cloud IAM roles
- • Workflows restricted to fetch-depth: 1 (shallow clones)
- • Fork and workflow run policies require explicit codeowner approvals
- • Outbound runner traffic restricted by network egress firewalls
Leading software teams rely on three core architectural shifts to eliminate the vectors exploited by GhostAction:
First, forward-looking teams eliminate static credentials entirely by adopting OpenID Connect (OIDC) between GitHub Actions and cloud providers. Instead of storing hardcoded AWS_SECRET_ACCESS_KEY or OPENAI_API_KEY strings inside GitHub’s secret store, the workflow runner requests a temporary, cryptographic token valid for only 15 minutes. Even if a rogue script dumps environment variables, those temporary credentials expire before the attacker can mount a secondary offensive.
Second, teams lock down outbound network egress from automated runners. The GhostAction payload relied on transmitting stolen credentials over raw HTTP to an external IP address (193.32.204.199). By routing runner traffic through dedicated VPC gateways or using egress monitoring tools like Datadog to track anomalous network destinations, security teams can automatically drop unauthorized outbound connections originating from build environments.
Third, platform engineers enforce strict pipeline-as-code policies. By enforcing branch protection rules that require codeowners outside the committer’s team to sign off on any modifications within .github/workflows/, organizations neutralize single-account takeovers. If a developer’s PAT is stolen, the attacker cannot silently commit a security-audit.yml file without triggering a mandatory review block from repository administrators.
The Three-Tier Defense Framework Against Pipeline Credential Theft
Organizations running CI/CD workloads must move past ad-hoc fixes and implement a multi-layered defense. Mitigating attacks like GhostAction requires a structured plan spanning immediate identity containment, pipeline boundary hardening, and ongoing secrets lifecycle management.
Systematic containment and prevention for engineering organizations
Identity Containment
Audit audit logs, terminate stale PATs, and enforce fine-grained scoped tokens
Pipeline Hardening
Deploy OIDC federation, shallow clones (fetch-depth: 1), and egress filtering
Secrets Lifecycle
Scrub historical Git commit trees and automate immediate multi-cloud key rotation
First Line of Defense: Immediate Identity Audit and Token Invalidation
The first priority is containing developer identities. Organizations must treat all Personal Access Tokens created before recent audit cycles as potentially suspect.
- Audit Organization-Wide Token Permissions: Immediately review GitHub audit logs for unusual PAT usage, specifically queries modifying files under the
.github/tree. Any PAT exhibiting activity from non-corporate IP ranges must be revoked instantly. - Enforce Fine-Grained, Short-Lived PATs: Deprecate classic personal access tokens across the organization. Mandate fine-grained PATs that restrict access to specific repositories, grant read-only permissions by default, and enforce an expiration ceiling of 30 to 90 days.
- Mandate Enterprise-Enforced MFA: Enforce hardware-backed multi-factor authentication (such as FIDO2 WebAuthn keys) across all organizational accounts to prevent credential dumps from granting direct administrative access.
Second Line of Defense: Pipeline Isolation and Access Control
Containing the identity layer is only half the battle. If a developer account is compromised, platform guardrails must prevent the runner from turning into an attack tool.
- Enforce Minimum Checkout Depth: Update CI/CD baseline templates to mandate
fetch-depth: 1on allactions/checkoutsteps unless historical analysis is explicitly required. Shallow clones prevent automated scanning scripts from scraping legacy commit logs. - Restrict Workflow Execution on Forked and Modified Branches: Configure organization repository settings to require explicit administrator approval before running workflows on pull requests that modify CI/CD configuration files.
- Isolate Network Access for CI Runners: If using self-hosted or containerized runners, deploy strict network egress policies. Block all direct outbound internet access by default, whitelisting only verified package registries, internal artifact repositories, and authorized cloud endpoints.
Third Line of Defense: Git History Sanitization and Secrets Management
The final layer addresses historical exposure. Simply removing sensitive credentials from the latest code push does not protect an organization from automated scanners.
- Scrub Repository Commit Histories: Use specialized rewriting utilities (such as
git-filter-repoor BFG Repo-Cleaner) to purge historical commits containing legacy secrets, API tokens, or configuration files. Once scrubbed, force-push the cleaned tree and invalidate all local developer clones. - Adopt Ephemeral Cloud Credentials via OIDC: Replace static, long-lived cloud keys in repository secret stores with dynamic OIDC federation for AWS, Google Cloud, and Microsoft Azure. Runners authenticate via temporary identity assertions, rendering scraped secrets useless within minutes.
- Implement Continuous Out-of-Band Secret Scanning: Deploy continuous secret detection across both public and private repositories. When a sensitive key matches an active cloud or AI provider signature, trigger automated revocation alerts that rotate the key immediately without waiting for human triage.
GhostAction demonstrates that the software supply chain’s weakest link is no longer open-source package dependencies alone. By turning trusted developer access tokens and continuous integration pipelines into harvesting tools, attackers have exposed the cost of unmanaged credentials. Securing modern development requires treating build automation not as an implicit circle of trust, but as an untrusted environment where every identity, script, and network packet must be continuously verified.