T08 · Insecure Dependencies
- Location
SKILL.md:25- Finding
Unpinned Package Download and Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:25,SKILL.md:42-45, andscripts/weibo-hot-search.ts:330-340
Vulnerability Type: Unpinned third-party package execution
Risk Level: MediumThe Skill instructs the agent to use the following fallback when a locally installed Bun runtime is unavailable:
bash npx -y bunThe same unpinned invocation is presented in the command-line usage text:
bash npx -y bun weibo-hot-search.ts [options]Technical Analysis
The
npx -y buncommand automatically resolves, downloads, and executes the npm package currently published under the namebun. No exact package version, lockfile, package integrity value, or trusted artifact source is specified.The
-yoption suppresses the normal installation confirmation. Consequently, following the documented fallback can execute package lifecycle code and package entry points without additional user review. The effective code executed by the Skill can therefore change after the Skill itself has been audited.This creates a supply-chain trust boundary outside the reviewed repository. If the resolved package, its dependencies, the registry account, or the registry response is compromised, malicious code can execute under the identity of the user or agent running the Skill.
Attack Path
- Bun is not installed as a trusted local executable.
- The agent follows the documented runtime-selection instructions.
- The agent invokes
npx -y bunwithout an exact version. - npm resolves and downloads the package and its dependency graph from the configured registry.
- A compromised or unexpectedly modified package executes with the permissions of the agent process.
- The package can access files, environment variables, network resources, and subprocess capabilities available to that process before running the intended script.
Impact Assessment
Successful exploitation provides arbitrary code exe ...[truncated 569 chars]
- Remediation
View remediation
Remediation Suggestions
- Require a trusted, preinstalled Bun executable rather than downloading it during Skill execution.
- If
npxsupport is necessary, pin an audited exact version, for example:bash npx --yes bun@EXACT_AUDITED_VERSION - Commit and enforce dependency lock and integrity metadata where the runtime environment supports it.
- Verify downloaded artifacts against an independently maintained checksum or trusted signature.
- Avoid suppressing installation confirmation in agent-operated environments.
- Document the expected package publisher, version, checksum, and update-review process.
- Prefer a controlled installation step performed before Skill invocation, with runtime execution configured to prohibit network-based package resolution.
