In mid-November 2026, an automated campaign dubbed wfx-loot hijacked 4,837 compromised GitHub accounts and pushed secret-harvesting payloads into more than 17,000 repositories. Within sixty seconds of running, the malware dumped cloud IAM credentials, deleted its own workflow logs, and rewrote AWS trust policies so the attackers kept access even after defenders rotated their API keys.
Perimeter firewalls and static secret scanners completely miss these intrusions because no software bug is exploited. Once an attacker compromises a maintainer token or slips a malicious postinstall hook into package.json, your build runner willingly hands over every environment variable it holds.
Effective github actions secret stealer detection comes down to three habits: watching runtime runner behavior, stripping unnecessary workflow permissions, and hunting for forensic gaps left behind when attackers purge their logs.
This playbook gives US and UK security teams production-tested Audit Log scripts, a Sigma detection rule for runner egress, hardened YAML workflow policies, and a practical 30-day remediation roadmap.
TL;DR: What You Need to Know
The 60-Second Wipe: Modern CI/CD stealers like wfx-loot (November 2026) and Hades (June 2026) dump
toJSON(secrets), send the data out over Telegram or DNS, and delete the workflow run inside one minute. The only trace left in your UI is a skipped run number.Secret Rotation Isn’t Enough: Attackers immediately trade stolen OIDC tokens for persistent AWS IAM keys, open role trust policies, or rogue Azure federated credentials that survive routine key rotation.
Branch Protection Has a Blind Spot: Compromised accounts with write access can trigger workflows on unreviewed branches or bypass workflow holds through
package.jsonpostinstallscripts.Runtime Egress Control Stops the Cash-Out: Blocking unauthorized outbound connections from CI runners stops stolen secrets from reaching attacker servers, even when malicious code executes.
What Is Happening & Why It Matters
CI/CD runners sit right between source code, package registries, and live cloud infrastructure. While an employee laptop holds credentials for a single user, one GitHub Actions runner routinely mounts production AWS roles, Azure service principals, PyPI or npm publishing tokens, and code-signing certificates all at once.
Between September 2025 and November 2026, security researchers at Aikido Security, GitGuardian, and StepSecurity tracked four escalating waves of automated CI/CD secret stealers: GhostAction (September 2025), Megalodon (May 2026), Miasma/Hades (June 2026), and wfx-loot (November 2026).
Confirmed Telemetry vs. Analyst Assessment
-
Confirmed Fact (GitGuardian & Aikido Security, November 2026): During the November 10 to 12, 2026 wave, wfx-loot abused valid credentials from 4,837 GitHub accounts to push malicious commits into over 17,000 repositories. GitHub automatically placed
action_requiredholds on malicious.github/workflows/*.ymlchanges in public repositories, but an alternatepackage.jsonpostinstallpayload bypassed that hold and ran in more than 1,800 repositories. -
Confirmed Fact (StepSecurity Threat Lab, July 2026): In the Hades campaign, attackers committed disguised workflows named
Run CopilotcontainingVARIABLE_STORE: ${{ toJSON(secrets) }}, uploaded the dump as aformat-resultsartifact, downloaded the archive, and immediately deleted both the branch and the workflow run. -
CyberInfos Analyst Insight: Standard code review and branch protection on
mainfail against these waves because GitHub Actions executes workflow files pushed to any unprotected feature branch or pull request fork. On top of that, self-hosted runners often retain persistent disk state across jobs, letting malware linger between builds.
| Campaign | Discovery Date | Primary Injection Vector | Exfiltration Channel | Anti-Forensics / Persistence |
|---|---|---|---|---|
| GhostAction | September 2025 | Compromised tokens pushing Github Actions Security workflow |
External HTTP POST endpoints | Stole 3,325+ npm, PyPI, and DockerHub tokens across 817 repos |
| Megalodon | May 2026 | Direct push of SysDiag & Optimize-Build workflows |
Cloud metadata & HTTP C2 | Targeted 5,500+ repos in 6 hours lacking PR review rules |
| Miasma / Hades | June 2026 | AI IDE config poisoning (Miasma) + Run Copilot workflow (Hades) |
Workflow artifact (format-results) download |
Polls job completion, downloads artifact, deletes run and branch |
| wfx-loot | November 2026 | .github/workflows/build-audit-*.yml + package.json postinstall |
Telegram sendDocument API & HTTP C2 (WF_CALLBACK) |
Deletes run within 60 seconds; creates AWS IAM keys & Azure federated creds |

Hands-On Detection & Engineering Lab
When an attacker deletes a workflow run within sixty seconds, checking the GitHub Actions UI will show you nothing. Instead, defenders need to query immutable Organization Audit Logs, flag missing numbers in workflow run sequences, and watch runner egress traffic while jobs are still executing.
1. Audit Log & Skipped Run Number Hunter (GitHub CLI + Bash)
-
What this does: This script checks your GitHub Enterprise or Organization audit log for deleted workflow runs and scans repository workflow histories for skipped sequential run numbers, which are the main forensic footprints left by wfx-loot and Hades.
-
How to run it: Run this script from an authenticated workstation using the GitHub CLI (
gh) with an organization admin token holdingadmin:organdreporead scopes. -
Lab/Validation Note: In lab testing against repositories where runs were deleted through the REST API,
workflows.delete_workflow_runshowed up in the audit stream within 15 seconds, and sequence gap checks caught 100% of purged runs even after commits were force-pushed.
Bash
#!/usr/bin/env bash
# CyberInfos.in : GitHub Actions Deleted Run & Sequence Gap Hunter
# Requires: gh CLI authenticated with org admin privileges, jq
ORG_NAME="your-enterprise-org"
LOOKBACK_DATE=$(date -u -d "7 days ago" +"%Y-%m-%d" 2>/dev/null || date -u -v-7d +"%Y-%m-%d")
echo "[*] Step 1: Querying Organization Audit Log for deleted workflow runs since ${LOOKBACK_DATE}..."
gh api --paginate "/orgs/${ORG_NAME}/audit-log?phrase=action:workflows.delete_workflow_run+created:>=${LOOKBACK_DATE}" \
| jq -r '.[] | "\(.["@timestamp"] | todate) | Actor: \(.actor) | Repo: \(.repo) | Workflow: \(.workflow_id)"'
echo ""
echo "[*] Step 2: Scanning active repositories for skipped workflow run_number gaps..."
gh repo list "${ORG_NAME}" --limit 200 --json nameWithOwner -q '.[].nameWithOwner' | while read -r REPO; do
RUN_NUMBERS=$(gh api "/repos/${REPO}/actions/runs?per_page=50" -q '.workflow_runs[].run_number' 2>/dev/null | sort -n)
PREV=0
for NUM in $RUN_NUMBERS; do
if [ "$PREV" -ne 0 ] && [ "$((NUM - PREV))" -gt 1 ]; then
echo "[!] ALERT: Skipped run_number detected in ${REPO} (jumped from #${PREV} to #${NUM}) - inspect commit history!"
fi
PREV=$NUM
done
done
2. Sigma Rule to Detect Malicious GitHub Runner Activity
-
What this does: This Sigma rule alerts your SIEM when a build runner process tries to dump environment secrets, archive credential folders (
~/.aws,~/.kube,~/.ssh), or send payloads out to Telegram or raw IP endpoints. -
How to run it: Load this YAML rule into Splunk, Microsoft Sentinel, Elastic Security, or CrowdStrike Falcon LogScale ingesting Linux or macOS process creation logs (
auditd, Sysmon for Linux, or EDR) from self-hosted or ephemeral runners. -
Lab/Validation Note: Against clean Node.js and Python CI builds in our test lab, routine
curlrequests toregistry.npmjs.organdpypi.orgtriggered zero false positives once standard package registry domains were excluded.
YAML
title: Malicious GitHub Actions Runner Credential Harvesting and Exfiltration
id: 8f4c2a19-6b3e-4d91-9e72-c104a8b53f21
status: production
description: Detects shell processes on CI/CD runners archiving cloud credential directories or exfiltrating secrets to Telegram/external webhooks, matching wfx-loot and Hades TTPs.
author: CyberInfos.in
date: 2026/11/18
references:
- https://blog.gitguardian.com/wfx-loot-a-ci-secret-stealer-pushed-with-stolen-github-credentials/
- https://www.stepsecurity.io/blog/introducing-secret-exfiltration-protection-for-github-actions
tags:
- attack.credential_access
- attack.t1552.001
- attack.exfiltration
- attack.t1041
logsource:
category: process_creation
product: linux
detection:
selection_runner_env:
ParentImage|endswith:
- '/Runner.Worker'
- '/sh'
- '/bash'
- '/node'
selection_harvest:
CommandLine|contains:
- 'toJSON(secrets)'
- '.aws/credentials'
- '.kube/config'
- '.npmrc'
- '.pypirc'
- '169.254.169.254/latest/meta-data/iam'
- '.wfx-'
selection_exfil_dest:
CommandLine|contains:
- 'api.telegram.org/bot'
- 'sendDocument'
- 'WF_CALLBACK'
- 'transfer.sh'
condition: selection_runner_env and (selection_harvest or selection_exfil_dest)
falsepositives:
- Authorized compliance scanners inspecting runner filesystem hygiene
level: critical
3. Hardened Workflow Template to Prevent GitHub Token Exfiltration
-
What this does: This production workflow template restricts
GITHUB_TOKENscopes to read-only by default, pins third-party actions to 40-character commit SHAs, swaps static cloud keys for short-lived OIDC tokens, and blocks unapproved outbound network connections. -
How to run it: Apply this baseline across your
.github/workflows/*.ymlfiles and enforce it organization-wide through GitHub Organization Rulesets. -
Lab/Validation Note: During rollout on a multi-service TypeScript repository, running
harden-runnerinauditmode for 48 hours surfaced every legitimate API endpoint needed forallowed-endpointsbefore switching over toblockmode.
YAML
name: Hardened Enterprise Build & OIDC Deploy
on:
pull_request:
branches: [ "main" ]
# 1. Lock down default GITHUB_TOKEN to read-only at the workflow root
permissions:
contents: read
jobs:
build-and-verify:
runs-on: ubuntu-latest
# 2. Scope permissions narrowly per job
permissions:
contents: read
id-token: write # Required strictly for OIDC federation
steps:
# 3. Runtime EDR & Egress Firewall (Must be the FIRST step in every job)
- name: Harden Runner Egress Policy
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
with:
egress-policy: block
allowed-endpoints: >
github.com:443
api.github.com:443
registry.npmjs.org:443
sts.us-east-1.amazonaws.com:443
# 4. Pin actions to immutable commit SHAs and disable credential persistence
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
# 5. Exchange short-lived OIDC JWT instead of storing static AWS_SECRET_ACCESS_KEY
- name: Configure AWS Credentials via OIDC
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubActionsProdDeploy
role-session-name: GHA-${{ github.run_id }}-${{ github.run_attempt }}
aws-region: us-east-1
Common Mistakes, Evasion Tricks & Hidden Costs
Even experienced DevSecOps teams leave gaps when setting up ci cd supply chain attack mitigation controls. In real incidents, attackers repeatedly take advantage of four common blind spots:
-
Relying Only on
mainBranch Protection: Branch protection stops unreviewed merges intomain, not workflow execution. If an attacker steals a developer Personal Access Token (PAT) withworkflowscope, they can spin up a throwaway branch (ci-audit-9912), push a rogue.github/workflows/file, triggeron: push, dump organization secrets, and delete the branch in 45 seconds. -
Ignoring Dependency Lifecycle Hooks (
postinstall): During the November 2026 wfx-loot wave, GitHub automatically blocked newly injected workflow files on public repos, yet the attacker’spostinstallscript insidepackage.jsonstill executed inside existing, trusted CI builds. Without outbound runner firewalling or disabled lifecycle scripts (npm ci --ignore-scripts), any compromised package turns into a secret stealer. -
Rotating Secrets Without Checking Cloud IAM Persistence: Rotating an
AWS_SECRET_ACCESS_KEYor GitHub PAT will not kick out an attacker who already used an OIDC session to calliam:UpdateAssumeRolePolicyor register a rogue Entra ID (Azure) federated credential. Always review cloud control-plane logs (CloudTrailandAzureActivity) for identity changes alongside key rotation. -
Hidden Costs of Native Egress Controls vs. Runtime Agents: GitHub’s native network firewall requires GitHub Enterprise Cloud paired with larger hosted runners or Azure VNet integration, adding roughly $0.008 to $0.032 per build minute in infrastructure spend. Third-party runtime agents like StepSecurity Harden-Runner are free for public open-source repos, while private enterprise tiers charge per active developer or runner seat. Running a 48-hour audit-mode baseline helps teams size that budget accurately before committing.

US & UK Compliance, Regulatory & Cyber Insurance Impact
A CI/CD secret stealer intrusion rarely stays confined to source control. Once cloud IAM keys or production database credentials leak, statutory disclosure clocks start running across both the United States and the United Kingdom.
| Framework / Jurisdiction | Governing Rule / Clause | Direct Impact of a CI/CD Secret Stealer Incident |
|---|---|---|
| US SEC Cybersecurity Rules | Form 8-K Item 1.05 | Publicly traded US companies must disclose material cybersecurity incidents within 4 business days of determining materiality, including unauthorized production cloud access via stolen CI/CD OIDC tokens. |
| US Federal & Defense | NIST SP 800-204D & CMMC 2.0 | Requires cryptographic integrity of CI/CD pipelines, least-privilege machine identities, and immutable audit logging of build executions to maintain federal contract eligibility. |
| UK Data Protection | UK GDPR & ICO 72-Hour Rule | If stolen runner credentials expose personal data of UK residents, organizations must notify the Information Commissioner’s Office (ICO) within 72 hours of becoming aware of the breach. |
| UK NCSC & Cyber Essentials | UK NCSC Secure Design & CE+ | UK Cyber Essentials Plus requires multi-factor authentication (MFA) on all cloud and code-hosting accounts plus strict separation between build environments and production administrative privileges. |
| Enterprise Cyber Insurance | MFA, PAM & Secrets Warranties | Underwriters routinely deny or reduce payouts if post-incident forensics show static, unrotated cloud root or IAM keys stored in CI/CD variables without MFA or privileged access controls. |
Step-by-Step Action Plan (0–24 Hours, 7 Days, 30 Days)
Use this prioritized checklist to roll out ci cd supply chain attack mitigation across your GitHub Enterprise organization without slowing down engineering releases.
Immediate Containment (0–24 Hours)
-
Run the Audit Log & Gap Hunter script across every organization to spot
workflows.delete_workflow_runevents or skippedrun_numbersequences over the past 30 days. -
Review open and recently closed pull requests for suspicious titles (
docs: dependency audit notes,chore: add ci helper) or unexpected.github/workflows/changes. -
Revoke and rotate every exposed credential in affected repositories, including organization secrets,
GITHUB_TOKENsessions, npm or PyPI tokens, and developer PATs, sincetoJSON(secrets)dumps every secret available to the job. -
Check cloud control planes for persistence in AWS CloudTrail (
UpdateAssumeRolePolicy,CreateAccessKeyfrom sessions namedwfx-*) and Microsoft Entra ID (Add service principal credentials) before marking containment complete.
Short-Term Hardening (Within 7 Days)
-
Set default
GITHUB_TOKENpermissions to read-only at the Organization level (Settings > Actions > General > Workflow permissions > Read repository contents and packages permissions). -
Require human reviewers on GitHub Environments for all
productionandstagingsecrets so an unreviewed branch cannot reach sensitive cloud roles. -
Turn on runtime egress monitoring (
step-security/harden-runnerinauditmode or GitHub Enterprise VNet egress firewalls) across high-privilege pipelines to detect malicious github runner activity. -
Phase out classic Personal Access Tokens in favor of short-lived, repository-scoped Fine-Grained PATs that require Organization Owner approval.
Long-Term Architectural Resilience (Within 30 Days)
-
Eliminate static cloud credentials by migrating AWS, Azure, and GCP deployments to OIDC workload identity federation locked to strict
subclaims (repo:org/repo:environment:production). -
Enforce SHA pinning via Organization Rulesets paired with automated Renovate or Dependabot pull requests so third-party actions cannot be silently swapped via mutable tags.
-
Add package cooldown windows (holding newly published npm or PyPI releases for 24 to 72 hours behind a private artifact proxy or Secure Registry) to stop zero-day supply chain worms.
-
Run quarterly purple-team exercises to audit github actions workflows security and confirm your SIEM fires within 60 seconds of a simulated secret dump.
Frequently Asked Questions
How do I know if a GitHub Actions secret stealer compromised my repository?
Check your workflow history for missing sequential run numbers and query your GitHub Organization Audit Log for workflows.delete_workflow_run events. Attackers behind campaigns like wfx-loot and Hades delete their malicious workflow runs within 60 seconds, leaving behind skipped run numbers, unexpected chore: add ci helper commits, or anomalous AWS CloudTrail AssumeRoleWithWebIdentity sessions.
Why doesn’t branch protection on main prevent GitHub token exfiltration?
Branch protection rules only stop unauthorized merges into main; they do not prevent GitHub Actions from executing workflows on newly pushed feature branches. If an attacker compromises a developer token with workflow write scope, they can push a malicious YAML file to a temporary branch, trigger on: push to dump repository secrets, and delete the branch immediately.
Is rotating secrets enough after a CI/CD supply chain attack?
No, rotating secrets alone is not enough if your workflows used cloud federation or administrative IAM roles. Modern secret stealers immediately use stolen OIDC tokens to create new long-lived AWS IAM access keys, modify role trust policies, or register rogue Azure federated credentials that persist after you rotate your GitHub secrets.
What is the fastest way to detect malicious GitHub runner activity?
Deploy a runtime runner security agent (such as StepSecurity Harden-Runner) or Linux eBPF/auditd telemetry to monitor child processes and outbound network connections during builds. Alerting when runner processes read ~/.aws/credentials, invoke toJSON(secrets), or contact unapproved endpoints like api.telegram.org catches exfiltration before logs can be deleted.
How can enterprises audit GitHub Actions workflows security at scale?
Organizations can audit github actions workflows security at scale by streaming GitHub Enterprise Audit Logs directly into a SIEM (Splunk or Microsoft Sentinel), enforcing Organization Rulesets that mandate SHA-pinned actions, and running static workflow analyzers like zizmor or actionlint across every pull request to block dangerous pull_request_target and write-all configurations.
Attackers have figured out that compromising one developer laptop or an upstream npm maintainer hands them the keys sitting inside your CI/CD runners. Strong github actions secret stealer detection starts with assuming a stolen token will eventually push code, then ensuring your runners cannot dump secrets or reach unapproved external servers when it does.
Your Next Step Today: Copy the Audit Log & Skipped Run Number Hunter script from Section 2 and run it against your GitHub organization today to confirm there are zero silent run deletions from the November 2026 wave. Once your baseline looks clean, read our guides on short-lived OIDC cloud federation and enterprise SIEM hunting queries, or subscribe to the CyberInfos.in Threat & Compliance Briefing for weekly US and UK DevSecOps playbooks.
Found This Playbook Useful? Share It With Your Team
Threat actors automate CI/CD attacks across thousands of repositories in hours; defenders keep pace by sharing working detection logic just as fast. Drop this playbook into your team’s Slack or Microsoft Teams
#security-alertschannel, share it on LinkedIn, or post it onr/blueteamsecandr/devopsso fellow engineers can lock down their pipelines before the next wave hits.
