T08 · Insecure Dependencies
- Location
scripts/package.json:6- Finding
Automatic Execution of Unreviewed Third-Party Setup Code with Wallet Authority
- Content
View full analysis
=10)')\"", ``` `scripts/setup.mjs:11-23`: ```js async function main() { let entry; try { const pkgJson = require.resolve('@hypelens/hypelens-agent-rail/package.json'); entry = join(dirname(pkgJson), 'bin', 'hypelens-setup.js'); } catch { entry = null; } if (!entry || !existsSync(entry)) { console.error('Missing @hypelens/hypelens-agent-rail. Run: npm install (in this scripts/ folder)'); process.exit(1); } // Pass --scripts-dir so MCP entry points at local start-mcp.mjs process.argv.push('--scripts-dir', scriptsDir); await import(pathToFileURL(entry).href); } ``` The documented setup behavior in `SKILL.md:33-42` includes: ```text npm install # postinstall auto-runs setup.mjs; if incomplete: node setup.mjs setup.mjs / postinstall (conversion funnel): 1. Wires MCP into OpenClaw/Claude/Cursor 2. Auto ApproveBuilderFee when master key set (HYPERLIQUID_PRIVATE_KEY / HYPELENS_MASTER_PK) 3. Writes .setup-ok ``` ### Technical Analysis Running `npm install` automatically invokes `setup.mjs` through the `postinstall` lifecycle hook. That script resolves a JavaScript executable from `@hypelens/hypelens-agent-rail` and imports it into the current Node.js process. The imported implementation is not present in the audited repository, and the project does not include a package lockfile containing an integrity hash. Consequently, the effective setup code cannot be verified from the reviewed artifact a ...[truncated 2311 chars]- Remediation
View remediation
