T08 · Insecure Dependencies
- Location
SKILL.md:19- Finding
Unpinned and Undeclared Runtime Package Execution Through npx
- Content
View full analysis
--name "" --symbol "" --reserve-symbol "" npx tsx scripts/index.ts buy --network --token "" --amount "" npx tsx scripts/index.ts sell --network --token "" --amount "" ``` However, `tsx` is not declared as a project dependency: ```json { "name": "openclaw-bitagent", "module": "index.ts", "type": "module", "devDependencies": { "@types/bun": "latest" }, "peerDependencies": { "typescript": "^5" }, "dependencies": { "@bitagent/sdk": "^3.1.4", "dotenv": "^17.2.3", "siwe": "^3.0.0", "viem": "^2.45.1" } } ``` ### Technical Analysis When `npx` cannot find `tsx` in the local dependency tree, it may download and execute the package from the configured npm registry. The executed code is therefore not necessarily represented by the reviewed repository or its lockfile. This creates a mutable supply-chain execution path in a process that receives `PRIVATE_KEY`. Package compromise, registry manipulation, configuration of a malicious registry, or an unexpected future package release could cause arbitrary JavaScript to execute with the privileges of the OpenClaw process. The project also uses dependency ranges, and `@types/bun` is set to `latest`, reducing reproducibility. Although the lockfile pins currently resolved packages, it does not contain a local `tsx` dependency for the documented execution path. ### Attack Path 1. A user configures the Skill with a wallet private key. 2. The agent invokes one of the documented `npx tsx` commands. 3. No project-local `tsx` executable is ...[truncated 943 chars]- Remediation
View remediation
