T08 · Insecure Dependencies
Warning
- Location
- SETUP.md:37
- Finding
- Unpinned Global Installation of Third-Party Packages and Binaries<![CDATA[ ## Vulnerability Details **File Location**: `SETUP.md:37-50`; duplicated guidance in `SKILL.md:45-51` **Vulnerability Type**: Uncontrolled third-party dependency installation **Risk Level**: Medium ### Vulnerable Code Snippet ```bash npm install -g openclaw openclaw gateway start ``` ```bash npm install -g gogcli ``` ```text Option B - via binary: Download from https://gogcli.ai and verify the binary checksum. ``` ### Technical Analysis The setup guide instructs users to install the latest available versions of `openclaw` and `gogcli` globally through npm without pinning package versions or integrity values. npm package installation can execute package lifecycle scripts with the privileges of the installing user. Consequently, the reviewed documentation does not ensure that the code installed by a future user is the same code that was available when the skill was audited. The alternative installation method also directs users to download a binary from an external website without specifying an exact release, immutable artifact URL, trusted publisher identity, expected SHA-256 checksum, or signature-verification procedure. Although the guide says to verify the checksum, it does not provide a trusted checksum against which the downloaded file can be checked. There is no evidence in the reviewed files that either dependency is currently malicious. The vulnerability is the unsafe and non-reproducible dependency acquisition process. ### Attack Path 1. An attacker compromises the npm package, its maintainer account, the release website, or another part of the distribution channel. 2. The attacker publishes a malicious version or replaces the externally hosted binary. 3. A user follows the documented installation instructions, which implicitly retrieve the latest package or an unspecified binary. 4. npm lifecycle scripts or the downloaded executable run in the user's local security context. 5. The malicious component accesses or modifies resources a ...[truncated 904 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every npm dependency to a reviewed exact version, for example: ```bash npm install -g openclaw@REVIEWED_VERSION npm install -g gogcli@REVIEWED_VERSION ``` 2. Document the expected package publisher, package digest, and trusted registry. 3. Prefer a reproducible local installation with a lockfile over global installation when operationally possible. 4. Review package lifecycle scripts and use `--ignore-scripts` where lifecycle execution is unnecessary. 5. For binary installation, provide: - An immutable release URL. - The exact version. - A SHA-256 digest obtained through a separate trusted channel. - A signed checksum or release signature. - Explicit signature and checksum verification commands. 6. Advise users not to install with root or `sudo` unless strictly required. 7. Periodically review and update pinned versions through a controlled dependency-update process. ]]>
