T08 · Insecure Dependencies
- Location
SKILL.md:5- Finding
Unreviewed External npm Package Handles Wallet Private Keys
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:5-19
Vulnerability Type: Supply-chain exposure involving a privileged third-party dependency
Risk Level: HighEvidence
yaml metadata: author: kvhnuke version: 0.0.10 openclaw: requires: env: - CHAINAI_PRIVATE_KEY bins: - npx - node primaryEnv: CHAINAI_PRIVATE_KEY emoji: '⧫' homepage: https://github.com/kvhnuke/chainai install: - kind: node package: chainai bins: [chainai]Runtime execution is subsequently documented as:
bash npx chainai@0.0.10 <command> [options]Technical Analysis
The Skill delegates all sensitive blockchain operations to the externally distributed
chainainpm package. The installation metadata nameschainaiwithout an exact version or integrity digest, even though the runtime examples request version0.0.10. The audited project contains onlySKILL.md; it does not include the package implementation needed to verify how the private key is read, stored, logged, or transmitted.Network access is necessary for balance queries, blockchain broadcasts, transaction-status checks, and 1inch Fusion swaps. However, giving externally retrieved executable code direct access to
CHAINAI_PRIVATE_KEYexceeds the privileges needed for read-only operations and creates a severe supply-chain trust boundary. Documentation prohibiting key transmission does not technically enforce that behavior in the npm implementation.Running the package through
npxmay download and immediately execute registry-hosted code. Without artifact integrity verification or bundled auditable source, a compromised package release, publisher account, registry response, installation script, or dependency could access the private key and create arbitrary signatures.Attack Path
- An attacker compromises the npm package, its publis ...[truncated 1331 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the installation metadata to an exact package version rather than specifying only
package: chainai. - Lock the complete dependency graph and verify package integrity with a trusted digest, npm lockfile, and registry provenance.
- Include or vendor the executable source in the reviewed Skill so its key handling, network destinations, installation scripts, and transitive dependencies can be audited.
- Establish reproducible builds that prove the reviewed source corresponds to the published npm artifact.
- Separate read-only operations from signing operations. Balance and status queries should run without access to
CHAINAI_PRIVATE_KEY. - Prefer a hardware wallet, isolated signer, or narrowly scoped signing service so external package code never receives the raw private key.
- Restrict outbound network access for signing-only commands. Permit only explicit, reviewed blockchain RPC and swap endpoints for commands that genuinely require networking.
- Run the package in a sandbox with minimal filesystem, environment, process, and network access.
- Audit the exact npm release and its transitive dependencies before allowing it to handle funded wallets.
- Pin the installation metadata to an exact package version rather than specifying only
