Subscribe to the Non-Human & AI Identity Journal

Why are wallets, tokens, and mnemonic phrases high-risk secrets in supply chain attacks?

They are high-risk because they are often handled in legitimate application logic that an attacker can reuse once code execution is achieved. If a poisoned dependency can read or forward those values, the theft looks like normal program behaviour until the damage is done. That is why secret handling needs code and runtime controls, not just storage controls.

Why Wallets, Tokens, and Mnemonic Phrases Become Supply Chain Targets

Wallets, tokens, and mnemonic phrases are high-risk because they are not passive data. They are live access paths to funds, APIs, signing authority, or recovery control, which makes them attractive to any poisoned dependency that can execute inside trusted application logic. Once code execution is gained, those values can be read, forwarded, or reused in ways that look operationally normal.

This is why supply chain compromise changes the threat model. A malicious package or build-step payload does not need to break encryption if it can simply observe how the application handles secrets at runtime. The pattern shows up repeatedly in incidents such as the Shai Hulud npm malware campaign and the Reviewdog GitHub Action supply chain attack, where trusted automation became the delivery path. Current guidance from OWASP Non-Human Identity Top 10 treats these secrets as identity assets, not just sensitive strings. In practice, many security teams discover the exposure only after a dependency update, CI job, or release workflow has already reused the secret at scale.

How Supply Chain Attacks Turn Secret Handling Into Exfiltration

The key issue is that wallets, tokens, and mnemonic phrases are often handled where the application must already be trusted to use them. That makes them visible to anything that inherits process access, logs, instrumentation, clipboard hooks, build scripts, or postinstall code. A poisoned dependency does not need special privileges if the application itself is already permitted to load, serialize, sign, or transmit the secret.

In practice, defenders need to treat secret handling as both a code problem and a runtime problem. The most effective controls are usually layered:

  • Minimise how long a secret exists in memory and prefer short-lived, scoped credentials over static values.
  • Isolate build and CI environments so package installs cannot freely inspect runtime variables or filesystem state.
  • Use secret scanning plus revocation workflows, because detection alone does not stop reuse.
  • Apply workload identity and policy checks so the service proves what it is before it receives a secret.

That approach aligns with the broader NHI view described in NHIMG’s Guide to the Secret Sprawl Challenge and the breach patterns in 52 NHI Breaches Analysis. It also matches practical guidance from CISA cyber threat advisories and the control orientation of NIST Cybersecurity Framework 2.0. These controls tend to break down when secrets are embedded in local developer tooling, because the trust boundary shifts to endpoints that security teams rarely instrument with the same rigor as production systems.

Common Variations, Edge Cases, and Operational Tradeoffs

Tighter secret controls often increase delivery friction, so organisations must balance usability against blast-radius reduction. That tradeoff becomes most visible in wallet software, custodial services, and automation pipelines that need uninterrupted signing access.

There is no universal standard for every environment yet, but current guidance suggests a few consistent exceptions. A mnemonic phrase should almost never appear in application memory longer than required for recovery, and it should not be passed through generic logging or analytics paths. Tokens used for automation should be scoped to the smallest callable action set, with explicit expiry and revocation. For wallets, the highest-risk case is not storage alone but delegated signing logic, where a compromised dependency can trigger legitimate signing calls that appear indistinguishable from normal business activity.

Teams should also distinguish between human-authored secrets and machine-issued secrets. The latter can often be replaced with workload identity, ephemeral credentials, or brokered signing requests, while mnemonic phrases usually cannot. That is why supply chain hardening must include code review for secret handling paths, build-time dependency controls, and runtime monitoring for abnormal exfiltration patterns. The same logic applies to AI-assisted development and packaging pipelines, where leaked material can be reintroduced into code or configuration faster than manual review can catch it. The lesson from NHIMG research on Top 10 NHI Issues is that identity-bearing secrets are only as safe as the weakest execution path that can touch them.

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 weak handling and rotation of identity-bearing secrets in software.
OWASP Agentic AI Top 10 A2 Agentic and automated workflows can exfiltrate secrets through trusted tool use.
CSA MAESTRO I2 Covers identity and access for autonomous workloads that handle sensitive credentials.
NIST AI RMF Supports governance of high-impact AI-enabled supply chain and secret exposure risk.
NIST CSF 2.0 PR.AC-1 Least-privilege access is central to limiting secret exposure during supply chain compromise.

Replace long-lived wallet and token secrets with short-lived, scoped credentials and enforce rotation.