Latest / Decrypted: The UK Cyber Briefing / A trusted GitHub workflow, and the three million downloads it poisoned
Transcript
- 0:03This is Decrypted. Wednesday, the fifteenth of July.
- 0:06A trusted GitHub workflow, and the three million downloads it poisoned.
- 0:11GitHub Actions handed an attacker three million weekly downloads' worth of npm packages this week.
- 0:19And it didn't take a zero-day to do it.
- 0:21On 14 July, a booby-trapped pull request against the AsyncAPI project's generator tooling stole a privileged
- 0:29access token. Within two hours, five trojanised package versions were live on the public registry.
- 0:36Elsewhere, the UK quietly handed its financial regulators direct oversight of Microsoft, Google, Amazon and
- 0:45Oracle's cloud infrastructure.
- 0:48SonicWall disclosed a pair of zero-days already under attack.
- 0:52And Microsoft mapped a year of OAuth abuse against Salesforce customers.
- 0:56None of it needed a single unpatched C V E in the software the victims actually run.
- 1:01Next. A workflow that trusted its visitors.
- 1:06AsyncAPI is unglamorous plumbing.
- 1:10It's a code generator with more than three million downloads a week.
- 1:13On 14 July, an attacker opened a pull request against the project's GitHub repository.
- 1:20It was one of dozens submitted that morning, most of them decoys.
- 1:24This one hid obfuscated JavaScript nearly a thousand bytes into a markdown file.
- 1:29Here's the catch. The repository's continuous integration workflow ran on something called pull_request_targ
- 1:37et. That's a trigger that gives a job full repository secrets, while still checking out the pull request's own
- 1:44code, not the trusted base branch.
- 1:46So the script ran inside that privileged job.
- 1:49It scanned the runner for secrets and sent a token off to a public pastebin dead-drop within minutes.
- 1:55By 07:10 U T C, the AsyncAPI generator package, version 3.
- 2:023.1, and three sibling packages were published with a three-stage payload.
- 2:07First, a small loader. On import, it pulled an encrypted second stage from I P F S.
- 2:14That unpacked into a 92,000-line framework.
- 2:18It persisted via systemd, and it harvested browser passwords, S S H keys, cloud credentials and crypto wallet
- 2:26s.
- 2:31Using pull_request_target while checking out untrusted pull request code is a well-known anti-pattern.
- 2:39GitHub's own documentation warns against it.
- 2:42It's like handing a visitor the office keys and the alarm code, assuming you'd only ever deal with the recept
- 2:47ionist. Then you find the workflow lets the visitor bring in whatever they like and run it unsupervised.
- 2:53Chainguard's analysis found the vulnerable pattern had been flagged internally 58 days before the attack.
- 3:00The fix was left unmerged.
- 3:02That's the real failure. A known design risk, left sitting in a backlog.
- 3:07Not a missing patch.
- 3:11The attacker compromised the C I identity, not an npm publishing token.
- 3:16So the packages carried valid Sigstore and S L S A signatures throughout.
- 3:21Provenance tooling proves who signed a package.
- 3:24It says nothing about whether that signer was tricked.
- 3:27So if you're a UK team running pull_request_target, or any privileged workflow that checks out contributor c
- 3:34ode, treat this as a today problem.
- 3:37That was Decrypted. The written version and every source are linked in the show notes.
- 3:43Thanks for listening.