T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:284
- Finding
- Unverified Remote Installer Executed Through curl-to-shell Pipeline## Vulnerability Details **File Location**: `SKILL.md`, line 284 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High **Vulnerable Code Snippet**: ```markdown - Suggest manual update: `curl -fsSL https://opencode.dev/install | bash` ``` ### Technical Analysis The documented fallback update command retrieves a mutable script from an external URL and passes it directly to Bash. The payload is executed without being saved for inspection and without validating a pinned version, cryptographic signature, or expected checksum. Consequently, the code that ultimately executes is not contained in the reviewed Skill package and may change after publication or audit. HTTPS protects the connection in transit under normal conditions, but it does not protect users if the distribution site, hosting infrastructure, DNS resolution, certificate issuance process, or upstream release process is compromised. It also does not ensure that a later script revision remains trustworthy. Although the command is presented as a manual recommendation rather than being invoked automatically, it establishes an explicit execution path that a user or an Agent following the Skill may run. Installing or updating OpenCode is ancillary to the Skill's core ACP session-control functionality. Directly executing an unverified remote script therefore exceeds the minimum behavior necessary for that core functionality. ### Attack Path 1. OpenCode's automatic update fails or leaves the installed version different from the latest reported release. 2. The Skill recommends running the documented manual update command. 3. A user or Agent executes `curl -fsSL https://opencode.dev/install | bash`. 4. `curl` obtains the installation script currently served by the remote endpoint. 5. Bash immediately interprets the response without local inspection or integrity verification. 6. If the endpoint or its delivery chain has been compromised, attack ...[truncated 794 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the direct `curl | bash` pipeline from the Skill instructions. 2. Prefer the platform's official package manager or another installation mechanism that provides provenance and integrity verification. 3. If a standalone artifact is required, identify an explicit release version rather than using a mutable installer endpoint. 4. Download the artifact to a non-executable file without running it automatically. 5. Verify a publisher signature using a trusted, independently distributed public key and validate a pinned SHA-256 checksum before installation. 6. Reject the artifact if its version, signature, digest, origin, or expected file type does not match. 7. Permit inspection of the downloaded content before execution. 8. Require explicit user confirmation before replacing binaries or modifying installation directories. 9. Perform installation with ordinary user privileges wherever possible and clearly document any required filesystem changes. 10. If integrity verification cannot be provided, direct users to official installation documentation instead of emitting an executable shell command.
