Back to skill

Security audit

Opencode Acp Control

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its stated OpenCode-control purpose, but its update guidance includes unsafe remote installer execution and overbroad process-killing instructions.

Review this skill before installing if you want strict control over local processes or software updates. Only use the session-resume flow when you are comfortable exposing prior OpenCode conversation history to the current agent context, and do not run the suggested `curl | bash` update command unless you independently trust and verify the installer source.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

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.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

External Script Fetching

High
Category
Supply Chain
Content
If version still doesn't match latest:
- Inform user: "OpenCode auto-update may have failed. Current: X.X.X, Latest: Y.Y.Y"
- Suggest manual update: `curl -fsSL https://opencode.dev/install | bash`

### Update Workflow Summary
Confidence
99% confidence
Finding
The skill suggests executing a remote install script via `curl ... | bash`, which directly pipes unverified network content into a shell. If the remote server, CDN, TLS trust chain, or delivery path is compromised, this becomes immediate arbitrary code execution on the host with the privileges of the running user.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The resume workflow loads and replays full prior session history to the current agent after only selecting from a list of session IDs, without any warning that historical prompts and outputs may contain sensitive data. In multi-user, shared-project, or mixed-context environments, this can expose prior conversation contents, secrets, file paths, or instructions to an unintended user or task context.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The update workflow instructs enumerating processes and killing any process whose command includes "opencode," which is a host-level action broader than managing the ACP session started by the skill. This can terminate unrelated user workloads, interfere with other projects or users, and creates an unsafe pattern where a convenience update routine gains destructive process-control authority over the system.

Context-Inappropriate Capability

Low
Confidence
82% confidence
Finding
The manifest describes a skill for controlling OpenCode through ACP operations such as starting sessions, sending prompts, resuming conversations, and managing updates. While checking for updates is mentioned, introducing a generic `webfetch` capability to arbitrary release URLs expands the skill beyond direct ACP/process control into external network access, which is a distinct capability.

Static analysis

No suspicious patterns detected.