T08 · Insecure Dependencies
- Location
SKILL.md:50- Finding
Automatic Installation of an Unpinned Security-Critical npm Dependency
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 50-53; related installation instructions also appear at lines 23 and 306
Vulnerability Type: Unpinned third-party dependency and unsafe automatic installation
Risk Level: HighVulnerable Code
bash [ -f "$HOME/.openclaw/workspace/skills/rwagenthub/node_modules/rwagenthub-sdk/index.js" ] || \ npm install --prefix "$HOME/.openclaw/workspace/skills/rwagenthub" rwagenthub-sdk --silentThe same package is manually installed without a version constraint at line 23:
bash npm install --prefix ~/.openclaw/workspace/skills/rwagenthub rwagenthub-sdkTechnical Analysis
The Skill instructs the agent to install
rwagenthub-sdkwithout an exact version, lockfile, or integrity hash. Consequently, npm resolves whichever package version is current at installation time. The automatic pre-call check makes dependency installation part of normal operation and uses--silent, reducing the visibility of installation warnings and lifecycle-script activity.This dependency is security-critical because the Skill subsequently provides it with
process.env.MCP_WALLET_PRIVATE_KEY. A compromised package release, compromised maintainer account, registry takeover, or malicious transitive dependency could execute code during npm installation or SDK initialization. npm lifecycle scripts may execute before the SDK is used, while malicious runtime code could directly read the wallet key.The project contains no bundled SDK implementation or integrity metadata with which to verify the package behavior or the assertion that the private key remains local.
Attack Path
- An attacker compromises the npm package, its maintainer account, or one of its dependencies.
- The attacker publishes a malicious version while retaining the expected package name.
- The SDK installation check determines that the expected file is absent on a new or cleaned environment.
...[truncated 1066 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the SDK to an exact, reviewed version rather than relying on npm's latest matching release.
- Commit and enforce a lockfile containing resolved versions and integrity hashes.
- Use
npm ciagainst the reviewed lockfile instead of automatically resolving dependencies. - Verify package provenance, signatures, and registry integrity before installation.
- Disable npm lifecycle scripts with
--ignore-scriptsunless they are demonstrably required and reviewed. - Remove automatic package installation from the API-call path. Require an explicit, user-approved setup phase.
- Avoid
--silentfor security-sensitive installation so warnings and executed actions remain visible. - Vendor or independently audit the signing component because it handles a wallet private key.
- Isolate the SDK in a restricted process with minimal filesystem and network access.
- Use a dedicated low-balance wallet with narrowly limited token approvals, as already recommended by the documentation.
