Whether your CI was tampered with is not something CI can tell you on its own
A token that can push code can usually delete the record of what that code did. So the question “was our CI tampered with?” cannot be answered from the CI pages and git log alone. It has to be answered from records the token cannot reach, and if those records were not set up beforehand, the most defensible answer on the day is to assume you were hit.
The wfx-loot campaign spreading across GitHub this month shows this clearly. According to OX Security’s analysis on 12 November, the attackers used 4,837 hijacked GitHub accounts to push a secret-stealing script into repositories those accounts could write to. By then, 8,093 public repositories had received a malicious commit on their default branch, and at least 1,806 had actually run the script and sent their secrets out.
The script is not obfuscated; OX says any human could flag it in seconds. The attackers do not care, because it sits on the branch for seconds to minutes. Once it has run, a routine-looking commit reverts it, and the workflow run is deleted along with its logs.
The cleanup uses the same key as the push
No vulnerability is needed for that step. GitHub’s documentation is plain about it: deleting a workflow run requires write access to the repository. If you can push a commit, you can delete the record. Both rest on the same permission.
The result is that the Actions page looks normal afterwards, and git log shows at most a malicious commit and its revert, sometimes not even those. Legit Security’s investigation playbook notes that some maintainers who spotted the attack force-pushed the branch back to its pre-attack state, which removed both the malicious commit and the revert from branch history. The attacker is not the only one cleaning up the scene; so are the people rushing to put things back.
In this situation, “the page looks fine” proves nothing. The record and the code sit under the same permission, and whoever steals that permission can change both.
The traces that survive are the ones it cannot change
The traces investigators could still find this time have one thing in common: none of them were within the attacker’s reach. OX points out that once runs are deleted, the most reliable trace is a missing workflow run number. The platform increments the number, and deleting a run does not wind it back. The gap does not always show, though: of the 65 injection commits GitGuardian sampled, 37 left a gap at that point. Legit’s playbook also relies on the repository activity record, which logs every push and force-push, and on fetching commits directly by SHA, which still works after a revert or a force-push.
One layer further out is the organization’s audit log. GitHub’s list of audit log events includes the deletion of a workflow run, with its run number, and only organization owners can see the audit log, which covers the last 180 days. A token with write access can delete the run, but it cannot even see that record. The cloud side works the same way. According to GitGuardian and Legit, when a workflow can obtain a cloud identity through OIDC, the script uses it to create AWS access keys and to try to rewrite a role’s trust policy, and those calls are recorded in CloudTrail, which belongs to the cloud account, not the repository.
These records still have to be read carefully. GitGuardian’s analysis cautions that a gap in run numbers proves a run was created, not that it executed. In the handful of November cases they could still see, the variants that edited a workflow file were held by GitHub for approval. The variant hidden in an npm install script changed no workflow file, and it simply ran inside workflows the repository already trusted.
A team that only has its own records starts over on the day
Picture a small product team with its code in a GitHub organization, using Actions to run tests and deploy to the cloud, with the deployment identity obtained through OIDC. One morning someone notices a pull request titled “docs: dependency audit notes”, opened by a colleague they work with every day. The manager asks: were we hit?
The Actions page is all green. git log shows nothing odd either, because someone noticed something the day before and already force-pushed the branch back. An organization owner checks the audit log and can see that some runs were deleted, but not what those runs did; that record is gone. If it was the npm variant, the audit log may show nothing more than an ordinary run. Checking every repository at once is not easy either: Legit’s playbook notes that the audit log API needs GitHub Enterprise Cloud. What could really answer “were the secrets used?” is the record on the cloud side, but unless it was set up for long-term retention, only the most recent events can be looked back on.
At that point the most responsible answer is: assume it was hit. GitGuardian’s advice is that if the script ran inside a workflow, every repository and organization secret and variable should be treated as leaked, including ones the workflow never used. Replacing a whole set of secrets and then checking the cloud accounts for backdoors is a real cost, and a good part of it comes from not having had a record the attacker could not touch.
A mainframe habit: the system writes the record, not the job
On the mainframe I am used to a different division of labour. On z/OS, when a batch job starts, when each step ends and when the job ends, the record is written by the system’s SMF (type 30 records) into dedicated data sets or log streams, and its uses include billing and maintaining system security. What a job did is not for the job to say. In the designs I am used to, being able to submit a job does not, by itself, let you touch those records.
This is not a claim that the mainframe is more secure; stolen access is dangerous anywhere. What matters to me is that division: whatever is being recorded does not produce or keep its own record. Many teams’ CI works the other way round, with running, recording and cleaning up all under the same repository permission. That is convenient day to day, and it means the record cannot testify when something goes wrong.
Where the evidence lives has to be decided before the incident
OX’s conclusion contains a line I agree with: any detection that relies on reviewing the current state of a repository, or reading workflow logs after the fact, would have missed this. OX also places its hopes on the platform: GitHub tokens that are short-lived by default, and bot accounts that can no longer bypass branch protection. Those changes are worth waiting for, but before or after them, tokens can still be stolen. What changes is whether, the next time one is, you hold a record it cannot delete.
This rarely makes it into CI design discussions, because on a normal day nobody needs it. Whether anyone regularly exports the audit log to somewhere else, how long the cloud-side records are kept, who has the right to delete them: these look like administrative details. They are what decides whether, on the morning of an incident, a team can say “we checked, and no”, or only “we don’t know, so we are starting over”.
These are my personal views and do not represent IBM.