T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:197
- Finding
- Skill instructions execute a mutable remote installer without prior verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:197-203` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/destructive_command_guard/master/install.sh?$(date +%s)" | bash # Easy mode: auto-update PATH curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/destructive_command_guard/master/install.sh?$(date +%s)" | bash -s -- --easy-mode # System-wide (requires sudo) curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/destructive_command_guard/master/install.sh?$(date +%s)" | sudo bash -s -- --system ``` Equivalent installation instructions also appear in `README.md` and `docs/scan-precommit-guide.md`. ### Technical Analysis The recommended installation procedure streams a script from the mutable `master` branch directly into Bash. The script is not downloaded for inspection, pinned to an immutable commit, or authenticated using a locally trusted signature before execution. The timestamp query parameter deliberately bypasses intermediary caches, ensuring that the newest remote branch content is executed. Consequently, the effective payload can change after the Skill has been reviewed. The system-wide variant is especially dangerous because the remote script is passed to `sudo bash`, giving the downloaded payload root privileges. HTTPS protects transport under ordinary conditions but does not protect against repository-account compromise, malicious upstream changes, or compromised release infrastructure. ### Attack Path 1. An attacker compromises the upstream GitHub account, repository, branch protection, or a maintainer credential. 2. The attacker modifies `master/install.sh` to include a malicious payload. 3. A user follows the installation instructions in `SKILL.md`. 4. `curl` retrieves the attacker-controlled branch-head script. 5. The script is immediately interpreted by Bash without l ...[truncated 662 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all recommendations that pipe network responses directly into a shell. 2. Publish installers and binaries under immutable, versioned release URLs rather than a mutable branch. 3. Use a staged installation procedure: ```bash curl -fL -o install.sh https://example.invalid/releases/vX.Y.Z/install.sh sha256sum -c install.sh.sha256 cosign verify-blob --bundle install.sh.sigstore.json install.sh less install.sh bash install.sh ``` 4. Pin the release version and expected digest in the Skill documentation. 5. Authenticate artifacts with Sigstore or a project signing key whose trust root is distributed independently of the downloaded artifact. 6. Do not recommend running a downloaded installer under `sudo`. The unprivileged installer should prepare the artifact, verify it, and request elevation only for the narrowly scoped final file installation. 7. Remove the cache-busting timestamp because it discourages reproducibility and does not provide a security benefit. ]]>
