T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:30
- Finding
- Unverified Remote Installation Script Executed Directly by Bash## Vulnerability Details **File Location**: `SKILL.md:30` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High **Complete Code Snippet**: ```bash curl -sSL https://raw.githubusercontent.com/EdisonChenAI/protea/main/setup.sh | bash cd protea && .venv/bin/python run.py ``` ### Technical Analysis The documented installation procedure downloads `setup.sh` from the mutable `main` branch of a personal GitHub repository and pipes its response directly into Bash. The project contains no local copy of that script, pinned commit identifier, cryptographic checksum, or signature. Consequently, the effective code executed by users can change after this Skill has been audited. Direct piping also prevents a normal review step before execution. HTTPS protects transport under ordinary conditions, but it does not establish that the repository owner, account, branch, or current script content is trustworthy. The declared Python application may legitimately require installation, but arbitrary unverified shell execution is not the minimum capability necessary to provide it. ### Attack Path 1. An attacker controls or compromises the referenced repository, GitHub account, or mutable `main` branch. 2. The attacker modifies `setup.sh` to contain malicious shell commands. 3. A user follows the Quick Start instructions. 4. `curl` retrieves the current attacker-controlled response. 5. The shell executes that response immediately with the privileges of the invoking user. 6. The payload may access user-readable data, API credentials, and network resources, modify files, or retrieve and execute additional payloads. ### Impact Assessment Successful exploitation provides arbitrary command execution with the invoking user's privileges. This can expose files and credentials available to that account—including LLM API keys configured for the declared application—and permit modification of user-owned files or ins ...[truncated 332 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the `curl | bash` installation flow. 2. Include the installer in the reviewed project so its complete behavior is available during audit. 3. If remote distribution is unavoidable, reference an immutable, reviewed release artifact or commit rather than a mutable branch. 4. Publish and verify a cryptographic signature or an independently distributed SHA-256 digest before execution. 5. Download the installer to a local file, fail on HTTP errors, verify it, and allow inspection before running it. For example: ```bash curl --fail --show-error --location \ --output setup.sh \ "https://raw.githubusercontent.com/EdisonChenAI/protea/<immutable-commit>/setup.sh" printf '%s %s\n' '<reviewed-sha256>' setup.sh | sha256sum --check - less setup.sh bash setup.sh ``` 6. Document all files, dependencies, network operations, and configuration changes performed by the installer. 7. Ensure installation runs without root privileges and request explicit approval for any operation outside the application directory. 8. Avoid placing credentials in installer arguments, logs, or shell history, and restrict credential-file permissions.
