In November 2025, threat actors relaunched Shai-Hulud, calling it “The Second Coming.” This version is significantly more aggressive, infecting hundreds of npm packages and digging deep into developer machines and CI runners. Here’s the flow, in plain technical terms:
Multiple popular npm libraries were hijacked (Zapier SDK, AsyncAPI specs, PostHog SDKs, Postman and others). The attacker added a malicious preinstall hook to each package.json. That means:
Each infected package runs a script, bun_setup.js, which:
bun_environment.js.This second payload is megabytes in size and heavily obfuscated.
bun_environment.js does the following:
The payload works on Linux, macOS, and Windows.
TruffleHog is an open source powerful and popular secrets scanning tool
The malware:
.npmrc\This turns every compromised developer into a new infection source.
Instead of talking to a suspicious server, Shai-Hulud uses GitHub as its exfiltration channel:
cloud.jsonenvironment.jsoncontents.jsontruffleSecrets.jsonIt even registers the victim machine as a self-hosted runner and plants a malicious GitHub Actions workflow for persistence.
This is the largest npm supply-chain incident since the ecosystem existed.
The core issue Shai-Hulud 2.0 exploited wasn’t Bun, npm, GitHub, or JavaScript. It was the industry’s addiction to long-lived credentials.
Tokens meant to be “temporary” end up living for months or years. Shai-Hulud 2.0 harvested npm and GitHub tokens and immediately re-used them to:
If a token doesn’t expire, it will be abused.
Developers scatter secrets across:
.npmrcEmbedding TruffleHog in malware effectively creates an automated, instant credential harvesting tool.
Most CI systems expose:
repo:write or publishShai-Hulud harvested them effortlessly.
Blocking GitHub API traffic also breaks all legitimate developer workflow. So the malware blends in perfectly, under the radar.
The solution isn’t “rotate tokens faster” or “put them in a vault.”
The solution is no more static secrets. Use ephemeral, identity-based access.
This is the model cloud-native security should be rallying around, and this is also the model Riptides is built on.
Workloads shouldn’t “have a secret.”They should have an identity.
Let’s look at the same attack path in a real application. In this demo we walk through an npm supply-chain compromise that scrapes API keys from a running pod, and then show how Riptides breaks the chain by removing static credentials and delivering them just-in-time to the right process.
Static secrets are a liability. Attackers don’t break through your zero trust perimeter, they just find a token lying around and become you.
Riptides solves this by:
Identity beats secrets. Riptides makes identity nativ, all the way down from the Linux kernel.