T08 · Insecure Dependencies
Error
- Location
- SKILL.md:42
- Finding
- Unpinned Third-Party SDK Receives Access to a Mainnet Wallet Signer<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 42-53 **Vulnerability Type**: Unpinned security-sensitive dependency **Risk Level**: High ### Vulnerable Code ```bash npm install agent-outlier-sdk ethers ``` ```js const { OutlierPlayer } = require('agent-outlier-sdk'); const { ethers } = require('ethers'); const provider = new ethers.JsonRpcProvider('https://mainnet.base.org'); const wallet = new ethers.Wallet(process.env.PRIVATE_KEY, provider); const player = new OutlierPlayer(wallet, { exoTokenId: YOUR_EXO_TOKEN_ID }); ``` ### Technical Analysis The installation command does not pin exact package versions, enforce package integrity, or provide a reviewed lockfile. Consequently, the effective implementation installed by a user can change after the Skill has been reviewed. This is particularly security-sensitive because `agent-outlier-sdk` is subsequently loaded into the same Node.js process as `PRIVATE_KEY` and receives an `ethers.Wallet` signer connected to Base mainnet. Code executing in that process can inspect process environment variables and invoke wallet-signing operations. The SDK implementation is not included in the audited project, so the Skill's assertion that the private key is never stored or transmitted cannot be verified from the available source. NPM lifecycle scripts may also execute during installation with the permissions of the user running `npm install`. This expands the potential impact beyond blockchain transactions to resources accessible by that local user. ### Attack Path 1. An attacker compromises the published `agent-outlier-sdk` package, its maintainer account, or a transitive dependency, or causes an unsafe future version to be installed. 2. A user follows the unpinned `npm install agent-outlier-sdk ethers` instruction. 3. Malicious code executes through an installation lifecycle script or when the package is imported. 4. At runtime, the package operates in a process containing `process.env.PRIVATE ...[truncated 824 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `agent-outlier-sdk`, `ethers`, and all transitive dependencies to exact reviewed versions. 2. Include a lockfile and require reproducible installation with `npm ci` rather than unconstrained `npm install`. 3. Verify package provenance, signatures where available, registry ownership, and published integrity hashes. 4. Audit or vendor the complete SDK source before granting it access to a wallet signer. 5. Disable npm lifecycle scripts with `--ignore-scripts` unless specific reviewed scripts are required. 6. Run the SDK in a restricted environment with minimal filesystem, environment-variable, and network access. 7. Use a dedicated wallet containing only the funds required for a limited number of rounds; never use a primary wallet. 8. Add transaction-policy enforcement outside the SDK, including allowed chain, contract address, function selector, value, gas, and cumulative-spend limits. 9. Require users to verify the Base chain ID and destination contract before signing. ]]>
