T08 · Insecure Dependencies
Warning
- Location
- README.md:8
- Finding
- Unpinned npm CLI Execution Creates a Supply-Chain Risk## Vulnerability Details **File Location**: `README.md:8`, `README.md:24`, and `README.md:32` **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: Medium **Relevant code snippets**: ```bash npx clawhub add tokflow ``` ```bash npx clawhub login ``` ```bash npx clawhub publish integrations/openclaw-skill --slug tokflow --name "TokFlow" --version 0.5.0 --changelog "v0.5.0 提问方式监控与优化:提问轮次统计、四规则建议、节省预估、prompt-stats 命令" ``` ### Technical Analysis The documented `npx clawhub` commands do not specify a reviewed package version or integrity constraint. If the package is not already installed locally, `npx` can retrieve and execute the package selected by the npm registry at invocation time. Consequently, the effective executable can change after this Skill has been reviewed. Compromise of the upstream package, maintainer account, package publication process, or registry resolution could cause users to execute attacker-controlled code. This is particularly sensitive for the `login` and `publish` workflows because they may run in an environment containing publishing credentials. No evidence shows that the current `clawhub` package is malicious. The vulnerability is the mutable, unpinned execution method recommended by the documentation. ### Attack Path 1. An attacker compromises the `clawhub` npm package, its maintainer account, or its publication pipeline. 2. The attacker publishes a malicious version under the expected package name. 3. A user follows the README and invokes an unversioned `npx clawhub` command. 4. `npx` resolves and downloads the attacker-controlled version. 5. The package executes with the invoking user's privileges. 6. Malicious package code accesses files, environment variables, authentication material, or publishing credentials available to that user. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the us ...[truncated 317 chars]
- Remediation
- ## Remediation Suggestions - Pin the CLI to a reviewed version, for example `npx clawhub@<reviewed-version> ...`. - Record and verify package integrity through a lockfile or an equivalent trusted integrity mechanism. - Prefer installing the reviewed CLI once and invoking the trusted local installation rather than allowing every command to perform mutable package resolution. - Use restricted CI or publishing environments that expose only the minimum credentials required. - Review package provenance and signatures before version upgrades. - Avoid running installation or publishing commands with administrator privileges.
