Your build pipeline holds the keys
· 4 min read
On 10 November someone started opening pull requests on GitHub by the thousand. Each one looked dull: a note about a dependency audit, a refreshed build cache, a small helper script. They came from 4,837 real accounts that had been taken over, and they reached 61,764 repositories.
The security company Aikido found the campaign and named it wfx-loot. It counts more than 1,800 repositories where the change did what it was built to do: it ran inside the project's build pipeline, collected every secret it could find and sent them to the attacker.
What a pipeline can reach
A build pipeline is the machine that tests your code and puts it into production. To do that job it holds keys: tokens for the code platform, credentials for your cloud account, the password that publishes a package and, lately, the API keys for AI services.
According to Aikido and Help Net Security, the script looked for all of these. It took the pipeline's own secrets and variables, credentials for the three large cloud providers, SSH keys, command histories and tokens for AI providers.
Then it tidied up. Within about a minute the attacker reverted the change and deleted the pipeline run and its logs. A project owner who looked the next morning would see nothing odd.
Why replacing keys is not enough
The usual advice after a leak is to replace every key. That is still step one. Here it does not finish the job.
In cloud accounts the script tried to add access of its own. In one cloud it changed who is allowed to use a role. In another it added a new trusted sign-in that keeps working after the old keys are gone. You replace the stolen keys, and the attacker still has a way in that you never issued.
So after an incident like this you check two things: what was taken, and what was added.
How to check your repositories
The researchers published what the changes look like. Search your organisation's repositories for:
- a branch named
wfx-docs - a pull request titled
docs: dependency audit notes - commits titled
ci: refresh build cache,chore: add ci helperorchore: add dependency audit workflow
Missing logs prove nothing, because the attacker deleted them. Aikido's tip is to look at the numbering of your pipeline runs. A gap in the numbers, a run that existed and is gone, tells you more than an empty cache does.
Two published packages also carried the script: version 3.14.3 of the PHP package digitalelvis/neuronai-studio, and versions 1.0.278 and 1.0.280 of the Go module github.com/onuragtas/docker-env. If either is in your projects, remove it. Aikido says a machine that installed or opened the PHP package should be treated as compromised.
What to do this week
- Search for the branch, pull request and commit titles above, in private repositories too. Researchers can only see the public ones.
- If the script ran, replace everything that pipeline could reach: its own secrets, cloud keys, package publishing tokens and AI keys.
- Check your cloud accounts for access you did not add. Look for new trusted sign-ins and for roles whose permitted users changed after 10 November.
- Review who can write to your repositories. Most of the changes went to projects the hijacked accounts already had access to. Remove people who have left, and expire access tokens that have no end date.
- Give each pipeline less. A test job does not need the production cloud key. Short-lived credentials limit what one stolen copy is worth.
Where Kandaro fits
A stolen cloud key looks like your key. What gives the thief away is what happens next: a sign-in from a place your pipeline never runs, or a role that changes at an odd hour.
SIEM collects the logs from your cloud and identity provider, checks them against its detection rules, and Kandaro investigates each alert in seconds, so a person reads one case with the evidence attached. For the keys themselves, Deception gives you decoy credentials. No pipeline and no person uses them, so any use of one is an alert. Read same key, three breaches on why stolen keys are so hard to spot otherwise.
Sources: Help Net Security and Aikido.