T03 · Remote Payload Retrieval and Execution
Error
- Location
- README.md:20
- Finding
- Execution of Unpinned Remote Repository Code## Vulnerability Details **File Location**: `README.md`, lines 20-22 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High **Vulnerable Code:** ```bash git clone https://github.com/kimi-claw/skill-auto-doc-ai.git cd skill-auto-doc-ai ./bin/generate-docs --help ``` ### Technical Analysis The documented installation procedure clones the default branch of an external Git repository without pinning an immutable commit hash or verified release. It then instructs the user to execute `bin/generate-docs` from the downloaded repository. Because the upstream default branch is mutable, the executed script can change after this artifact has been reviewed. The referenced executable is not present in the audited project, which contains only `README.md` and `SKILL.md`; consequently, its behavior and integrity cannot be verified from the supplied artifact. Even invoking a script with `--help` executes its top-level code and does not provide a security boundary. ### Attack Path 1. An attacker compromises the upstream repository, a maintainer account, or the repository's distribution process. 2. The attacker modifies the default branch or replaces `bin/generate-docs` with a malicious payload. 3. A user follows the installation instructions and clones the mutable repository state. 4. The user runs `./bin/generate-docs --help`. 5. The malicious script executes with the privileges and environment of that user. ### Impact Assessment Successful exploitation permits arbitrary code execution under the account that follows the documented instructions. Depending on that account's privileges and accessible environment, the payload could read or alter user files, access environment variables and credentials, modify source repositories, invoke network services, or install additional software. Administrator-level impact is possible if the instructions are executed by a privileged user, although privilege escalation ...[truncated 255 chars]
- Remediation
- ## Remediation Suggestions - Include `bin/generate-docs` and all required implementation files in the reviewed and distributed skill package. - If external retrieval is necessary, pin the source to a specific immutable commit hash rather than cloning and executing the current default branch. - Publish releases with cryptographic signatures and checksums, and require verification before execution. - Use a trusted package registry with locked dependency versions and integrity metadata. - Document the exact expected commit and checksum so users can independently verify downloaded content. - Review the complete executable payload and its transitive dependencies before recommending execution. - Run the tool with least privilege in an isolated environment, without unnecessary credentials or sensitive environment variables.
