T03 · Remote Payload Retrieval and Execution
Error
- Location
- scripts/init-project.sh:15
- Finding
- Unverified Remote Installer Executed Through a Shell Pipeline## Vulnerability Details **File Location**: `scripts/init-project.sh`, line 15 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ```bash command -v uv >/dev/null 2>&1 || { echo "❌ uv not installed. Run: curl -LsSf https://astral.sh/uv/install.sh | sh"; exit 1; } ``` ### Technical Analysis When `uv` is unavailable, the script instructs the user to download a live installer from `https://astral.sh/uv/install.sh` and pipe it directly into `sh`. The project does not pin an installer version or immutable artifact, validate a cryptographic checksum or signature, or provide an opportunity to inspect the downloaded script before execution. The command is printed as installation guidance rather than executed automatically. Nevertheless, following the documented instruction creates a remote code-execution channel whose effective payload can change after this Skill has been audited. Although the named domain is associated with the expected tool vendor, domain reputation alone does not provide artifact integrity or immutability. This behavior is not necessary to initialize the project. The script can safely fail with ordinary installation documentation, or direct users to a package manager or a separately downloaded and cryptographically verified release artifact. ### Attack Path 1. A user invokes `scripts/init-project.sh` on a system where `uv` is not installed. 2. The script prints the `curl ... | sh` installation command and exits. 3. The user follows that instruction. 4. `curl` retrieves the installer currently served by the external endpoint. 5. `sh` executes the response immediately without local inspection or integrity verification. 6. If the publication infrastructure, endpoint, DNS/TLS path, or installer content is compromised, attacker-controlled commands execute with the invoking user's permissions. ### Impact Assessment A malicious remote response could execute arbitrary commands wi ...[truncated 394 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the direct network-to-shell recommendation. 2. Prefer installation through a trusted operating-system package manager with explicit package and version guidance. 3. If an upstream release artifact must be used, pin a specific version and immutable release URL. 4. Download the artifact to a local file instead of piping it directly into a shell. 5. Verify the artifact using a vendor-published cryptographic signature or pinned SHA-256 checksum before execution. 6. Present the downloaded script for inspection and execute it only after successful verification and explicit user consent. 7. Clearly state that elevated privileges are unnecessary unless a particular, documented installation method explicitly requires them.
