T08 · Insecure Dependencies
Warning
- Location
- scripts/setup.sh:14
- Finding
- Unpinned Plugin Installation from an External Package Registry## Vulnerability Details **File Location**: `scripts/setup.sh:14-18`, `scripts/interactive-setup.sh:27-31`, `SKILL.md:153-156`, `README.md:52-57` **Vulnerability Type**: Supply-chain exposure through an unpinned external dependency **Risk Level**: Medium ### Vulnerable Code ```bash if [[ $REPLY =~ ^[Yy]$ ]]; then echo "正在安装插件..." export npm_config_registry="https://npm.corp.kuaishou.com" openclaw plugins install @ks-openclaw/kim ``` The same unpinned installation pattern appears in the alternate setup script: ```bash if [[ $REPLY =~ ^[Yy]$ ]]; then echo "正在安装插件..." export npm_config_registry="https://npm.corp.kuaishou.com" openclaw plugins install @ks-openclaw/kim echo "✅ 插件安装完成" ``` ### Technical Analysis The scripts install `@ks-openclaw/kim` from an external corporate npm registry without specifying an exact version or verifying a cryptographic integrity digest or signature. The repository also does not contain a lockfile, vendored plugin source, or other mechanism that binds installation to the code reviewed during this audit. Consequently, the effective code executed by the setup process can change independently of this Skill. Although no evidence indicates that the current package is malicious, compromise of the registry, package publisher account, package namespace, or a future package release could cause users to install attacker-controlled code. The installation is user-confirmed, but the prompt does not disclose the lack of version pinning or integrity verification. ### Attack Path 1. An attacker compromises the package publisher account, corporate registry, or package distribution process. 2. The attacker publishes a malicious release under the existing `@ks-openclaw/kim` package name. 3. A user runs either setup script and approves plugin installation. 4. `openclaw plugins install @ks-openclaw/kim` resolves the package version available at installation time. ...[truncated 719 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the plugin to a specific, reviewed version, such as an exact semantic version rather than the latest available release. 2. Verify the downloaded package against an approved cryptographic integrity digest or signature. 3. Maintain an internal allowlist of approved package versions and prevent automatic resolution to newer releases. 4. Review and archive the source of each approved plugin version. 5. Document the registry trust boundary and inform users which package version will be installed before requesting confirmation. 6. Use a lockfile or equivalent immutable dependency manifest where OpenClaw supports it. 7. Execute plugins with the least privileges necessary and restrict their access to unrelated credentials and workspace data.
