T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:26
- Finding
- Unverified Remote Installer Executed Through curl-to-shell Instructions## Vulnerability Details **File Location**: `SKILL.md:23-29`, with the same unsafe installation pattern repeated in `scripts/doctor.sh:23-28`, `scripts/doctor.sh:36-41`, and `scripts/run-ulw.sh:46-50` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code `SKILL.md:23-29`: ```bash 1. **OpenCode** installed and configured (`opencode --version` should be 1.0.150+) ```bash curl -fsSL https://opencode.ai/install | bash # or: npm install -g opencode-ai # or: bun install -g opencode-ai ``` ``` `scripts/doctor.sh:23-28`: ```bash else fail "OpenCode is not installed" echo " Install: curl -fsSL https://opencode.ai/install | bash" echo " Or: npm install -g opencode-ai" exit 1 fi ``` `scripts/doctor.sh:36-41`: ```bash elif command -v npx &>/dev/null; then warn "bunx not found, npx available (bunx is recommended)" else fail "Neither bunx nor npx found" echo " Install Bun: curl -fsSL https://bun.sh/install | bash" fi ``` `scripts/run-ulw.sh:46-50`: ```bash if ! command -v opencode &>/dev/null; then echo "Error: opencode is not installed" echo "Install: curl -fsSL https://opencode.ai/install | bash" exit 1 fi ``` ### Technical Analysis The primary prerequisite instructions tell the user or executing Agent to download an installer from a mutable external URL and pipe the response directly into Bash. This combines retrieval and execution without an opportunity to inspect the content and without validating a cryptographic signature, checksum, immutable release version, or expected file identity. Although the shell scripts only print this command rather than executing it themselves, installation instructions are operational Skill behavior: an Agent using the Skill may present or follow them. The effective code executed by the user can therefore change after this Skil ...[truncated 1712 chars]
- Remediation
- ## Remediation Suggestions 1. Remove all `curl ... | bash` recommendations from the Skill and scripts. 2. Pin installation instructions to an immutable, audited release version rather than a mutable installer endpoint. 3. Download the artifact to a local file before execution: ```bash curl --fail --show-error --location \ --output opencode-installer.sh \ https://trusted.example/releases/vX.Y.Z/install.sh ``` 4. Publish and verify a SHA-256 or stronger digest obtained through an independently protected release channel: ```bash echo "EXPECTED_SHA256 opencode-installer.sh" | sha256sum --check - ``` 5. Prefer signed release artifacts and verify the signature against a pinned maintainer key. 6. Allow the user to inspect the downloaded script before execution. 7. Require explicit confirmation before executing any downloaded code. 8. Document that installers must not be run as root unless system-wide installation is strictly necessary. 9. Update `doctor.sh` and `run-ulw.sh` to link to verified manual installation documentation instead of printing executable curl-to-shell commands.
