T08 · Insecure Dependencies
- Location
SKILL.md:28- Finding
Unpinned npm Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 28-36
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code
bash npx ts-node scripts/openclaw-jimeng.ts image "一只戴墨镜的柴犬,电影海报风格"bash npx ts-node scripts/openclaw-jimeng.ts video "一只戴墨镜的柴犬在沙滩上奔跑" --waitTechnical Analysis
The documented commands invoke
ts-nodethroughnpxwithout specifying a reviewed version or requiring a locally installed, lockfile-controlled copy. Ifts-nodeis not available in the local project,npxmay resolve and download the package from the configured npm registry before executing it.The audited project contains only
SKILL.md; no package manifest, lockfile, integrity metadata, vendored dependency, or dependency verification mechanism is present. Consequently, the exact executable dependency is not reproducibly defined by the project. Its effective implementation can depend on registry state and local npm configuration at execution time.This creates a supply-chain exposure if the resolved package, registry, package metadata, or dependency chain is compromised. The referenced
scripts/openclaw-jimeng.tsfile is also absent from the audited artifact, so its behavior could not be verified.Attack Path
- An operator follows one of the recommended
npx ts-nodecommands. - The environment does not contain a suitable local
ts-nodeexecutable. npxresolves the unpinned package through the configured npm registry.- A compromised registry response, package release, transitive dependency, or registry configuration supplies attacker-controlled code.
- The downloaded package or its dependency code executes under the invoking user's account.
- The malicious code can access resources available to that process, potentially including project files, local output, network connectivity, and exported environment credentials such as the documented ...[truncated 772 chars]
- An operator follows one of the recommended
- Remediation
View remediation
Remediation Suggestions
- Add a reviewed
package.jsonand lockfile to the project, and declare an exact or tightly controlledts-nodeversion. - Install dependencies reproducibly with
npm ci, which enforces the committed lockfile. - Run the local dependency without permitting registry fallback:
bash npx --no-install ts-node scripts/openclaw-jimeng.ts image "prompt" - Alternatively, invoke the locked binary directly:
bash ./node_modules/.bin/ts-node scripts/openclaw-jimeng.ts image "prompt" - Commit and review the referenced
scripts/openclaw-jimeng.tsimplementation and the documentedskill.yaml, both of which are absent from the audited artifact. - Use trusted registry configuration, dependency integrity checks, automated supply-chain scanning, and controlled dependency update reviews.
- Execute generation tooling with least privilege and expose only the credentials required for the current task. Prefer short-lived tokens over permanent credentials where supported.
- Add a reviewed
