The supply chain attacks that defined 2025 and 2026 weren't typosquats or new ma...
Feross @feross@infosec.exchange
The supply chain attacks that defined 2025 and 2026 weren't typosquats or new malicious packages. They hit legitimate, widely installed packages during the release. In most cases, the release ran on GitHub Actions.
Socket's Karlo Zanki just published a guide to hardening Actions against outside attackers, with nine controls and the incidents behind each one.
I'd start with the build job. Assume it will run something hostile. Every build installs dependencies, resolves a toolchain, and calls actions nobody on your team reviewed. So it should hold no publishing credential at all. Publish from a separate job that takes the build output as an artifact and runs no project code of its own.
That holds even with trusted publishing. id-token: write is granted per job, so a compromised step in the same job can mint its own token. In May, a fork pull request against TanStack Router poisoned the Actions cache. The release pipeline restored it, the attacker pulled an OIDC token from runner memory, and 84 malicious versions went out across 42 packages.
On December 2, GitHub starts enforcing its default block on pull_request_target for public repositories that don't set their own policy. Audit those workflows now.
https://socket.dev/blog/hardening-github-actions-against-outside-threats