TL;DR: A Shai-Hulud-style npm supply chain attack hijacked maintainer accounts, executed malicious preinstall scripts, and exfiltrated cloud credentials, GitHub tokens, and CI/CD secrets into more than 25,000 attacker-controlled repositories, according to Unosecur. The incident shows that dependency trust is now an identity problem, because leaked credentials can be reused across pipelines, cloud accounts, and GitHub with little friction.
NHIMG editorial — based on content published by Unosecur: Shai-Hulud 2.0 Supply Chain Attack: 25K+ Repos Exposing Secrets
Questions worth separating out
Q: What breaks when malicious npm packages execute during CI/CD installs?
A: The main failure is that package installation becomes code execution inside a trusted build context.
Q: Why do compromised CI/CD credentials make supply chain attacks much worse?
A: CI/CD credentials often sit at the centre of publish, build, and deployment workflows, so one stolen token can reach many repositories and environments.
Q: How can teams tell whether secrets leakage is becoming a persistence problem?
A: Look for non-human identity behaviour that goes beyond copying data, such as new workflow creation, self-hosted runner registration, package republishing, or repeated token use from unusual locations.
Practitioner guidance
- Disable unnecessary npm lifecycle scripts Block pre-install and other lifecycle hooks in build environments unless there is a documented, approved business need.
- Rotate every exposed credential class immediately Treat GitHub tokens, cloud provider keys, CI/CD credentials, npm publish tokens, SSH keys, and temporary session tokens as compromised if they touched an infected environment.
- Map secrets to owning identities and permissions Build a current inventory that links each secret to the identity that can use it, the systems it can reach, and whether it can assume additional roles.
What's in the full article
Unosecur's full blog covers the operational detail this post intentionally leaves for the source:
- The malware flow that linked pre-install execution to credential harvesting inside developer and CI/CD environments.
- The specific GitHub artefacts that exposed persistence, including runner registration and workflow abuse.
- The identity posture checks Unosecur uses to map leaked credentials back to production roles and elevated access.
- The revocation and cleanup sequence for cloud keys, npm tokens, GitHub tokens, and SSH keys.
👉 Read Unosecur's analysis of the Shai-Hulud 2.0 npm supply chain attack →
Shai-Hulud 2.0 secrets theft: what should CI/CD teams change now?
Explore further
View Full Forum → | NHI Foundation Course → | Our Services →
Secret sprawl is now a supply chain control failure, not just a hygiene issue. This attack worked because credentials were already distributed across build agents, laptops, secret stores, and automation accounts. Once the package executed, it did not need novel privilege escalation to cause damage because the environment had already scattered the keys it needed. The practitioner conclusion is clear: the identity estate, not the registry, is the attack surface.
A few things that frame the scale:
- 28% of secrets incidents now originate outside code repositories, in Slack, Jira, and Confluence, and are 13% more likely to be categorised as critical than code-based leaks, according to The State of Secrets Sprawl 2026.
- 64% of valid secrets leaked in 2022 are still valid and exploitable today, which is why detection without revocation leaves a durable exposure window.
A question worth separating out:
Q: Who is accountable when stolen pipeline credentials are used across cloud systems?
A: Accountability sits with the team that owns the pipeline identity, the secret lifecycle, and the runtime controls around it. If build jobs can access production systems, that access model must be formally governed and reviewed. Frameworks such as OWASP NHI Top 10 and NIST CSF are relevant because the issue is privileged non-human access, not just software supply chain hygiene.
👉 Read our full editorial: Shai-Hulud 2.0 turns npm installs into a secrets exfiltration channel