T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:35
- Finding
- Unpinned ClawHub CLI Execution Through npx## Vulnerability Details **File Location**: `SKILL.md:35-36` and `preview.md:7` **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: Medium ### Vulnerable Code `SKILL.md:35-36`: ```bash npx clawhub outdated # List skills with updates npx clawhub info <slug> # Show available versions ``` `preview.md:7`: ```bash npx clawhub fetch <slug>@<version> --dir /tmp/preview-<slug> ``` ### Technical Analysis The documented commands execute `clawhub` through `npx` without pinning the CLI package to a specific, reviewed version. If the package is not already available locally, `npx` may retrieve it from the configured package registry and execute it immediately. Although the fetch command supplies a version for the skill being downloaded, that version does not constrain the version or integrity of the `clawhub` executable itself. The effective CLI implementation can therefore change after this skill has been reviewed. This creates a supply-chain trust boundary in which compromise of the registry account, package distribution infrastructure, package name resolution, or a newly published malicious CLI version could result in arbitrary code execution. ### Attack Path 1. An attacker compromises the package publisher, registry distribution path, or another component controlling the package resolved as `clawhub`. 2. The attacker publishes or serves a malicious version containing install-time or runtime code. 3. A user or Agent follows the skill instructions and runs one of the unpinned `npx clawhub` commands. 4. `npx` resolves and downloads the attacker-controlled package when no trusted local version is available. 5. Package lifecycle logic or the invoked CLI executes with the permissions of the current user or Agent process. 6. The malicious package can access resources available to that process before optionally displaying expected CLI output to conceal t ...[truncated 627 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the ClawHub CLI to an exact, audited version rather than relying on the registry's current version: ```bash npx --yes clawhub@<verified-version> outdated npx --yes clawhub@<verified-version> info <slug> npx --yes clawhub@<verified-version> fetch <slug>@<version> --dir /tmp/preview-<slug> ``` 2. Prefer a trusted, preinstalled CLI managed through a lockfile containing package integrity hashes. 3. Configure an approved package registry and verify package provenance, signatures, and integrity before installation or execution. 4. Where supported, install the reviewed package in advance and execute it in offline mode so `npx` cannot silently retrieve a newer implementation. 5. Review dependency trees and package lifecycle scripts before approving a new CLI version. 6. Run update tooling with least privilege and restrict its filesystem, credential, and network access to the minimum required. 7. Update both `SKILL.md` and `preview.md` so every example follows the same pinned and verified execution procedure.
