T08 · Insecure Dependencies
- Location
SKILL.md:34- Finding
Unpinned Package Download and Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 34
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.The resolved command is subsequently used at line 289:
bash ${BUN_X} {baseDir}/scripts/main.ts {output-file-path} [options]Technical Analysis
The Skill directs the Agent to use
npx -y bunwhen Bun is not already installed. This command automatically resolves a package from the configured npm registry, downloads it, and executes it without interactive confirmation.No exact package version or integrity digest is specified. Consequently, the code executed at runtime is not fixed to the artifact that was audited and may change independently after review. This creates an insecure software supply-chain boundary: compromise of the package, registry account, registry configuration, or dependency resolution process could cause attacker-controlled code to run.
The repository contains only
SKILL.md; the referenced local scripts are absent. That packaging defect does not itself prove malicious behavior, but it prevents verification of the intended typography implementation and may cause the command to fail after the runtime package has already been downloaded or invoked.Attack Path
- A user invokes the Skill's formatting workflow on a system where
bunis not installed butnpxis available. - Following line 34, the Agent resolves
${BUN_X}tonpx -y bun. - During the typography stage described at line 289,
npxcontacts the configured npm registry and resolves the current, unpinnedbunpackage. - The package and its dependency graph are downloaded without an interactive approval prompt.
- Pack ...[truncated 939 chars]
- A user invokes the Skill's formatting workflow on a system where
- Remediation
View remediation
Remediation Suggestions
- Remove the automatic
npx -y bunfallback and require a trusted, preinstalled Bun runtime. - If runtime installation is necessary, pin Bun to an explicitly reviewed version rather than resolving the latest package.
- Verify downloaded artifacts using a trusted checksum, signature, or lockfile with integrity metadata.
- Use a trusted registry and fail closed if the required version or integrity verification is unavailable.
- Require explicit user approval before downloading or executing any third-party runtime.
- Execute the formatter with least privilege in a restricted environment that limits filesystem, credential, and network access.
- Include the referenced
scripts/main.tsand related files in the package so their behavior can be audited. - Add automated release checks that reject missing referenced files and unpinned executable dependencies.
- Remove the automatic
