T08 · Insecure Dependencies
- Location
scripts/weibo-utils.ts:117- Finding
Unpinned 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 ``` ### Technical Analysis The helper invokes `npx -y bun` without specifying an exact package version or enforcing a lockfile and integrity hash. The `-y` option suppresses confirmation, allowing `npx` to resolve, download, and execute the package automatically. Consequently, the effective executable is not completely fixed to the code that was audited. Its behavior can change according to the configured package registry, package ownership, package version resolution, local npm configuration, or a future compromised package release. This path is used by the clipboard helpers during ordinary article composition, so the exposure is not limited to an optional development command. ### Attack Path 1. A user asks the Skill to compose a Weibo article containing HTML or images. 2. The article workflow calls `copyHtmlToClipboard`, `copyImageToClipboard`, or `pasteFromClipboard`. 3. These functions call `runBunScript`. 4. `runBunScript` executes `npx -y bun` without an exact version or integrity requirement. 5. If package resolution or the configured registry has been compromised, `npx` downloads and executes atta ...[truncated 790 chars]- Remediation
View remediation
