T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:27
- Finding
- Unverified Remote Installation Script Executed Directly by Bash## Vulnerability Details **File Location**: `SKILL.md`, lines 27–28 **Vulnerability Type**: Remote mutable payload retrieval and execution **Risk Level**: Critical ```bash curl -fsSL https://raw.githubusercontent.com/PeonPing/peon-ping/main/install.sh | bash peon-ping-setup ``` ### Technical Analysis The fallback installation workflow retrieves `install.sh` from the mutable `main` branch of an external GitHub repository and pipes the response directly into Bash. The downloaded content is neither saved for inspection nor authenticated through a cryptographic signature or checksum. It is also not pinned to an immutable commit or versioned release. Consequently, the code executed at installation time can differ from the content reviewed during this audit. Using an official project URL does not eliminate the risk of repository compromise, maintainer-account takeover, malicious upstream changes, DNS or platform compromise, or an unintended modification to the installation script. Directly piping the response into Bash also prevents meaningful review between retrieval and execution. Depending on the behavior of the remote script, subsequent network or execution failures may leave the system partially modified. This behavior exceeds the minimum privileges necessary to configure completion sounds. A pinned and verified package or release artifact can provide the declared functionality without granting a mutable remote script immediate command execution under the Agent user's account. ### Attack Path 1. A user asks the Agent to install or configure completion sounds. 2. The Agent loads this Skill and follows its prescribed installation workflow. 3. Homebrew is unavailable, causing the fallback path to be selected. 4. An attacker compromises the upstream repository or maintainer account, or otherwise causes malicious content to be served from the referenced mutable `main/install.sh` URL. 5. `curl` retrieves the attacker-controlled script. 6. The shell pipe pass ...[truncated 902 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the `curl | bash` execution pattern. 2. Prefer a version-pinned package-manager installation or a signed, versioned release artifact. 3. Pin downloads to an immutable release or commit rather than the mutable `main` branch. 4. Download the installer to a local file without executing it immediately. 5. Verify the artifact using a cryptographic signature or a SHA-256 checksum obtained through a trusted, independently authenticated channel. 6. Inspect or present the installer and its intended system changes before execution. 7. Require explicit user approval after download and verification but before running the installer. 8. Execute using ordinary user permissions unless a specific installation step demonstrably requires elevation. 9. Document files, services, permissions, and network resources modified by installation, and provide an uninstall or rollback procedure. 10. Fail closed when verification cannot be completed; do not silently fall back to an unverified installer. A safer conceptual workflow is: ```bash curl -fL -o install.sh "https://raw.githubusercontent.com/PeonPing/peon-ping/<IMMUTABLE_COMMIT>/install.sh" printf '%s %s\n' '<TRUSTED_SHA256>' 'install.sh' | shasum -a 256 -c - less install.sh bash install.sh ``` The immutable reference and checksum must be replaced with values published and authenticated by the upstream project. Execution should occur only after successful verification and explicit user approval.
