GhostAction Returns: Fake Audits Steal GitHub Repo Secrets

·

‘보안 점검’ 이름 단 자동화 파일... 깃허브 저장소 수만 곳에 인증 정보 탈취 코드 심겨

The GhostAction campaign, first detected in September 2025, has returned with a second wave. As of the 9th, Socket’s investigation confirmed that more than 500 GitHub accounts pushed malicious workflows named ‘security-audit.yml’ and ‘github_actions_security.yml’ to tens of thousands of repositories. The workflows extract 13 types of credentials from registered secrets, repository working folders, and the full Git history, then transmit them via unencrypted HTTP to an external server (193.32.204[.]199). According to GitGuardian’s tally, 2,577 secrets have been exposed across 772 public repositories.

How the Malicious Workflow Operates and the Intrusion Path

GitHub Actions has the authority to execute arbitrary code inside a repository, meaning even a single-line workflow compromise leads directly to the immediate exfiltration of all registered secrets. The two files used in this attack run only a single ‘Audit’ step and are triggered by workflow_dispatch (manual execution) and unfiltered push events. In CI logs, they are nearly indistinguishable from legitimate audit jobs.

The malicious step first reads Actions secrets registered on the repository and organization, then scans the working folder and the full Git history, using regex-based pattern matching to extract credentials. The 13 targeted patterns include AWS access key IDs (paired with their secret keys), generative AI service API keys such as Anthropic’s sk-ant-, OpenAI’s sk-, and OpenRouter’s sk-or-, GitHub ghp_ tokens, GitLab glpat- tokens, and PyPI, npm, and Docker Hub publishing tokens. The collected data is sent to the external IP via HTTP POST without any encryption.

According to Socket’s analysis, the workflow was deployed to 27 repositories starting at 13:20 UTC from the account of Takashi Kitao, a Pyfhel developer. About 8 hours later, the same file was pushed to 318 repositories within 16 minutes from the account of Henry Wu (original author of athenadriver). At the time of the Henry Wu account compromise, 279 of his forks had already been injected with the same file, and subsequent sync operations by downstream forks could inherit the malicious workflow. Any repository with GitHub Actions enabled will automatically re-run the secret collection procedure on the next push. The initial intrusion path is believed to involve theft of the maintainer’s GitHub credentials (personal access tokens, PATs), with tokens harvested from infostealer malware logs or past breach data being reused directly for workflow reconnaissance.

Spread Scale and Exposure Comparison vs. the First Campaign

While the GhostAction 2nd wave is directly connected to the first attack, it shows clear differences in impact scope and targeting. The first campaign showed no attempts to deliver separate payloads beyond secret exfiltration, whereas the second wave has made npm, PyPI, and Docker Hub tokens primary collection targets, raising the possibility of follow-on supply-chain attacks via package registries.

Category GhostAction 1st Campaign GhostAction 2nd Campaign
Discovery Date Early September 2025 After September 7, 2025
Affected Accounts 327 GitHub users 500+
Compromised Repositories 817 772 public repositories
Exposed Secrets 3,325 2,577
Primary Targets Focused on PyPI, npm, Docker Hub tokens Expanded to AWS, Anthropic, OpenAI, OpenRouter, GitHub, and GitLab tokens
C2 Communication Unconfirmed 193.32.204[.]199 (HTTP)

No cases of malicious packages being published using the deployment credentials stolen in the second wave have been officially confirmed. GitGuardian tallied that public repositories belonging to 373 users and organizations were targeted between August 31 and September 30.

Compromise Assessment, Immediate Response, and Recurrence-Prevention Framework

The starting point for compromise assessment is the presence of the files. Check whether security-audit.yml or github_actions_security.yml was added to any repository after August 31, and immediately delete the file from all branches, forks, and mirrors upon detection. Cross-reference the IP addresses and User-Agent strings from the ‘Audit’ step in Actions logs to trace additional spread paths, and register the indicators (IPs, file names) published by GitGuardian, Socket, and StepSecurity as IOCs for continuous SIEM monitoring.

Exposed credentials must be revoked and reissued immediately. This applies not only to GitHub PATs and SSH keys, but also to all repository and organization secrets, plus AWS, Anthropic, OpenAI, OpenRouter, PyPI, npm, and Docker Hub tokens. Enable Secret scanning and Push protection in Settings > Code security and analysis, and configure Dependabot secret scanning to automatically detect leaked secrets. Force Actions > General > Workflow permissions to ‘Read repository contents and packages’ and set the default GITHUB_TOKEN permissions to read-only.

For the long term, AWS and cloud authentication should be migrated to OIDC federation so that access keys are no longer stored in repository secrets. When referencing third-party Actions, pin to a commit SHA rather than a tag, and automate SHA updates with Renovate or Dependabot. Protect the .github/workflows directory with CODEOWNERS to block indiscriminate PR merges, and for forks from untrusted sources, disable Actions or apply an allow-list to control automatic inheritance. The same logic applies to applying branch protection (Required reviewers, Required status checks) to externally dependent workflows.

Remaining Risks and the Possibility of Supply-Chain Follow-On Attacks

The GhostAction incident clearly demonstrates that when the structural permissions of GitHub Actions combine with the auto-sync characteristics of the fork ecosystem, a single compromise can amplify to tens of thousands of repositories. The fact that respected developer accounts were abused as conduits, and that PRs were likely merged under the plausible pretext of a ‘security audit’, vividly illustrates how dangerous merge policies without external source verification can be. The consolidated tracking results from Socket, StepSecurity, and GitGuardian reported by Boannews confirm that even a single workflow intrusion can lead to large-scale credential exfiltration.

Follow-on threats around the exposed credentials are also a variable. As long as the credential pairs remain valid, malicious packages can be published to registries like npm, PyPI, and Docker Hub to attack downstream users through supply-chain compromise. Although no publication incidents have been confirmed yet, registry-side token rotation and package integrity verification must be carried out promptly from the moment of compromise to prevent a secondary incident. The fact that this incident’s attack surface was compressed into a single workflow ties directly to the environmental context highlighted by the Korea Cybersecurity Gap diagnosis. Without a system that regularly audits repository secrets, workflow permissions, fork synchronization, and Action SHA pinning as a single bundle, predicting the next target is virtually impossible.

Leave a Reply

Your email address will not be published. Required fields are marked *