A small Bash scanner for indicators of compromise related to the TanStack npm supply-chain compromise and Mini Shai-Hulud activity.
The scanner checks for known suspicious files, dependency indicators, persistence artifacts, and running processes associated with the campaign.
- Known IOC filenames:
router_init.jsrouter_runtime.jstanstack_runner.jsgh-token-monitor.shsetup.mjs
- Known malicious SHA-256 hash:
ab4fcadaec49c03278063dd269ea5eef82d24f2124a8e15d7b90f2fa8601266c
- Suspicious dependency strings in manifests and lockfiles:
@tanstack/setupgithub:tanstack/router79ac49eedf774dd4b0cfa308722bc463cfe5885c
- User-level persistence artifacts for
gh-token-monitor - Running processes matching known IOC names
chmod +x scan.sh
./scan.shThe script exits with:
0when no confirmed malicious IOCs are found1when suspicious or malicious IOCs are found
The scanner searches common locations including:
- Current directory
- Home directory
- npm and pnpm cache/store directories
- User config and local binary directories
- Global npm package root, when
npmis installed /tmp,/opt,/usr/local, and/etc
Some system paths may require additional permissions for complete coverage.
Do not immediately revoke or rotate GitHub/npm tokens while suspicious persistence may still be active.
Recommended order:
- Disconnect the host from untrusted networks if needed.
- Stop suspicious
gh-token-monitor,router_*, ortanstack_runnerprocesses/services. - Preserve relevant files and logs for investigation.
- Remove persistence artifacts after evidence is collected.
- Rotate GitHub, npm, CI/CD, and package publishing tokens from a clean machine.
- Reinstall affected dependencies from known-good versions.
This is an IOC scanner, not a full forensic tool. A clean result means the script did not find the indicators it knows about; it does not prove the host was never compromised.