CI Secrets: Whoever Can Push Can Read Them
GitHub's own guidance says any user with write access to a repository has read access to all of its secrets, and in October 2026 a workflow file pushed with a stolen token targeted more than 30,000 repositories that way. Pinning actions did nothing against it. The controls that count are no direct pushes to the default branch, code owners on the workflow directory, environment secrets behind reviewers, short-lived credentials, and a rotation that covers everything ever committed.
A file named security-audit.yml lands in the .github/workflows directory on a repository's default branch. On that push it checks out the full git history, reads the secrets whose names the attacker had already copied out of the repository's own workflows, and posts what it gathers to a bare IP address over plain HTTP. GitGuardian, in a running report first published on 7 October 2026 and updated on 9 and 13 October, counted more than 30,000 repositories targeted across about 3,000 users and organisations between 8 and 12 October, with about 1,900 accounts compromised and 3,174 secrets targeted. Socket and StepSecurity published forensics on 9 October. The campaign is called GhostAction, and the credential that let the file in was, StepSecurity reckons, a personal access token lifted from an infostealer log.
The response that counted was not a setting anyone had switched on. GitGuardian reports that GitHub began preventing the workflow from running on 9 October, and that the pushes on 10 and 12 October extracted nothing. The control that stops a hijacked action, pinning it to a commit, is no use here, because no third-party action was involved. GitHub's Secure use reference states the boundary in one sentence, under “Principle of least privilege”: “Any user with write access to your repository has read access to all secrets configured in your repository.” A stolen token with write access carries that read access with it, and a workflow file pushed to the default branch is what turns it into a dump.
Pinning did nothing, because nothing was hijacked
This is a different door from a compromised action. The guide on pinning actions to a commit SHA covers the case where a tag someone trusted starts resolving to malicious code. GhostAction trusted nothing of yours. It wrote a new workflow and pushed it, and the file did its own work on the runner. The detail that makes it quiet is that the attacker read the secret names out of the repository's existing workflows and hardcoded them; the file then asks only for credentials it already knows exist.
- Both lock dependencies only. SHA pinning and the workflow lockfiles GitHub put into public preview on 14 October both fix what an action resolves to. GitHub says a lockfile “does not determine whether the dependency itself is safe”, and neither mechanism looks at a workflow file pushed into the directory in the first place.
- The secret names came from you. The attacker's tooling copied the names referenced in your legitimate workflows into the file before pushing it, which is why no run ever had to enumerate them. A run that lists them back has already told the attacker what the repository can reach.
- Push and dispatch, no filter. Socket found the file triggers on an unfiltered
pushand onworkflow_dispatch; it runs the moment it lands and again on demand.
GitHub's detector caught it, and you cannot configure it
The runs that stalled in action_required match GitHub's own detector rather than any repository option. GitHub shipped that detector on 28 July 2026 under the heading “GitHub Actions holds potentially malicious workflows for approval”. It applies to public repositories on github.com, needs no configuration, and is absent from GitHub Enterprise Server. GitGuardian names no mechanism, but its record fits: GitHub held most of the September runs for approval, the 8 October runs executed, and from 9 October GitHub prevented the workflow from running at all. A detector you cannot configure is not a control you own. GitHub's approval settings cover workflows from fork pull requests only. Nothing you can set holds a workflow that an account with write access pushes, apart from an environment's protection rules, such as required reviewers, in front of a job.
What you own is the push path. Block direct pushes to the default branch with “Require a pull request before merging” or “Restrict updates”, then put .github/workflows behind a CODEOWNERS entry with required code-owner review. CODEOWNERS is a merge gate and never blocks a direct push, which is why the branch rule comes first. The plan limits matter: GitHub lists protected branches, code owners and required reviewers under Pro and Team for private repositories, a Free organisation can restrict who pushes to a public repository's branches, and push rulesets with “Restrict file paths” exist for private and internal repositories only. Environment secrets follow the same line, available to public repositories on Free and to private ones on Pro, Team or Enterprise. Required reviewers on an environment are narrower still: on Free, Pro and Team they exist for public repositories only, and a private repository needs Enterprise.
Protecting main is not the whole fix
Branch protection stops GhostAction's exact move, a push to the default branch. It does not stop the general one. GitHub's push documentation says a run “includes workflows that are not merged into the default branch”, which means a file pushed to a new, unprotected branch still runs on push. Only environment secrets wait on required reviewers and deployment branch rules; a repository or organisation secret carries no branch condition. Gate the secrets too.
Make the dump worthless
If the credentials the run can read expire before anyone uses them, a dump buys little. OpenID Connect replaces a stored cloud key with a token the workflow exchanges for a short-lived credential straight from the provider, valid for a single job and then expired, with no long-lived secret kept in GitHub. The point is the trust condition on the cloud role: bind it to the repository, branch and environment claims in the token, so a workflow on some other branch gets nothing. Move the keys that have to stay into environment secrets. The same GitHub page, under “Consider requiring review for access to secrets”, says: “A workflow job cannot access environment secrets until approval is granted by a reviewer.” The deployment branch rules apply to that job as well. On a private repository that gate needs an Enterprise plan, and below it OIDC with a tight trust condition is the control you have.
The categories the campaign took tell you what to replace. GitGuardian's table for the August to September wave of 772 repositories lists SSH and deployment keys 446, Azure 218, container registry 142 and AWS 106; it publishes no category breakdown for the October wave. Each of those has a short-lived alternative worth the move: OIDC for AWS and Azure, registry tokens minted per job, deploy keys swapped for a least-privilege app token.
The collector was a bare IP address reached over plain HTTP, so DNS filtering never saw a hostname to block. A runner egress allowlist at the network layer is what refuses a destination like that; the mechanics of catching an exfiltration drip belong to the sandbox egress guide, and here the allowlist is plain configuration rather than a feature of one vendor.
A secret deleted from git is still in git
The October variant checked out with fetch-depth: 0, which pulls the full history rather than the latest commit. It then searched the working tree and every past commit for cloud keys and tokens, and kept a window of context around each AWS key id. A credential you removed from the current tree still sits in the commit that first added it. Rotation scope is therefore every credential ever committed to any branch or tag, rather than what git status shows today.
So read your own history the way the sweep did. The scan below mirrors every ref, runs a secret scanner across the full log, and checks for the campaign's indicators in one pass.
#!/usr/bin/env bash
set -euo pipefail
# ALL REFS, not a shallow clone
git clone --mirror "$1" repo.git
cd repo.git
# ROTATE SCOPE: every commit ever
# exit 0 so the IOC search still runs
gitleaks git . \
--log-opts '--all --full-history' \
--report-path leaks.json \
--exit-code 0
# IOCs from the October 2026 wave
git log --all --oneline -S \
'193.32.204.199'
git log --all --oneline -- \
':(glob)**/security-audit.yml' \
':(glob)**/.vscode/tasks.json'
# A hit here: rotate the secret.
# A campaign commit: revoke the
# token that pushed it.
echo "hits: $(jq length leaks.json)"
The indicators are published. Socket and GitGuardian name the collector IP 193.32.204[.]199, the workflow file names (security-audit.yml in October, github_actions_security.yml and security-check.yml earlier), and the AKIA_CTX_START marker the payload wrapped around AWS key ids. A scanner hit in your history is a credential to treat as exposed: rotate it, then find the commit it rode in on and the account that pushed it. A match on the IP is the campaign's own commit, or your removal of it. A match on a file name is one to open before you act, because repositories carry a security-audit.yml or a .vscode/tasks.json of their own. For a campaign commit, revoke the token of the account that pushed it.
Revoke the token that pushed the file
Deleting the file is not cleanup. OpenSourceMalware reported a second stage on 16 October: 94 repositories across 66 owners, a hidden .vscode/tasks.json that runs a fake font file (38 lines of Node.js) when the folder opens, and a cron entry set to run every five minutes. The fake-font launcher copies a trick OpenSourceMalware credits Thijs Xhaflaire of Jamf Threat Labs with finding in January 2026. The second stage landed a median of 6.3 days after the first, and two owners who had removed the first file on 9 October were hit again on 15 October; OpenSourceMalware's reading is that whatever pushed the first stage still had access, because deleting a workflow does not revoke a token.
That second stage is narrower than it reads. The VS Code setting task.allowAutomaticTasks reads off by default, and an automatic task never runs in an untrusted workspace. The default and an off you have written behave differently, though. Left unset, VS Code shows a prompt once per workspace when a trusted folder has automatic tasks, and clicking Allow writes on into the user settings, so every trusted folder opened after that runs its automatic tasks without asking. Only an off written in user settings stops the prompt and the tasks. So the font ran only where a developer had trusted the folder and either clicked Allow or already had the value on. Set it to off explicitly in user settings, and check whether it already reads on because someone clicked Allow. Rotate the credentials the stage reads: SSH keys, cloud and registry tokens, kubeconfig and any AI tool logins.
Then the token. Rotating the secrets it read closes nothing on its own; revoke the personal access token that pushed the file, or the same credential lands it again. Move bots onto a GitHub App where you can; GitHub's own guidance for automations says so. Where a personal access token has to stay, make it fine-grained, give it an expiry (the form proposes 30 days; infinite lifetimes are allowed until your organisation sets a maximum lifetime policy, and it should) and scope it to the repositories it needs. On GitHub Enterprise, push attribution entered limited public preview on 12 October: GitHub records the authenticated account that pushed each commit next to author and committer, and a new rule condition, “Committer must match pusher”, blocks a push whose committer email is not a verified email of the account pushing it. It is on request through an account team rather than a switch for most teams, and neither that changelog nor the GitHub App least-privilege one of 13 October names GhostAction.
Watch the history give up its secrets
Press Deepen the clone below. The rail is one branch's history, where an AWS access key and a deploy key were committed months ago and taken out in a later commit, which leaves an ordinary checkout showing nothing. Pull the clone from shallow towards the full history and watch the sweep recover each buried credential, and the rotation list mark it live until it is rotated.
Takeaways
- No third-party action was hijacked here; GitHub's own guidance says any user with write access to a repository has read access to all of its secrets, which is why pinning and the new lockfiles leave this door open.
- The
action_requiredholds match GitHub's automatic detector for public github.com repositories, not any approval setting, which covers only workflows from fork pull requests. - Block direct pushes to the default branch and require code-owner review on the workflow directory, but a workflow pushed to a new branch still runs on push, so environment secrets behind required reviewers and short-lived OIDC credentials do the real work.
- A secret removed from the current tree remains in history, and the October sweep fetched all of it. Rotation scope is every credential ever committed to any branch or tag.
- A second stage landed a median of 6.3 days after the first, and two owners who had removed the workflow were hit again; OpenSourceMalware's reading is that whatever pushed the first stage still had access. Revoke the token that pushed the file.
Could one pushed file empty your CI secrets?
We lock the workflow directory behind branch protection and code-owner review, swap stored cloud keys for short-lived OIDC credentials bound to the repository, and run the history scan and token revocation to the point where a stolen push buys nothing.
Close the workflow door