T08 · Insecure Dependencies
- Location
SKILL.md:23- Finding
Unpinned Runtime Dependency Download and Execution via npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:23-34
Additional Location:README.md:55-104
Vulnerability Type: Unpinned runtime dependency execution
Risk Level: MediumVulnerable Code Snippet
bash npx tsx $SCRIPT_DIR/google-search.ts search "query" [--num 10] [--time day|week|month|year] [--country us] [--lang en] npx tsx $SCRIPT_DIR/google-search.ts news "query" [--num 10] npx tsx $SCRIPT_DIR/google-search.ts images "query" npx tsx $SCRIPT_DIR/google-search.ts videos "query" npx tsx $SCRIPT_DIR/google-search.ts places "query" npx tsx $SCRIPT_DIR/google-search.ts shopping "query" npx tsx $SCRIPT_DIR/google-search.ts scholar "query" [--year 2023] npx tsx $SCRIPT_DIR/google-search.ts patents "query" npx tsx $SCRIPT_DIR/google-search.ts suggest "query" npx tsx $SCRIPT_DIR/google-search.ts creditsThe same unpinned
npx tsxexecution pattern appears inREADME.md:55-104.The project does not declare
tsxinpackage.json:json { "name": "google-search", "version": "1.0.0", "description": "Google Search via Serper.dev API for OpenClaw", "private": true }Technical Analysis
The documented execution path invokes
tsxthroughnpx, but the project neither declares an exacttsxdependency nor includes a lockfile. Whentsxis not already installed locally,npxmay resolve, download, and execute a mutable package from the configured npm registry.Consequently, the reviewed Skill package does not fully determine the code executed when its documented commands are followed. Registry compromise, package-account compromise, dependency substitution through a malicious registry configuration, or an unexpectedly changed upstream release could introduce arbitrary code before the local search script starts.
This also conflicts with the README's “zero dependencies” claim: although no dependency is declared in
package.json, executing TypeScript as documented relies on an external runtime package.Attack
...[truncated 1402 chars]
- Remediation
View remediation
Remediation Suggestions
-
Declare
tsxas an exact development or runtime dependency rather than resolving it implicitly:json { "devDependencies": { "tsx": "EXACT_REVIEWED_VERSION" } } -
Generate and commit a lockfile, and install dependencies with a deterministic command such as
npm ci. -
Invoke the pinned local binary through a package script or explicit local path instead of allowing an undeclared package download:
json { "scripts": { "search": "tsx scripts/google-search.ts" } } -
In automated or security-sensitive environments, configure
npxto reject implicit package installation, or avoidnpxentirely for this execution path. -
Prefer compiling the TypeScript sources into reviewed JavaScript during a controlled build and distributing the compiled artifact so runtime package retrieval is unnecessary.
-
Pin and verify the dependency source using lockfile integrity metadata, trusted registry configuration, and routine supply-chain review.
-
Update the “zero dependencies” documentation to accurately disclose the runtime tooling requirement and its installation method.
-
