T08 · Insecure Dependencies
Warning
- Location
- README.md:21
- Finding
- Mutable remote packages are executed through unpinned npx installation commands<![CDATA[ ## Vulnerability Details **File Location**: `README.md:21-30`; duplicated in `SKILL.md:15-18` **Vulnerability Type**: Supply-chain exposure through mutable remote dependencies **Risk Level**: Medium ### Vulnerable Code `README.md:21-30`: ```bash ## Installation ```bash npx add https://github.com/wpank/ai/tree/main/skills/realtime/resilient-connections ``` ### OpenClaw / Moltbot / Clawbot ```bash npx clawhub@latest install resilient-connections ``` ``` `SKILL.md:15-18`: ```bash ```bash npx clawhub@latest install resilient-connections ``` ``` ### Technical Analysis The documented installation process instructs users to execute packages retrieved from mutable remote sources. The command using `clawhub@latest` does not pin the installer to a reviewed version. A future release under that package name will therefore be downloaded and executed even if it differs from the version originally audited. Depending on npm configuration and package behavior, execution can include CLI entry points and package lifecycle code under the installing user's account. The GitHub source is similarly not pinned to a commit SHA. Its effective contents can change after review. In addition, `npx add ...` invokes an npm package or executable named `add`; it is not a native, self-contained npm command for securely installing the referenced directory. This introduces an additional dependency whose identity, version, and integrity are not documented. No evidence shows that the current remote packages are malicious. The vulnerability is the unsafe trust and execution model presented by the installation instructions. ### Attack Path 1. An attacker compromises the npm publisher account, the relevant package, or the upstream repository, or publishes a malicious version through an applicable package-resolution weakness. 2. The attacker adds malicious CLI or lifecycle behavior to the mutable package or remote source. 3. A user follows the documented `npx` installation command ...[truncated 825 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every npm CLI dependency to a reviewed exact version rather than using `@latest`. 2. Publish and verify integrity information for the installer, such as a lockfile and npm integrity hash. 3. Pin GitHub-based sources to an immutable reviewed commit SHA instead of a mutable branch or directory URL. 4. Replace the ambiguous `npx add ...` command with an explicitly documented and trusted installation mechanism. 5. Use `npx --ignore-existing --package=<trusted-package>@<exact-version> <command>` or an equivalent explicit invocation where appropriate. 6. Document the package identity, expected publisher, version, checksums, and required permissions. 7. Recommend reviewing downloaded code and avoiding elevated execution before installation. ]]>
