TL;DR: Malicious npm package releases enabled through a compromised GitHub Actions workflow exfiltrated developer secrets at scale and even used AI CLI tools to support reconnaissance and theft, according to Apiiro’s analysis of the Nx compromise. The incident reinforces that supply chain security now depends on controlling developer credentials, pipeline trust, and secret exposure windows, not just scanning for vulnerable code.
NHIMG editorial — based on content published by Apiiro: LLMjacking and the Nx supply chain attack analysis
By the numbers:
- At least 90% of the leaked GitHub tokens remained valid after the incident.
- Attackers published 8 malicious versions between 6:32 PM and 8:37 PM EDT before the packages were removed the same night.
Questions worth separating out
Q: What breaks when secrets are exposed in a software supply chain incident?
A: The immediate break is not just code integrity, but credential integrity.
Q: Why do compromised build pipelines create identity risk beyond AppSec?
A: Because build pipelines often hold publishing rights, signing secrets, and automation tokens that function like privileged identities.
Q: How do security teams know whether a leaked secret still matters?
A: They verify liveness. A leaked secret matters most when it still authenticates, still has broad scope, or still maps to a privileged workload or service account. Teams should combine detection with ownership, scope review, and immediate rotation so that the remediation queue reflects real access risk rather than scan noise.
Practitioner guidance
- Isolate package publishing from routine CI execution Move release permissions into a separate, tightly controlled workflow and require explicit approval for publishing steps that can access signing material or registry credentials.
- Reduce secrets on developer endpoints Keep SSH keys, API tokens, npm credentials, and cloud credentials out of long-lived local storage wherever possible, and bind access to short-lived, task-scoped tokens instead.
- Disable or constrain dependency lifecycle scripts Review install-time behaviour for npm packages and block or sandbox post-install execution where the package does not absolutely require it for legitimate operation.
What's in the full analysis
Apiiro's full analysis covers the operational detail this post intentionally leaves for the source:
- Package-level indicators and affected Nx version checks for incident response teams
- Apiiro's Software Graph and SCA workflow for tracing where compromised dependencies entered the environment
- Malicious code detection and commit-blocking controls used to stop similar supply chain payloads
- The vendor's remediation workflow for rotating SSH keys, API tokens, and other exposed secrets
👉 Read Apiiro's analysis of the Nx supply chain attack and secret theft →
Nx supply chain attack: what it means for developer identity controls?
Explore further
Standing developer trust is now a supply chain liability: the Nx incident shows that release automation, package publishing, and developer endpoints can all become identity-bearing attack surfaces. The compromise was not only about malicious code, but about who or what had authority to publish, execute, and exfiltrate. For practitioners, this is a governance failure in the lifecycle of developer trust, not just a malware event.
A few things that frame the scale:
- 2,349 distinct secrets were leaked in one AI credential abuse campaign, according to LLMjacking: How Attackers Hijack AI Using Compromised NHIs.
- The average estimated time to remediate a leaked secret is 27 days, according to The State of Secrets in AppSec.
A question worth separating out:
Q: Who is accountable when a release workflow publishes malicious code through trusted publishing?
A: Accountability spans repository owners, release engineers, and platform teams that control branch protections and workflow permissions. Trusted publishing shifts responsibility upward into the CI/CD identity layer, so organisations need clear ownership for who can trigger releases, approve workflow changes, and monitor execution behaviour.
👉 Read our full editorial: Nx supply chain attack shows how AI-assisted theft scaled