T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:41- Finding
Mutable Remote Package Is Downloaded and Executed Through npx
- Content
View full analysis
` - Local directory: `npx repomix@latest [directory]` - Choose output format (xml is default and recommended) - Decide if compression is needed (for repos >100k lines) 3. **Execute the repomix command** via shell ``` The same unsafe pattern is prescribed by the primary workflow: ```bash npx repomix@latest --remote --output /tmp/-analysis.xml ``` ```bash npx repomix@latest [directory] [options] ``` ### Technical Analysis The Skill repeatedly instructs the agent to invoke `npx repomix@latest`. If the package is not already available locally, `npx` can retrieve it from the configured npm registry and immediately execute its entry point. The `latest` tag is mutable and does not identify a reviewed, immutable package version. Consequently, the code executed at invocation time can differ from the code that existed when this Skill was audited. There is no exact version pin, lockfile, package integrity requirement, or independent verification step in the project. This creates a remote payload retrieval and execution channel through the npm supply chain. The issue does not prove that Repomix itself is malicious. The vulnerability is that the documented execution mechanism implicitly trusts future content associated with a mutable remote package tag. ### Attack Path 1. An attacker compromises the package publisher account, npm package, registry resolution path, or a future release associated with the `latest` tag. 2. A user asks the agent to analyze a repository using this Skill. 3. The agent follows the instructions and runs `npx re ...[truncated 1073 chars]- Remediation
View remediation
