T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:35
- Finding
- Unpinned npm Package Execution Through npx<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 35, 38, 62, 65, 68, 74, 77, 80, 86, and 89 **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: Medium ### Vulnerable Code ```bash # SKILL.md:35 npx clawhub search "keyword" # SKILL.md:38 npx clawhub browse # SKILL.md:62 npx clawhub search "web search" # SKILL.md:65 npx clawhub search "weather" # SKILL.md:68 npx clawhub search "document" # SKILL.md:74 npx clawhub search "tavily" # SKILL.md:77 npx clawhub search "github" # SKILL.md:80 npx clawhub search "calendar" # SKILL.md:86 npx clawhub search --sort installs # SKILL.md:89 npx clawhub search --sort stars ``` ### Technical Analysis The documented commands invoke the bare `clawhub` npm package through `npx` without specifying a reviewed version, requiring a preinstalled copy, or validating package integrity. When the package is not already available locally, `npx` may resolve, download, and execute package-controlled code from the configured npm registry. Consequently, the code executed by these instructions can change after the skill has been reviewed. An upstream package compromise, malicious package replacement, registry or configuration manipulation, or an unexpectedly unsafe new release could cause arbitrary package code to run. npm lifecycle scripts and the CLI entry point may execute with the permissions of the user running `npx`. The audit did not identify evidence that the current `clawhub` package is malicious. The vulnerability is the unsafe and non-reproducible dependency execution pattern. ### Attack Path 1. A user or agent follows one of the documented `npx clawhub` examples. 2. No verified local installation of `clawhub` is available, or normal package resolution otherwise selects a remote package. 3. `npx` resolves an unpinned package version using the configured npm registry. 4. An attacker-controlled or compromised package version is downloaded. 5. Package lifecycle logic or its CL ...[truncated 1108 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every invocation to a specifically reviewed package version: ```bash npx --yes clawhub@<reviewed-version> search "keyword" ``` 2. Prefer installing the reviewed version through a controlled dependency manifest and lockfile, then invoke the locked local binary: ```bash npm install --save-exact clawhub@<reviewed-version> npx --no-install clawhub search "keyword" ``` 3. Document the authoritative package name, publisher, registry, and expected version so users can detect typosquatting or registry substitution. 4. Commit and verify an npm lockfile where the project model permits it. Use lockfile integrity metadata and a trusted registry. 5. Review package source, lifecycle scripts, ownership changes, and published artifacts before approving upgrades. Apply upgrades through an explicit review process rather than accepting the latest release automatically. 6. Run the CLI in a least-privilege, isolated environment without unrelated credentials or sensitive filesystem access, especially when evaluating a new version. 7. Consider disabling lifecycle scripts during installation where compatible, and verify package provenance or signatures when supported by the package distribution workflow. ]]>
