T03 · Remote Payload Retrieval and Execution
Warning
- Location
- SKILL.md:23
- Finding
- Mutable Remote Repository Is Retrieved and Executed Without Verification## Vulnerability Details **File Location**: `SKILL.md`, lines 23–56 **Vulnerability Type**: `T03: Remote Payload Retrieval and Execution` **Risk Level**: Medium **Vulnerable Code Snippet**: ```sh git clone https://github.com/Shellishack/infinite-pokemon.git cd infinite-pokemon ``` ```text Read the cloned `README.md`, or `README.zh-CN.md` for Chinese instructions, and any applicable repository instructions before proceeding. Use its current setup requirements if they differ from the baseline below. ``` ```sh npm ci npm run build ``` ```sh npm run desktop ``` ```text If a desktop GUI is unavailable or the user prefers a browser, use `npm start` and open `http://127.0.0.1:8788`. ``` ### Technical Analysis The Skill instructs the Agent to clone the mutable default branch of an external GitHub repository and subsequently execute repository-controlled dependency, build, and launch commands. It does not pin the checkout to a reviewed commit or signed release and does not require verification of a commit hash, signature, or artifact digest. The `npm ci` command can execute dependency lifecycle scripts. The subsequent `npm run build`, `npm run desktop`, and `npm start` commands execute scripts selected by the downloaded repository's `package.json`. The additional instruction to follow repository documentation means remotely modified instructions can also influence the Agent's later actions. This is a supply-chain exposure rather than evidence that the currently referenced repository is malicious. However, the effective executable payload can change after the Skill itself has been reviewed. ### Attack Path 1. An attacker compromises the upstream repository, a maintainer account, or a dependency represented by its lockfile. 2. The attacker modifies repository instructions, package scripts, application code, or dependency lifecycle behavior on the default branch. 3. A user invokes the Skill after the mali ...[truncated 992 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the repository to a reviewed commit hash or cryptographically signed release rather than using the mutable default branch. 2. After cloning, explicitly check out the approved revision and verify that `git rev-parse HEAD` matches the documented hash. 3. Prefer signed tags or commits and fail closed if signature verification is unavailable or unsuccessful. 4. Review the pinned `package-lock.json`, `package.json` scripts, and dependency lifecycle scripts before execution. 5. Where compatible, initially install with `npm ci --ignore-scripts`, then run only explicitly reviewed scripts. 6. Do not automatically defer to newly downloaded instructions when they conflict with the reviewed Skill. Treat repository documentation as untrusted external content. 7. Run the downloaded application with least privilege and restrict access to unrelated secrets, sensitive directories, and network resources. 8. Document the approved repository URL, revision, and expected integrity value directly in the Skill.
