T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:18
- Finding
- Unpinned Remote Repository Installation Creates a Mutable Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md`, lines 18-19 **Vulnerability Type**: Unpinned remote dependency installation **Risk Level**: Medium **Vulnerable Code**: ```bash git clone https://github.com/openclaw/openclaw.git cd openclaw && npm install ``` ### Technical Analysis The documented installation process clones the current default branch of a remote repository without pinning a reviewed commit hash or signed release. It then immediately runs `npm install`, which resolves third-party dependencies and may execute package lifecycle scripts such as `preinstall`, `install`, and `postinstall`. Because both the repository branch and unverified dependency resolution are mutable, the code ultimately installed can change after this Skill has been reviewed. A compromise of the upstream repository, its maintainer accounts, the package registry, or a transitive dependency could cause users following these instructions to retrieve and execute attacker-controlled code. No malicious payload is embedded in the audited project itself. The risk arises from the unsafe and non-reproducible remote installation procedure. ### Attack Path 1. An attacker compromises the upstream repository, a maintainer account, or a dependency resolved during `npm install`. 2. The attacker introduces malicious code into the default branch or into an install-time dependency or lifecycle script. 3. A user follows the instructions and clones the mutable default branch. 4. The user runs `npm install`, which retrieves the affected dependencies and can execute malicious lifecycle scripts. 5. The payload executes with the operating-system privileges of the user performing the installation. ### Impact Assessment Successful exploitation could allow arbitrary command execution in the installation environment with the privileges of the installing user. Depending on those privileges and the environment, an attacker could access source code ...[truncated 441 chars]
- Remediation
- ## Remediation Suggestions 1. Replace the mutable clone operation with a pinned, reviewed commit or cryptographically verified signed release: ```bash git clone https://github.com/openclaw/openclaw.git cd openclaw git checkout --detach <reviewed-commit-sha> ``` 2. Publish the expected commit hash and verify it before installation. 3. Include a reviewed lockfile and use `npm ci` rather than `npm install` to enforce reproducible dependency versions. 4. Require package integrity metadata and monitor direct and transitive dependencies for compromise. 5. Audit all package lifecycle scripts. Where compatible with the application, install with `npm ci --ignore-scripts` and explicitly run only reviewed build steps. 6. Perform installation as a dedicated, unprivileged account in an isolated container or build environment with minimal filesystem, credential, and network access. 7. Avoid exposing production secrets or developer credentials to the installation environment. 8. Document a dependency-update review process so that changes to the pinned revision and lockfile receive security review before release.
