T03 · Remote Payload Retrieval and Execution
Error
- Location
- scripts/script.sh:77
- Finding
- Unverified Remote Installer Piped Directly to Bash<![CDATA[ ## Vulnerability Details **File Location**: `scripts/script.sh:77` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```bash echo " curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash" ``` ### Technical Analysis When Helm is unavailable, the Skill prints an installation command that retrieves a shell script from the mutable `main` branch of Helm's GitHub repository and immediately pipes it into Bash. The command is presented as guidance rather than executed automatically by `script.sh`. Nevertheless, users or agents following the documented workflow would execute remote content without an inspection step, immutable version pin, checksum validation, or signature verification. The effective payload can therefore change after this Skill has been reviewed. Although the referenced repository is the official Helm repository, trust in the current upstream source does not eliminate the supply-chain risk. A compromised repository, maintainer account, branch, distribution path, or installer could turn this command into arbitrary code execution. This behavior exceeds the minimum privileges necessary to notify the user that Helm is required. Safer installation instructions can avoid granting mutable remote content immediate shell execution. ### Attack Path 1. The user invokes a Skill command on a system where Helm is not installed. 2. `_check_helm` detects the missing executable and displays the `curl | bash` installation command. 3. The user or an automated agent copies and executes the suggested command. 4. `curl` retrieves the current installer from the remote `main` branch. 5. Bash executes the downloaded response immediately, without integrity or authenticity verification. 6. If the upstream source or delivery path has been compromised, attacker-controlled commands execute with the privileges of the invoking user and may potentially trigger privileged installation op ...[truncated 625 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the direct `curl | bash` recommendation. 2. Prefer installation through an operating-system package manager or another trusted, auditable distribution channel. 3. If direct installation is necessary: - Pin the download to a specific Helm release rather than a mutable branch. - Download the artifact and checksum as separate files. - Verify the checksum and, where available, the publisher's cryptographic signature. - Abort installation if verification fails. - Execute or install the artifact only after successful verification. 4. Clearly separate download, verification, and execution into distinct commands so users can inspect the retrieved content. 5. Avoid recommending administrator privileges unless they are strictly required, and document the exact files and directories that installation will modify. 6. Link users to Helm's official installation documentation instead of embedding an unverified remote execution pipeline. ]]>
