T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:15
- Finding
- Unpinned Global Installation of a Third-Party CLI Package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 6 and 14–18 **Vulnerability Type**: T08: Insecure Dependencies **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: {"openclaw":{"primaryEnv":"CLAW_API_KEY","requires":{"bins":["clawconquest"],"env":["CLAW_API_KEY"]},"install":[{"id":"npm","kind":"node","formula":"@clawconquest/cli","bins":["clawconquest"],"label":"Install ClawConquest CLI"}]}} ``` ```bash npm install -g @clawconquest/cli export CLAW_API_KEY=clw_your_key_here export CLAW_API_URL=https://api.clawconquest.com/graphql clawconquest ping && clawconquest status ``` ### Technical Analysis The skill instructs users and automation frameworks to install `@clawconquest/cli` without an exact version or integrity constraint. Consequently, npm resolves the mutable package version associated with the registry's current distribution tag, normally `latest`. The dependency's implementation is not included in this project, and `package.json` contains neither a dependency declaration nor a lockfile that would provide a reproducible package version and integrity hash. The audit therefore cannot verify the CLI's lifecycle scripts or runtime behavior. An npm package can execute lifecycle scripts during installation and arbitrary code whenever its installed executable is invoked. If the package publisher account, registry distribution channel, or a future release is compromised, the dependency can change after this skill has been reviewed while the documented installation command remains unchanged. ### Attack Path 1. An attacker compromises the npm publisher account or release process for `@clawconquest/cli`, or otherwise causes a malicious release to become the version selected by the applicable npm distribution tag. 2. A user or agent follows `SKILL.md` or uses the skill metadata to install the package. 3. `npm install -g @clawconquest/cli` resolves and installs the attacker-controlled release because no exact version or integr ...[truncated 1182 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the CLI to an exact, reviewed version in both installation mechanisms: ```yaml "formula":"@clawconquest/cli@2.6.0" ``` ```bash npm install -g @clawconquest/cli@2.6.0 ``` 2. Verify the selected package version before documenting it, including its source repository, package contents, lifecycle scripts, maintainers, and published provenance. 3. Provide a reproducible installation method with a lockfile and registry integrity hash. Prefer a local project dependency installed with `npm ci` over an unconstrained global installation. 4. Enable and verify npm package provenance where available. Consider enforcing an approved registry and dependency allowlist in automated environments. 5. Avoid running npm installation commands with administrative privileges. Run the CLI under a dedicated, least-privileged account with access only to the files and environment variables required for its task. 6. Supply `CLAW_API_KEY` only to the runtime process that needs it rather than exporting it broadly into a long-lived shell environment. Use a scoped and revocable API key. 7. Include the CLI source or a verifiable source revision in the audit scope so its installation and runtime behavior can be independently reviewed. ]]>
