T08 · Insecure Dependencies
- Location
SKILL.md:89- Finding
Unpinned Package Download and Execution via npx
- Content
View full analysis
npx -y bun scripts/wechat-api.ts <文章md文件> \ --theme default \ --cover <封面图绝对路径> \ --author "<作者名称>" ``` ### Technical Analysis The publishing workflow instructs the agent to execute `npx -y bun` without specifying an exact package version, lockfile, integrity hash, or trusted local installation. If the package is unavailable locally, `npx` can retrieve it from the configured package registry and immediately execute it. The `-y` option suppresses the interactive installation confirmation. Consequently, the code executed during a future invocation is not necessarily the code that was available when this Skill was reviewed. A compromised package release, registry account, package source, or package-resolution configuration could introduce arbitrary executable behavior. The other external tools named by the Skill are not included in the audited project, so their implementations and dependency controls could not be verified. ### Attack Path 1. An attacker compromises the resolved `bun` package, its publishing account, its distribution channel, or the package registry configuration used by the environment. 2. The attacker publishes or redirects resolution to a malicious package version. 3. The agent follows the documented publishing workflow and runs `npx -y bun` without a version constraint. 4. `npx` retrieves the currently resolved package and executes it without an installation prompt. 5. The malicious package runs with the permissions and environment of the agent process. 6. It may read accessible workspace data, environment variables, authentication material, article content, or publishing credentials and may alter the content being published. ### Impact Assessment Successful exploitation permits arbitrary code execution under the op ...[truncated 506 chars]- Remediation
View remediation
