T08 · Insecure Dependencies
- Location
SKILL.md:149- Finding
Unpinned Bun Package Download and Execution Through npx
- 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 ``` From `references/codex-imagegen.md:41`: ```markdown If `bun` is missing, `npx -y bun /main.ts ...` works as a fallback. ``` ### Technical Analysis The Skill instructs the Agent to use `npx -y bun` when a locally installed Bun executable is unavailable. This command retrieves and executes the version of the `bun` package currently resolved by the configured npm registry. No package version, lockfile, integrity hash, registry restriction, or provenance verification is specified. The `-y` option suppresses the normal installation confirmation, so remotely retrieved package code may execute automatically during ordinary image-generation or PDF-merging operations. The effective code can change after this Skill has been reviewed. This creates a supply-chain boundary in which the safety of local execution depends on the npm registry, package ownership, registry configuration, DNS and network integrity, and the absence of dependency substitution or account compromise. ### Attack Path 1. The user requests comic generation or PDF merging. 2. The runtime does not have a trusted `bun` executable installed. 3. The Agent follows the documented fallback and invokes `npx -y bun`. 4. npm resolves the unpinned package using the runtime's configured registry. 5. A compromised, substituted, or unexpectedly modified package version is downloaded. 6. Package-controlled code execut ...[truncated 1059 chars]- Remediation
View remediation
