T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:173
- Finding
- Unpinned Third-Party Cryptographic Dependencies## Vulnerability Details **File Location**: `SKILL.md`, lines 173-177 **Vulnerability Type**: Supply-chain exposure through unpinned third-party dependencies **Risk Level**: Medium ```javascript const nacl = require('tweetnacl'); const bs58 = require('bs58'); const bip39 = require('bip39'); const { Keypair } = require('@solana/web3.js'); const { derivePath } = require('ed25519-hd-key'); ``` ### Technical Analysis The example delegates wallet generation, key derivation, and cryptographic signing to five npm packages. The Skill does not provide a reviewed `package.json`, lockfile, exact package versions, integrity hashes, or a controlled installation procedure. Because these dependencies process the wallet mnemonic, seed, or private key in memory, compromise or substitution of any relevant package or transitive dependency could expose the wallet. Resolving unconstrained package versions also means that code executed by future installations may differ from the code originally reviewed. ### Attack Path 1. An attacker compromises a named package, one of its transitive dependencies, or the dependency-resolution channel. 2. The agent installs or resolves the affected package without an audited lockfile or integrity enforcement. 3. Malicious installation or runtime code executes with the agent's local privileges. 4. The compromised dependency reads the generated mnemonic, derived seed, private key, or wallet file. 5. The dependency transmits that material to the attacker. 6. The attacker reconstructs the wallet and can authorize transactions using its private key. ### Impact Assessment Successful exploitation could execute arbitrary package code with the privileges of the account running the Skill. It could compromise the locally generated wallet, disclose its mnemonic or private key, and permit theft of any assets assigned to that wallet. Local files and environment data accessible to the same process could also be ex ...[truncated 130 chars]
- Remediation
- ## Remediation Suggestions - Provide a reviewed `package.json` and lockfile containing exact dependency and transitive-dependency versions. - Require deterministic installation with `npm ci` rather than unconstrained package resolution. - Preserve and verify registry integrity metadata and use only the expected official package registry. - Audit dependencies and their installation scripts before use; disable lifecycle scripts where they are unnecessary. - Regularly scan the locked dependency graph for known vulnerabilities and unexpected ownership or publication changes. - Run wallet operations in a restricted environment with minimal filesystem and network access. - Use a dedicated wallet for this service and explicitly warn users not to import or reuse a wallet holding valuable assets.
