T08 · Insecure Dependencies
- Location
SKILL.md:45- Finding
Unpinned Dependency Download and Execution Through npx
- Content
View full analysis
-o /tmp/wechat-article.md --timeout 60000 ``` ### Technical Analysis The workflow directs the agent to invoke `bun` through `npx -y` without specifying an exact package version or verifying package integrity. If the package is unavailable locally, `npx` can automatically download it from the configured npm registry and immediately execute it. The `-y` option suppresses the normal installation confirmation. Consequently, the code executed during a skill run is not fully represented by the audited artifact and can change after review. Security depends on the npm registry, package ownership, local npm configuration, and whichever package version resolves at execution time. A compromised package release, registry account, package source, or dependency-resolution configuration could result in arbitrary code executing with the same operating-system permissions and environment access as the agent. ### Attack Path 1. A user supplies a qualifying WeChat article URL and triggers the documented workflow. 2. The agent executes the documented `npx -y bun ...` command. 3. `npx` resolves an unpinned version of the `bun` package through the configured registry. 4. If it is not cached locally, the package is downloaded without interactive approval. 5. Package-controlled code executes under the agent's account. 6. A malicious package version could access files, environment variables, credentials, network resources, or tools available to that account. Exploitation requires compromise or manipulation of the resolved package, registry, or dependency-resolution environment. ### Impact Assessment Successful exploitation provides arbitrary code execution with the privileges of the process running the skill. The affected scope may include: - Reading or mo ...[truncated 431 chars]- Remediation
View remediation
