TL;DR: A compromised nx postinstall chain created s1ngularity-repository GitHub repos, stole wallets and API keys from .npmrc and environment variables, and used the harvested credentials in follow-on attacks, according to Semgrep. The incident shows that detection without rapid revocation leaves NHI exposure windows open long enough for attackers to weaponise them.
Editorial analysis by NHI Mgmt Group, based on content published by Semgrep: “Security Alert | NX Compromised to Steal Wallets and Credentials”.
Key questions
Q: What breaks when a compromised package can read secrets during installation?
A: The main failure is that package installation becomes an identity event.
Q: Why does secret theft create a wider impact than the initial compromise?
A: Because a stolen token is a live identity, not just data.
Q: What signs show that developer identity recovery is too easy to abuse?
A: If support teams can reset privileged accounts manually, or if email and SMS recovery are still permitted for code-bearing identities, the recovery path is probably weaker than the login path.
Practitioner guidance
- Audit developer token lifecycles Inventory GitHub, npm, cloud, and automation tokens used by engineering teams, then revoke anything that is stale, shared, or scoped wider than required.
- Monitor for attacker-controlled repositories Alert on unusual repository creation patterns, especially short-lived or prefixed repositories tied to code execution events or account anomalies.
- Restrict install-time script execution Block or tightly control package post-install execution in build and workstation environments where secrets are reachable during install.
Bottom line: The compromise shows that package install paths can become credential-exfiltration channels when post-install code can reach developer secrets.
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
Developer tooling now belongs inside identity governance. The boundary between software supply chain risk and NHI governance has collapsed because package installs can exfiltrate credentials before any human sees a prompt. That means GitHub tokens, npm tokens, and local environment secrets should be governed as operational identities, not just convenience artifacts. Practitioners should assume that any install path capable of executing code is also capable of abusing identity material.
A few things that frame the scale:
- Internal repositories are 6x more likely to contain secrets than public ones (32.2% vs 5.6%), contradicting the assumption that private repos are safe, according to the State of Secrets Sprawl 2026.
- 80% of identity breaches involved compromised non-human identities such as service accounts and API keys, according to the Ultimate Guide to NHIs.
A question worth separating out:
Q: Should organisations treat IDE extensions and package managers as identity risk points?
A: Yes, because both can trigger code execution that reaches developer credentials before security controls intervene. The governance question is not whether the tool is convenient, but whether it can invoke installs, read secrets, or authenticate with platform tokens in ways that bypass ordinary review.
👉 Read our full editorial: Nx supply chain compromise shows how NHI exposure scales fast