The npm Worm Is Live: AI Agents Amplify the Blast Radius
What Happened
The Shai-Hulud/Miasma campaign has compromised 90+ packages under the @redhat-cloud-services npm scope — widely used in OpenShift console plugins and Red Hat Insights integrations. Unlike previous supply chain incidents (event-stream, ua-parser-js), this is a self-propagating worm, not a static payload. It exfiltrates npm tokens, GitHub PATs, AWS credentials, and SSH keys, then uses stolen publish tokens to propagate into other packages the compromised maintainer controls.
A CI/CD pipeline that installed any of these with credentials in scope is now compromised, and the worm may have pushed into other packages under the same maintainer.
The AI Agent Amplification
The codexui-android variant reveals the modern twist: the malicious loader chunk-PUR7OUAG.js ships only in the npm tarball, not in the public GitHub repo. This defeats "check the source" heuristics. Exfil goes to sentry.anyclawstore, which reads as Sentry telemetry to any allowlist-by-pattern egress rule. The publisher, BrutalStrike, ships legitimate apps with 5M downloads — reputation laundering is part of the kill chain.
AI coding agents generating npm install commands or adding dependencies sit directly on this surface. They cannot distinguish a compromised package from a legitimate one. The agent adds the dependency, the postinstall script runs with CI credentials, game over.
The Defensive Stack That Actually Works
npm 11.16.0 ships allowScripts in advisory mode. Advisory means it logs and continues — flip it to deny in CI immediately. This is one config line that prevents postinstall scripts from executing on packages not on your allowlist. Pair with:
- Provenance attestation:
npm publish --provenancesigns against the GH Actions workflow. Verify on install with--expect-provenance. - Pin by digest, not version:
npm pack --dry-runto diff tarball contents against GitHub source. - Workload identity federation: Replace static AWS_SECRET_ACCESS_KEY in CI with 15-minute scoped role assumptions.
Cross-Source Convergence
Five independent sources flagged this attack in the same cycle. The convergence is itself signal: this is not one analyst's opinion. The attack is confirmed, documented, and being actively exploited. Microsoft Security Intelligence, Rapid7, and the npm security team have all issued advisories. The window between compromise and detection is hours. Act accordingly.
What to do
Audit all npm lockfiles for @redhat-cloud-services scope packages today. Cross-reference against published affected list.
Enable allowScripts: deny in all CI pipelines this sprint
Rotate npm tokens, GitHub PATs, AWS credentials, and SSH keys for any developer or CI system that may have resolved compromised packages
Implement provenance verification and hash-pinned dependencies in CI within this sprint