T08 · Insecure Dependencies
- Location
scripts/adapters.py:121- Finding
Unpinned npm Package Is Downloaded and Executed
- Content
View full analysis
Result: if not dry_run and not command("npx"): return Result("blocked", "npx is required for HOL Registry") directory = info["skillDir"] quote = run(["npx", "--yes", "@hol-org/registry", "skills", "quote", "--dir", directory], Path(info["repoRoot"]), dry_run) if quote.status == "failed": return quote if dry_run or not _.get("yes", False): return Result("planned", "HOL quote is ready; user confirmation is required before publish", {"quote": quote.message}) return run(["npx", "--yes", "@hol-org/registry", "skills", "publish", "--dir", directory], Path(info["repoRoot"])) ``` ### Technical Analysis The HOL adapter invokes `npx --yes @hol-org/registry` without specifying an exact package version or verifying package integrity. When the package is not already available locally, `npx` can resolve and download the currently published registry version before executing it. The effective executable code may therefore change after this Skill has been reviewed. The `--yes` option suppresses npm's installation prompt, further reducing the opportunity to inspect the package version before execution. The nominally non-publishing `quote` operation also executes the package. Consequently, package code runs before the later publication confirmation check, even when the user has not yet approved the final `publish` operation. ### Attack Path 1. An attacker compromises the npm package, its maintainer account, or the relevant package distribution channel. 2. The attacker publishes a malicious version under the existing `@hol-org/registry` package name. 3. A user enables the HOL platform and runs a non-dry-run synchronization. 4. The adapter executes `npx --yes @hol-org/regis ...[truncated 1060 chars]- Remediation
View remediation
