T08 · Insecure Dependencies
- Location
SKILL.md:32- Finding
Unpinned Bun Package Download and Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 32–35
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumComplete Code Snippet:
text **Agent Execution Instructions**: 1. Determine this SKILL.md file's directory path as `{baseDir}` 2. Script path = `{baseDir}/scripts/<script-name>.ts` 3. Resolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bunTechnical Analysis
The fallback command
npx -y bunresolves, downloads, and executes thebunpackage without pinning an audited version or verifying package integrity. The-yoption suppresses the normal installation confirmation, allowing externally supplied package code to execute automatically.Because package resolution occurs at runtime, the effective executable can change after this skill has been reviewed. A compromised package release, maintainer account, registry, transitive dependency, or package-resolution configuration could therefore introduce arbitrary code. This is an insecure dependency and supply-chain execution pattern.
The reviewed project contains only
SKILL.md. The referencedscripts/andreferences/files are absent, so their implementations could not be examined.Attack Path
- The host does not have a trusted local
bunexecutable but does havenpx. - The agent follows the runtime-resolution instruction in
SKILL.md. - The agent invokes
npx -y bun, causing npm infrastructure to resolve an unpinned package version. - A compromised or malicious package artifact is downloaded without an interactive approval step.
- Package-controlled code executes with the permissions and environment inherited from the agent process.
- The malicious code can access or alter resources available to that process.
Impact Assessment
Successful exploitation would provide arbitrary code execution under the operating-system iden ...[truncated 666 chars]
- The host does not have a trusted local
- Remediation
View remediation
Remediation Suggestions
- Remove the automatic
npx -y bunfallback and require a trusted, locally installed Bun executable. - If runtime retrieval is unavoidable, pin Bun to a specifically reviewed version rather than resolving the latest available package.
- Verify the downloaded artifact using a trusted checksum, signature, or lockfile integrity value before execution.
- Do not suppress dependency-installation confirmation. Obtain explicit user approval before downloading or executing packages.
- Use a trusted registry configured with appropriate integrity controls and dependency allowlisting.
- Run merge operations in a sandbox with minimal filesystem, environment-variable, and network access.
- Document the expected package name, exact version, source, and integrity value so future audits can reproduce the dependency set.
- Remove the automatic
