- InstallA compromised version runs a
preinstallorpostinstallscript. It inherits every credential on the laptop or CI runner. - Harvest
NPM_TOKEN,GITHUB_TOKEN,~/.npmrc,gh auth token, a TruffleHog sweep of$HOME, Actions secrets via the API, or the runner's OIDC request token. - Validate
GET /-/whoamiwith the token.200 {"username":…}means it works.401means try the next one. - EnumerateList every package that identity can publish. Shai-Hulud 2 took up to 100 per token.
- RepublishDownload each tarball, inject the payload, bump
x.y.ztox.y.z+1, publish. Ranges like^x.y.zpick it up.
ghp_ or npm_ string.