# GitHub's internal repositories taken through a VS Code extension

incident, `incident:nx-console-github-breach`. Page: https://ghtier.com/incidents/nx-console-github-breach

A token stolen through a poisoned TanStack package let the attacker publish a backdoored Nx Console extension, which ran on a GitHub employee's machine and led to about 3,800 of GitHub's internal repositories being copied.

**Abused:** [Contents: Read (repository)](https://ghtier.com/tier/permissions/contents-read.md) (Tier 3)

**Used:** [Delete branches and workflow runs](https://ghtier.com/attack-paths/technique-delete-runs.md) (Tier 1), [Add a workflow that dumps secrets](https://ghtier.com/attack-paths/technique-inject-workflow.md) (Tier 1), [Publish a malicious version with a stolen token](https://ghtier.com/attack-paths/technique-malicious-release.md) (Tier 1), [Hide the payload in a commit only its hash reaches](https://ghtier.com/attack-paths/technique-orphan-commit.md) (Tier 1), [Clone private repos with a stolen token](https://ghtier.com/attack-paths/technique-token-read.md) (Tier 3), [Change a workflow, get its secrets](https://ghtier.com/attack-paths/escalation-workflow-to-secrets.md) (Tier 1)

**Sources:**
- [Investigating unauthorized access to GitHub's internal repositories](https://github.blog/security/investigating-unauthorized-access-to-githubs-internal-repositories/)
- [Nx Console v18.95.0 postmortem](https://nx.dev/blog/nx-console-v18-95-0-postmortem)
- [GHSA-c9j4-9m59-847w: compromised Nx Console 18.95.0](https://github.com/nrwl/nx-console/security/advisories/GHSA-c9j4-9m59-847w)
- [Nx Console VS Code extension compromised (StepSecurity)](https://www.stepsecurity.io/blog/nx-console-vs-code-extension-compromised)
- [Mini Shai-Hulud strikes again: TanStack and more npm packages compromised (Wiz)](https://www.wiz.io/blog/mini-shai-hulud-strikes-again-tanstack-more-npm-packages-compromised)
- [GitHub breached through a VS Code extension](https://www.aikido.dev/blog/github-breached-vs-code-extension)
- [GitHub internal repositories breached (Sophos)](https://www.sophos.com/en-gb/blog/github-internal-repositories-breached)
- [5 supply chain attacks in 48 hours](https://www.stepsecurity.io/blog/5-supply-chain-attacks-in-48-hours-why-securing-one-layer-is-not-enough)

From ghtier (https://ghtier.com). Every entry and link: https://ghtier.com/data/graph.json. Tiers: https://ghtier.com/tier.
