T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:4
- Finding
- Unpinned External npm Package Creates a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 4 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: { "openclaw": { "emoji": "🛡️", "requires": { "bins": ["chainward"], "env": ["CHAINWARD_API_KEY"] }, "primaryEnv": "CHAINWARD_API_KEY", "install": [{ "id": "chainward-npm", "kind": "node", "package": "@chainward/cli", "bins": ["chainward"], "label": "Install ChainWard CLI" }] } } ``` ### Technical Analysis The installation metadata specifies `@chainward/cli` without an exact version or integrity hash. Consequently, installation can resolve to a future package release whose implementation differs from the version originally reviewed. The dependency is an executable CLI and is expected to operate while `CHAINWARD_API_KEY` is available. Its source code is not included in the audited project, so this audit cannot verify its credential handling, network destinations, local configuration behavior, lifecycle scripts, or command implementation. This is a supply-chain weakness rather than evidence that the current external package is malicious. Exploitation would require compromise of the package publisher, npm distribution path, or a subsequently published release. ### Attack Path 1. An attacker compromises the npm publisher account or another component of the package publication process. 2. The attacker publishes a malicious version of `@chainward/cli`. 3. A user or Agent installs the Skill dependency without an exact version constraint or verified integrity value. 4. npm resolves the dependency to the attacker-controlled release. 5. Malicious package lifecycle code or CLI code executes with the permissions of the installing or invoking user. 6. The code may read `CHAINWARD_API_KEY` when exposed to the process, access Agent-readable local data, or transmit wallet-monitoring information to an attacker-controlled service. ### Impact Assessment Successful exploita ...[truncated 779 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `@chainward/cli` to an exact, reviewed version rather than allowing the installer to resolve an unspecified release. 2. Record and verify a cryptographic integrity hash for the approved package artifact. 3. Review the package source, bundled files, npm lifecycle scripts, and transitive dependencies before approval. 4. Disable npm lifecycle scripts during installation where compatible with the package's documented requirements. 5. Use a lockfile or trusted internal package mirror to make dependency resolution reproducible. 6. Run the CLI with least privilege and expose `CHAINWARD_API_KEY` only to commands that require it. 7. Ensure any credential-bearing configuration file has restrictive filesystem permissions and does not store secrets in plaintext unless explicitly required and documented. 8. Document the expected ChainWard API endpoints so unexpected outbound connections can be restricted or detected. 9. Establish a controlled update process that reviews each new CLI version before changing the pinned dependency. ]]>
