Back to skill

Security audit

Hyperliquid Trading Place

Security checks for vulnerabilities and agentic risk

Overview

This skill is clearly for Hyperliquid trading, but it automatically runs unaudited third-party setup code in a wallet and trading context.

Review this carefully before installing. Install only in a dedicated low-privilege environment, inspect or verify @hypelens/hypelens-agent-rail@0.1.28 first, avoid exposing a master private key to npm lifecycle scripts, and confirm the builder fee address and approval limit before signing anything.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
scripts/package.json:6
Finding
Security-Sensitive Third-Party Dependency Executes Automatically During Installation## Vulnerability Details **File Location**: `scripts/package.json:6-10`, with delegated execution in `scripts/setup.mjs:11-25` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code `scripts/package.json:6-10`: ```json "dependencies": { "@hypelens/hypelens-agent-rail": "0.1.28" }, "scripts": { "postinstall": "node setup.mjs || node -e \"console.error('[hypelens] setup incomplete — run: node setup.mjs (start-mcp/place refused until .setup-ok + maxBuilderFee>=10)')\"", ``` `scripts/setup.mjs:11-25`: ```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); } ``` ### Technical Analysis Running `npm install` automatically invokes the local `postinstall` lifecycle command. That command executes `setup.mjs`, which resolves and dynamically imports the third-party package's `bin/hypelens-setup.js`. The effective setup implementation is therefore supplied by a registry dependency and is not contained in the audited project. Although the dependency is pinned to version `0.1.28`, the project does not include a lockfile with artifact integrity metadata. Version pinning limits ordinary version drift but does not independently establish the integrity or safety of the registry artifact. This is security-sensitive because the documented setup process wires a trading MCP, handles builder-fee approval, and may be rerun in an environment containing `HYPERLIQUID_PRIVATE_KEY`. The unaudited dependency consequently executes in a financial ...[truncated 1636 chars]
Remediation
## Remediation Suggestions 1. Commit a generated `package-lock.json` containing integrity hashes and use `npm ci` in deployment and installation workflows. 2. Obtain dependencies only from a trusted, explicitly configured registry and enforce registry provenance or package-signature verification where supported. 3. Independently audit or vendor the exact `@hypelens/hypelens-agent-rail@0.1.28` artifact, especially its setup and MCP entry points. 4. Separate dependency installation from wallet initialization. Avoid running financial setup automatically through `postinstall`; require a distinct, explicit setup command after installation and review. 5. Consider installing dependencies with lifecycle scripts disabled, such as `npm ci --ignore-scripts`, before explicitly invoking reviewed setup code. 6. Do not expose a master private key directly to an unaudited package. Prefer a hardware wallet, isolated signer, narrowly scoped signing service, or constrained approval flow. 7. Run setup under a dedicated low-privilege operating-system account or sandbox with restricted filesystem and network access. 8. Validate the resolved package path and expected artifact hash before dynamically importing the dependency entry point. 9. Display the exact approval target, fee limit, network, and payload to the user and require explicit confirmation before signing.
Vulnerability Patterns
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

YARA rule 'agent_skill_remote_bootstrap_execution': Remote script or code download followed by execution/bootstrap installation [agent_skills]

High
Category
YARA Match
Content
"@hypelens/hypelens-agent-rail": "0.1.28"
  },
  "scripts": {
    "postinstall": "node setup.mjs || node -e \"console.error('[hypelens] setup incomplete — run: node setup.mjs (start-mcp/place refused until .setup-ok + maxBuilderFee>=10)')\"",
    "setup": "node setup.mjs",
    "start": "node start-mcp.mjs"
  }
Confidence
85% confidence
Finding
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Static analysis

No suspicious patterns detected.