Because the attacker is not only trying to alter code. They are also trying to collect valid credentials that can be reused elsewhere. If leaked secrets are not revoked quickly, the compromise outlives the package incident and turns into durable non-human identity abuse.
Why This Matters for Security Teams
Supply chain worms are dangerous because they do not stop at code tampering. They often harvest whatever valid secrets are present in build systems, developer environments, package metadata, or CI pipelines, then reuse those credentials to move laterally into other services. That turns a single package incident into a broader NHI exposure problem, where the attacker is effectively stealing the organisation’s machine identities as part of the malware path. Current guidance on the OWASP Non-Human Identity Top 10 makes this linkage explicit: compromise of one secret can become compromise of many systems if revocation is slow or incomplete.
NHIMG research on Miasma and Hades Supply Chain Worms shows why defenders should treat these events as both malware and secrets incidents. The malware spreads, but the real persistence comes from stolen tokens, API keys, and cloud credentials that remain valid after the infected package is removed. In practice, many security teams encounter the credential abuse only after the initial package compromise has already been contained, rather than through intentional secrets hygiene.
How It Works in Practice
A supply chain worm typically lands through a trusted software path such as a package install, dependency update, build hook, or CI runner. Once execution occurs, the malware searches for secrets in predictable places: environment variables, local credential caches, package registries, repository settings, cloud metadata endpoints, and workflow logs. If it finds a usable token, it does not need to keep spreading through the same vector. It can pivot into source control, artifact stores, cloud control planes, or messaging tools and steal more credentials from there.
This is why the issue is not just detection, but lifecycle control. A secret that is copied out of a build job remains valuable until it is revoked, rotated, or invalidated. NHIMG’s State of Secrets Sprawl 2026 notes that 64% of valid secrets leaked in 2022 are still valid and exploitable today, which shows how durable the blast radius becomes when revocation is not automatic. The practical control pattern is to minimise standing secrets, isolate CI/CD identities, and make every credential short-lived.
- Use workload identity for pipelines and build agents instead of static long-lived keys.
- Issue just-in-time credentials per job, then revoke them immediately on completion or failure.
- Scope tokens to one repository, one environment, or one action whenever possible.
- Monitor package install steps, runner logs, and artifact outputs for secret exfiltration.
The NIST Cybersecurity Framework 2.0 supports this by pushing stronger identity, continuous monitoring, and response discipline around privileged access. These controls tend to break down when CI runners reuse cached credentials across jobs and multiple repositories because one compromised workflow can inherit access to unrelated systems.
Common Variations and Edge Cases
Tighter secret control often increases pipeline friction, requiring organisations to balance deployment speed against the need to eliminate standing credentials. That tradeoff becomes sharper in polyglot build systems, self-hosted runners, and monorepos where many jobs share the same execution environment. Best practice is evolving, but there is no universal standard for how much secret exposure can be tolerated in ephemeral build infrastructure.
Some environments make the problem worse. Developer laptops, chat systems, and ticketing platforms often store copied tokens outside formal secret managers, which means a worm may harvest credentials from places the security team does not classify as part of the supply chain. NHIMG’s 52 NHI Breaches Analysis shows that machine identities are frequently compromised through operational shortcuts, not just direct infrastructure attacks. That is why standard malware response is incomplete unless it includes secret inventory, credential revocation, and post-incident identity review.
For organisations aligning with CIS Controls v8, the practical takeaway is to treat exposed secrets as active identities, not passive artifacts. If a worm can copy a token once, it can often use it many times unless TTLs are short and revocation is automated. In this class of incident, containment without rotation is only partial containment.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10, OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-03 | Addresses secret lifecycle and revocation, central to supply chain worm fallout. |
| OWASP Agentic AI Top 10 | A-04 | Dynamic tool use and credential access mirror autonomous execution risks. |
| CSA MAESTRO | GOV-02 | Covers governance for autonomous and tool-using workloads that can exfiltrate secrets. |
| NIST AI RMF | Risk management must account for autonomous compromise paths and credential reuse. | |
| NIST CSF 2.0 | PR.AC-1 | Identity management and access control are required to limit post-exploit reuse. |
Establish policy, ownership, and revocation workflows for secrets used by automated supply chain systems.