T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:5
- Finding
- Unpinned npm Package Is Automatically Downloaded and Executed with API-Key Access## Vulnerability Details **File Location**: `SKILL.md:5-9` and `SKILL.md:16-20` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: openclaw: requires: bins: ["npx"] env: ["MASSIVE_API_KEY"] primaryEnv: "MASSIVE_API_KEY" ``` ```markdown ## CLI Usage ```bash npx --yes massive <command> [options] ``` ``` The same unpinned invocation pattern appears throughout all eight files under `references/`, including: - `references/crypto_commands.md:41-141` - `references/forex_commands.md:12-236` - `references/indices_commands.md:12-173` - `references/market_commands.md:12-36` - `references/news_commands.md:12-32` - `references/options_commands.md:12-257` - `references/reference_commands.md:12-215` - `references/stocks_commands.md:12-272` ### Technical Analysis The command `npx --yes massive` does not specify an exact package version. If the package is not already available locally, `npx` can resolve the current package release from the configured npm registry, download it, and execute it without an interactive confirmation prompt. The project does not contain the CLI implementation, a package manifest, a lockfile, a package-integrity hash, or vendored source that would bind execution to the code reviewed during this audit. The effective executable can therefore change after the Skill has been reviewed. This is particularly sensitive because the Skill explicitly requires `MASSIVE_API_KEY`. A process launched by `npx` normally inherits the invoking process's environment, so downloaded package code may be able to read that credential. The package also executes with the filesystem, process, and network permissions of the Agent account. No evidence establishes that the current `massive` package is malicious. The vulnerability is the mutable and unaudited supply-chain execution path. ### Attack Path ...[truncated 1555 chars]
- Remediation
- ## Remediation Suggestions 1. Replace the mutable invocation with an exact, reviewed version, for example `npx --yes massive@X.Y.Z`, after verifying that the selected version is legitimate. 2. Prefer installing the dependency through a committed package manifest and lockfile so the complete dependency graph is reproducible. 3. Enforce registry integrity verification and retain the expected package integrity hash in the lockfile. 4. Review the package source, executable entry point, installation scripts, and transitive dependencies before approving a version. 5. Use a trusted, allowlisted npm registry and enable package provenance or signature verification where supported. 6. Disable dependency lifecycle scripts when they are unnecessary, and fail closed rather than automatically accepting unexpected installation behavior. 7. Run the CLI in a restricted environment with minimal filesystem access, limited outbound networking, and no unrelated environment variables. 8. Scope and rotate `MASSIVE_API_KEY`, and provide it only to the reviewed process at invocation time rather than exposing it broadly in the parent environment. 9. Update every command example under `references/` to use the same pinned and verified execution mechanism.
