T08 · Insecure Dependencies
Error
- Location
- SKILL.md:28
- Finding
- Unpinned Remote Repository and Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 28–38 **Vulnerability Type**: Unverified remote source and dependency-chain execution **Risk Level**: High ### Vulnerable Code ```bash ### 方式一:从ClawHub安装 clawhub install openclaw-config-manager ``` ```bash # 克隆仓库 git clone https://github.com/wisdom-wozoy/openclaw-config-manager.git # 安装依赖 cd openclaw-config-manager npm install # 注册Skill openclaw skills register ./openclaw-config-manager ``` ### Technical Analysis The installation procedure retrieves a mutable remote repository without pinning a reviewed commit, validating a cryptographic checksum, or verifying a signed release. It then executes `npm install`, which can run package lifecycle scripts such as `preinstall`, `install`, and `postinstall`. Those scripts, along with the remotely retrieved Skill implementation and dependencies, are absent from the audited artifact and therefore cannot be verified. Because the repository reference is not immutable, the code installed by a user may differ from the code available at audit time. A compromised repository, malicious future revision, dependency compromise, or unsafe package update could consequently introduce arbitrary local code execution. The alternative `clawhub install` command similarly does not identify a pinned version or integrity-verification mechanism in the provided documentation. ### Attack Path 1. An attacker compromises the referenced GitHub repository, its maintainer account, the distribution channel, or an npm dependency. 2. The attacker adds malicious Skill code or a package lifecycle script to the remotely retrieved content. 3. A user follows the documented installation procedure without verifying a commit, signature, or checksum. 4. `npm install` processes the attacker-controlled package metadata and may execute malicious lifecycle scripts with the user's privileges. 5. The user registers the resulting Skill through `openclaw skills register`. 6. The malicious ...[truncated 743 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin installation instructions to a specific, reviewed commit hash or immutable release version. 2. Publish cryptographic checksums for release artifacts and require users to verify them before installation. 3. Sign releases and document signature verification using a trusted maintainer key. 4. Include and review the complete implementation, `package.json`, lockfile, and required lifecycle scripts in the distributed Skill artifact. 5. Use `npm ci` with a committed lockfile rather than unconstrained `npm install`. 6. Use `npm ci --ignore-scripts` when lifecycle scripts are not strictly required. If scripts are required, document and audit each one. 7. Pin dependencies to reviewed versions and enable automated dependency integrity and vulnerability checks. 8. Install and test the Skill under a dedicated, least-privileged account or isolated environment. 9. Document an explicit ClawHub version and its integrity-verification process rather than relying on an unspecified latest release. ]]>
