Clean up before revoking keys after a poisoned npm install
Hijacked tensorlake npm package stole keys and wipes your home folder if you revoke · Security incident · GitHub · tensorlakeai · Oct 2026
A malicious tensorlake 0.5.144 was published to npm from a compromised maintainer account and was live for about 1 hour 40 minutes. On install it took GitHub and npm tokens, cloud keys, .env files and AI tool and MCP config, then spread. It also planted a service that deletes your home folder if the stolen GitHub token is revoked.
Lesson
Commit your lockfile, avoid installing brand-new versions on day one, and keep long-lived keys out of plain .env files on your laptop. If you installed the bad version, disconnect, remove the gh-token-monitor service first, then rotate everything from a clean machine, as the advisory says.
Fix prompt
Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.
I use npm in my project and my AI coding tool installs packages for me. Help me protect my keys from hijacked packages. 1) Check my lockfiles (package-lock.json, yarn.lock, pnpm-lock.yaml) for tensorlake@0.5.144 or tensorlake-native-*@0.5.144 and tell me what you find. 2) Explain how to make installs safer: commit the lockfile, use npm ci, consider a minimum release age or delaying brand-new versions, and turn off install scripts where my project doesn't need them. 3) List which secrets are sitting in plain files on this machine that an install script could read (.env files, ~/.npmrc, cloud CLI configs, AI tool and MCP configs), by file path only, and suggest safer storage. 4) If a bad version was installed, give me the advisory's order of steps: disconnect, remove the gh-token-monitor service before revoking any GitHub token, then rotate from a clean machine. Don't install, remove or revoke anything until I confirm. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.
Source: GitHub ↗