Ways to mitigate GitHub/npm supply chain attacks:
- Use pnpm
- Block all postinstall scripts unless necessary
- Use minimumReleaseAge
- Set up Trusted Publisher on npm/GitHub
- Disallow npm tokens
- Require 2FA for all org members
- Avoid pull_request_target
- If repo is public, consider restricting PRs to collaborators only
- Pin GitHub actions (peter-evans/create-pull-request@v8 → peter-evans/create-pull-request@5f6978f...)
1/ We are sharing additional details regarding our investigation into unauthorized access to GitHub's internal repositories.
Yesterday we detected and contained a compromise of an employee device involving a poisoned VS Code extension. We removed the malicious extension version, isolated the endpoint, and began incident response immediately.