T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:15
- Finding
- Remote Installer Executed Directly from a Mutable Branch<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 15 **Vulnerability Type**: Remote payload retrieval and immediate shell execution **Risk Level**: Critical ### Vulnerable Code ```json "command": "curl -fsSL https://raw.githubusercontent.com/jarvis4wang/watchclaw/main/install.sh | bash", ``` ### Technical Analysis The installation command retrieves shell code from the mutable `main` branch of a personal GitHub repository and pipes the response directly into Bash. The downloaded content is not pinned to an immutable commit and is not validated using a cryptographic signature or expected checksum. HTTPS protects the network transport but does not establish that the repository content is trustworthy or unchanged. The repository owner—or an attacker who compromises the account, repository, branch, or publishing workflow—can replace the installer after the Skill has been reviewed. The modified content would then execute without an opportunity for local inspection. This behavior is not necessary for the declared watchdog functionality. Installation can be implemented using files bundled with the audited Skill or immutable, integrity-verified release artifacts. ### Attack Path 1. An attacker gains control of the upstream repository, maintainer account, `main` branch, or release workflow. 2. The attacker modifies the remotely hosted `install.sh` to contain arbitrary shell commands. 3. A user or Agent installs the Skill using the declared installation command. 4. `curl` retrieves the attacker-controlled response. 5. The shell pipeline passes the response directly to Bash. 6. Bash executes the payload with all permissions and environmental access available to the installing user. ### Impact Assessment Successful exploitation provides arbitrary command execution in the installing user's context. Depending on that user's permissions and environment, the payload could: - Read, modify, or delete user-accessible files. - Access configuration f ...[truncated 541 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `curl | bash` installation command. 2. Bundle the installer and runtime scripts within the audited Skill package whenever possible. 3. If remote distribution is unavoidable: - Pin the URL to an immutable commit or versioned release. - Download the artifact to a temporary file without executing it. - Verify a maintained SHA-256 digest or, preferably, a cryptographic signature from a separately trusted channel. - Abort installation if verification fails. - Execute the verified local file only after successful validation. 4. Publish reproducible versioned releases and document the expected checksums. 5. Ensure the installer runs without elevated privileges and explicitly warn users not to invoke it through `sudo`. 6. Subject every bundled or downloaded runtime component to the same security review as the Skill metadata. ]]>
