TL;DR: A new npm worm affecting @redhat-cloud-services packages used compromised GitHub Actions OIDC tokens, preinstall hooks, and multi-stage secret harvesting to target cloud and development credentials across CI/CD environments, according to Semgrep and StepSecurity. The incident shows how package publishing and build-time trust assumptions can turn dependency installs into credential collection events.
Editorial analysis by NHI Mgmt Group, based on content published by Semgrep: “Forking Shai-Hulud: RedHat npm Packages Are The Next Victim After GitHub Actions Compromise and Worm”.
Key questions
Q: What should teams do first when an npm package can run preinstall scripts in CI/CD?
A: First, decide whether install-time scripts are allowed in the environment at all.
Q: Why do compromised CI tokens and package secrets create broader risk than a single code issue?
A: Because those tokens act as machine identities that can publish code, run workflows, and reach cloud services.
Q: What are the warning signs that a build environment has become a credential concentration zone?
A: Look for runners or developer workstations that hold cloud keys, package manager tokens, vault tokens, and federated workflow credentials at the same time.
Practitioner guidance
- Restrict package script execution Disable automatic execution of lifecycle scripts where possible, and require explicit approval for packages that need install-time code execution in build or developer environments.
- Scope GitHub Actions OIDC trust tightly Limit which repositories, workflows, and audiences can mint publishing or cloud-facing tokens, and remove broad trust relationships that let one workflow publish on behalf of many projects.
- Separate publishing identity from build identity Use distinct credentials for package publishing, CI execution, and cloud access so a compromised runner cannot automatically inherit the permissions needed to republish or pivot.
Bottom line: The incident shows how a malicious dependency can convert package installation into an execution and credential-harvesting event.
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
Build-time trust has become an identity boundary, not just a software-delivery concern. This incident shows that package installation can no longer be treated as a passive dependency event when scripts execute automatically and publishing credentials are available in the same workflow. The governance issue is the assumption that build systems only consume code, when in practice they also execute and redistribute it. Practitioners need to govern install-time execution as part of identity and access policy, not as a developer convenience setting.
A question worth separating out:
A: Short-lived OIDC tokens reduce persistence, but they do not eliminate abuse if the workflow context is already compromised. Static secrets are easier to steal and reuse later, while federated tokens are harder to persist but can still authorize immediate malicious action. Governance should evaluate both the lifetime and the authority of the credential.
👉 Read our full editorial: npm worm abuse of GitHub Actions OIDC tokens hits Red Hat