T08 · Insecure Dependencies
Warning
- Location
- README.md:11
- Finding
- Unpinned Third-Party Packages and Mutable Remote Sources Executed During Installation<![CDATA[ ## Vulnerability Details **File Location**: `README.md`, lines 11–19 **Vulnerability Type**: Unpinned dependency and mutable remote-source execution **Risk Level**: Medium ### Vulnerable Code ```bash npx skills add https://github.com/wpank/Agentic-Uniswap/tree/main/.ai/skills/optimize-lp ``` Or via Clawhub: ```bash npx clawhub@latest install optimize-lp ``` ### Technical Analysis The documented installation procedures use `npx`, which can download and immediately execute third-party npm package code with the invoking user's privileges. The `clawhub@latest` reference explicitly resolves to a mutable package version. The `skills` package is also invoked without an exact version. In addition, the GitHub source points to the mutable `main` branch rather than a reviewed commit SHA. Consequently, the code executed or installed by these commands can change after this project has been audited. The repository does not include a lockfile, integrity checksum, signature-verification procedure, vendored installer, or other mechanism that binds these installation commands to reviewed artifacts. This creates a supply-chain exposure even though no malicious local scripts were identified in the audited project. ### Attack Path 1. An attacker compromises the npm account, package publication pipeline, GitHub repository, or another component of the referenced distribution infrastructure. 2. The attacker publishes malicious code under a newer `clawhub` release, modifies the unversioned `skills` package, or changes content reachable through the GitHub `main` branch. 3. A user follows the installation command from `README.md`. 4. `npx` downloads and executes the mutable third-party package. 5. The malicious installer runs with the permissions of the user who invoked the command and may install additional attacker-controlled content. ### Impact Assessment Successful exploitation may provide arbitrary code execution under the invoking user's account. The attacker ...[truncated 541 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin each npm package to an exact, reviewed version instead of using an omitted version or `@latest`, for example: ```bash npx clawhub@X.Y.Z install optimize-lp ``` 2. Pin the GitHub source to a reviewed immutable commit SHA rather than the mutable `main` branch. 3. Record the reviewed package versions and commit identifiers in the installation documentation. 4. Use lockfiles and package-manager integrity metadata where an installation workflow supports them. 5. Verify package provenance, signatures, and cryptographic checksums before execution where supported. 6. Prefer downloading and inspecting installer artifacts before running them rather than combining retrieval and execution in one command. 7. Execute installation with a non-administrative account and within a restricted environment that limits filesystem, credential, and network access. 8. Establish a controlled update process in which new versions and source commits are reviewed before the documented pins are changed. ]]>
