T08 · Insecure Dependencies
- Location
SKILL.md:51- Finding
Unaudited Third-Party Dependency Receives a Wallet Private Key
- Content
View full analysis
/tmp/agenthub-call.mjs << SCRIPT import AgentHub from "$HOME/.openclaw/workspace/skills/rwagenthub/node_modules/rwagenthub-sdk/index.js"; const hub = new AgentHub({ privateKey: process.env.AGENTHUB_WALLET_KEY }); const result = await hub.call('API_NAME', { ...inputs... }); ``` ### Technical Analysis The Skill automatically installs `rwagenthub-sdk` from the npm registry and then gives the installed package direct access to `AGENTHUB_WALLET_KEY`, a wallet credential capable of signing USDC payment authorizations. Although the package version is pinned to `1.0.2`, the audited project does not include the dependency source, a lockfile, an expected package integrity hash, or verifiable provenance information. Consequently, the claims in `SKILL.md` concerning the dependency's behavior cannot be independently verified from the supplied project. The installation command also does not disable npm lifecycle scripts. If the published package or one of its transitive dependencies contains an installation script, that script may execute during installation under the Agent's operating-system account. At runtime, the package necessarily operates in a process containing the wallet key and can read or transmit it. This is a supply-chain exposure rather than proof that the referenced package is malicious. ### Attack Path 1. An attacker compromises the npm package, a transitive dependency, a publisher account, or the dependency delivery path. 2. The Agent executes the documented automatic installation command. 3. Malicious code executes through an npm lifecycle script or when ...[truncated 844 chars]- Remediation
View remediation
