T08 · Insecure Dependencies
- Location
references/sources-and-queries.md:72- Finding
Unpinned ClawHub Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
references/sources-and-queries.md, lines 72–81
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumComplete Code Snippet:
markdown ## ClawHub CLI fallback Use only after checking the ClawHub website and GitHub website. Examples: - `npx clawhub search "github"` - `npx clawhub search "repo"` - `npx clawhub search "browser"` - `npx clawhub search --sort installs`The same unsafe dependency-execution pattern is introduced in
SKILL.md, line 16:markdown 3. ClawHub CLI such as `npx clawhub search`Technical Analysis
The skill instructs the agent to invoke the
clawhubnpm package throughnpxwithout pinning a reviewed version or requiring package integrity and provenance verification. If the package is not already installed,npxcan retrieve and execute the version currently resolved by the npm registry.This creates a mutable supply-chain execution boundary: the package code executed in a future skill run may differ from the code that existed when the skill was audited. Package lifecycle scripts or the CLI implementation itself could execute arbitrary local commands. Exploitation would require the resolved package or its distribution channel to be compromised, maliciously replaced, or otherwise unsafe.
Attack Path
- ClawHub and GitHub website searches fail to provide sufficient results or are considered inconvenient.
- The agent follows the documented CLI fallback.
- The agent executes an instruction such as
npx clawhub search "github". npxresolves and potentially downloads a mutable, unpinned package from the npm registry.- Malicious package lifecycle or runtime code executes with the permissions and environment of the agent process.
- That code can access resources available to the current user and agent runtime.
Impact Assessment
Successful exploitation could provide arbitr ...[truncated 448 chars]
- Remediation
View remediation
Remediation Suggestions
- Prefer browser-based ClawHub queries and remove automatic
npxexecution from the fallback workflow. - If CLI execution is necessary, require explicit user consent before downloading or running a package.
- Pin the CLI to a specific reviewed version rather than resolving the latest mutable release.
- Verify the package name, publisher, repository provenance, lockfile metadata, and registry integrity information before execution.
- Disable npm lifecycle scripts where compatible, and review the package contents before first use.
- Execute the CLI in a restricted sandbox or disposable container with minimal filesystem access, no unnecessary credentials, and constrained network permissions.
- Document the exact trusted installation procedure instead of presenting bare
npx clawhubcommands.
- Prefer browser-based ClawHub queries and remove automatic
