T08 · Insecure Dependencies
- Location
SKILL.md:26- Finding
Unpinned Remote Runtime Package Is Automatically Downloaded and Executed
- Content
View full analysis
.ts` 3. Replace all `{baseDir}` in this document with the actual path 4. Resolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun ``` ```bash ${BUN_X} {baseDir}/scripts/check-permissions.ts ``` ### Technical Analysis When Bun is unavailable, the instructions direct the agent to run `npx -y bun`. No package version or integrity digest is specified. Consequently, `npx` may retrieve the currently published `bun` package and execute its package entry point with the permissions of the invoking user. The effective runtime payload can therefore change after the Skill has been reviewed. The local lockfile does not mitigate this behavior because it only locks the vendored `baoyu-chrome-cdp` dependency and does not pin the package selected by the standalone `npx -y bun` command. This is an unsafe supply-chain execution path. Exploitation depends on compromise or malicious control of the resolved registry package, registry configuration, network resolution, or package source. ### Attack Path 1. Bun is not installed, but `npx` is available. 2. The agent follows the Skill instruction and resolves `${BUN_X}` to `npx -y bun`. 3. `npx` queries the configured package registry for the unpinned `bun` package. 4. A compromised package, registry, mirror, or resolution path supplies attacker-controlled code. 5. `npx` downloads and executes that code without an interactive installation confirmation because of `-y`. 6. The payload runs with the same filesystem, network, environment-variable, and process privileges as the agent. ### Impact Assessment Successful exploi ...[truncated 401 chars]- Remediation
View remediation
