T08 · Insecure Dependencies
- Location
SKILL.md:31- Finding
Unpinned runtime dependency is downloaded and executed through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:31-42; repeated inREADME.md:48, 53, 58, 63, 68, 73, 78, 83, 88, 93
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code
bash SCRIPT_DIR="~/.openclaw/workspace/skills/google-search/scripts" # Web search (default) npx tsx $SCRIPT_DIR/google-search.ts search "query" [--num 10] [--time day|week|month|year] [--country us] [--lang en] # Specialized 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 invocation pattern appears throughout the README, for example:
bash npx tsx scripts/google-search.ts search "openclaw ai agent" npx tsx scripts/google-search.ts news "AI regulation" --num 10 npx tsx scripts/google-search.ts creditsThe project does not declare
tsxinpackage.json, and no dependency lockfile is present. The README also states that the project has “zero dependencies,” despite requiringtsxto execute its TypeScript source.Technical Analysis
npx tsxexecutes the package version resolved by npm at invocation time. Iftsxis unavailable locally or in the package cache,npxmay retrieve it from the configured npm registry before executing it. Because neither an exact version nor a lockfile integrity record is provided, the effective executable dependency can change after this Skill has been reviewed.This creates a supply-chain trust boundary outside the audited project. A compromised future package release ...[truncated 2097 chars]
- Remediation
View remediation
Remediation Suggestions
- Declare
tsxas a project dependency or development dependency using an exact reviewed version rather than a floating range. - Generate and commit a package lockfile containing resolved versions and integrity hashes.
- Install dependencies during a controlled installation or build phase, rather than allowing
npxto retrieve executable code when each search runs. - Invoke the locked project-local binary, such as through a package script, and configure execution so that missing local packages cause failure instead of network retrieval.
- Prefer compiling the TypeScript files into reviewed JavaScript during release and executing them directly with Node.js. This removes the runtime TypeScript loader from the Skill's normal execution path.
- Update the README and
SKILL.mdcommands to use the hardened invocation method and remove or correct the “zero dependencies” claim. - In controlled environments, restrict npm registry configuration to an approved registry and verify dependency provenance and integrity during installation.
- Declare
