T08 · Insecure Dependencies
- Location
references/codex-imagegen.md:41- Finding
Unpinned Package Download and Execution Through npx
- Content
View full analysis
/main.ts ...` works as a fallback. ``` ### Technical Analysis The fallback instructs the Agent to use `npx -y` to retrieve and execute the registry-resolved `bun` package. No package version, integrity hash, trusted registry, or lockfile is specified. The `-y` option also suppresses the normal installation confirmation. This creates a supply-chain execution boundary: the code executed during an audited Skill run is not fully represented by the reviewed project and can change after the audit. A compromised package release, registry account, dependency, DNS/proxy path, or registry configuration could cause arbitrary third-party code to execute. The issue applies only when the Codex wrapper fallback is selected and Bun is not already installed. ### Attack Path 1. An attacker compromises or replaces the registry-resolved `bun` package, one of its installation components, or the configured npm registry. 2. A user requests infographic generation in a runtime without a native image-generation tool. 3. The Skill selects the `codex-imagegen` wrapper path. 4. The preferred `baoyu-image-gen` path is unavailable, so the direct wrapper fallback is used. 5. The runtime does not have a trusted Bun executable installed. 6. Following the documented fallback, the Agent runs `npx -y bun /main.ts ...`. 7. `npx` downloads and executes registry-supplied code without interactive approval. 8. The supplied code runs with the privileges, environment, filesystem access, and network access of the Agent process. ### Impact Assessment Successful exploitation permits arbitrary code execution under the Agent user's account. Depending on the surrounding runtime permissions, the malicious dependency could: - Read or modify files accessible to the ...[truncated 464 chars]- Remediation
View remediation
