TanStack Supply Chain Attack and How to Lock Down GitHub Actions
Blog post from CopilotKit
In May 2026, the TanStack/router repository fell victim to a supply chain attack via its GitHub Actions CI pipeline, which allowed an attacker to poison the Actions cache and exploit token permissions to publish malicious packages on npm. This incident, part of a larger campaign affecting multiple organizations like Mistral AI and UiPath, exploited known vulnerabilities such as cache collisions, broad token permissions, and the absence of static analysis and Dependabot for actions. The attack highlighted the pervasive nature of these security gaps across the ecosystem, prompting a comprehensive audit of 20 repositories to identify and rectify issues like unpinned actions, shell injection vectors, and credential persistence. The subsequent hardening process involved implementing SHA-pinning, least-privilege permissions, and separating build and publish processes, while also incorporating tools like Zizmor for continuous scanning and Dependabot for automated updates. The audit underscored the importance of systematic security practices and the potential benefits of using Renovate for more efficient dependency management.