T08 · Insecure Dependencies
- Location
SKILL.md:18- Finding
Unpinned Runtime Package Download and Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 18
Vulnerability Type: Unpinned third-party package execution
Risk Level: MediumVulnerable Code
markdown Scripts in `scripts/` subdirectory. `{baseDir}` = this SKILL.md's directory path. Resolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun. Replace `{baseDir}` and `${BUN_X}` with actual values.Technical Analysis
When Bun is not installed, the skill instructs the agent to run
npx -y bun. This command may download a package from the configured npm registry and execute it immediately without pinning an audited version or verifying an integrity hash. The-yoption suppresses the interactive confirmation that would otherwise warn the user about package installation.Consequently, the code executed by the skill can differ from the code originally reviewed. Exploitation would require compromise of the package publication channel, the registry, the relevant package-maintainer account, or the local npm registry configuration. A malicious registry configured in the execution environment could also supply attacker-controlled package content.
Attack Path
- Bun is not installed on the target system, but
npxis available. - The agent follows the skill instructions and resolves
${BUN_X}tonpx -y bun. npxresolves the unpinnedbunpackage through the environment's configured npm registry.- A compromised publication channel, malicious registry, or altered registry configuration supplies attacker-controlled package code.
npxdownloads and executes the package without asking for confirmation.- The package code runs with the permissions of the user or agent process.
Impact Assessment
Successful exploitation provides arbitrary code execution under the invoking user's privileges. The effective scope can include reading or modifying files accessible to ...[truncated 266 chars]
- Bun is not installed on the target system, but
- Remediation
View remediation
Remediation Suggestions
- Do not automatically download and execute a runtime through an unpinned
npxcommand. - Prefer a preinstalled Bun binary obtained through a trusted installation process.
- If package-based execution is unavoidable, pin an explicitly audited package version rather than resolving the latest available release.
- Use a lockfile and registry integrity metadata where supported.
- Validate the npm registry origin and prohibit project-controlled or untrusted registry overrides.
- Avoid
-yso that package installation remains visible and requires explicit user approval. - Document the expected Bun version and verify the executable or package checksum before use.
- Do not automatically download and execute a runtime through an unpinned
