Back to skill

Security audit

OpenCode HTTP API

Security checks for vulnerabilities and agentic risk

Overview

This skill appears intended for OpenCode integration, but it includes high-impact server and package-execution guidance that users should review before installing.

Install only if you intend to connect an agent to a trusted OpenCode server. Keep the server bound to 127.0.0.1 unless you add authentication, TLS or a private network, and firewall controls. Disable auto-start if you do not want the skill to launch OpenCode for you. Do not send secrets or confidential private-repo code through this workflow unless the configured OpenCode server and model provider are approved. Pin and review any MCP/plugin packages before enabling them.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
references/server.md:13
Finding

OpenCode API May Be Exposed to External Networks Without Authentication

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
references/mcp.md:9
Finding

Unpinned MCP Package Is Downloaded and Executed Automatically Through npx

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (80)

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The skill claims full support for multiple OpenCode subsystems while apparently exposing only limited API wrappers and some undocumented local execution behavior. Overstated capability combined with incomplete disclosure is dangerous because it obscures the true trust boundary between the local host, authenticated developer tools, and the remote OpenCode service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The skill claims full support for multiple OpenCode subsystems while apparently exposing only limited API wrappers and some undocumented local execution behavior. Overstated capability combined with incomplete disclosure is dangerous because it obscures the true trust boundary between the local host, authenticated developer tools, and the remote OpenCode service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The skill claims full support for multiple OpenCode subsystems while apparently exposing only limited API wrappers and some undocumented local execution behavior. Overstated capability combined with incomplete disclosure is dangerous because it obscures the true trust boundary between the local host, authenticated developer tools, and the remote OpenCode service.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/permissions.md (reported line 89)May include surrounding context.

md
if (input.tool === "bash" && output.args.command?.includes("rm -rf")) {
        throw new Error("已阻擋危險的 rm -rf 命令")
      }
      if (input.tool === "read" && output.args.filePath?.includes(".env")) {
        throw new Error("不允許讀取 .env 檔案")
      }
    },

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/plugins.md (reported line 24)May include surrounding context.

md
if (input.tool === "bash" && output.args.command?.includes("rm -rf")) {
        throw new Error("已阻擋危險的 rm -rf 命令")
      }
      if (input.tool === "read" && output.args.filePath?.includes(".env")) {
        throw new Error("不允許讀取 .env 檔案")
      }
    },

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/plugins.md (reported line 183)May include surrounding context.

md
export default async (ctx) => {
  return {
    "tool.execute.before": async (input, output) => {
      const dangerous = ["rm -rf", "git push --force", "DROP TABLE"]
      for (const cmd of dangerous) {
        if (output.args.command?.includes(cmd)) {
          throw new Error(`已阻擋危險命令:${cmd}`)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/_index.md (reported line 45)May include surrounding context.

md
| `bash` | 執行 Shell 指令 | allow |
| `edit` | 精確字串替換修改檔案 | allow |
| `write` | 建立新檔案或覆寫 | allow |
| `read` | 讀取檔案內容(支援行範圍)| allow(.env 除外)|
| `grep` | 正規表示式搜尋內容 | allow |
| `glob` | 萬用字元查找檔案 | allow |
| `list` | 列出目錄內容 | allow |

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/plugins.md (reported line 25)May include surrounding context.

md
| `bash` | 執行 Shell 指令 | allow |
| `edit` | 精確字串替換修改檔案 | allow |
| `write` | 建立新檔案或覆寫 | allow |
| `read` | 讀取檔案內容(支援行範圍)| allow(.env 除外)|
| `grep` | 正規表示式搜尋內容 | allow |
| `glob` | 萬用字元查找檔案 | allow |
| `list` | 列出目錄內容 | allow |

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/tools.md (reported line 8)May include surrounding context.

md
| `bash` | 執行 Shell 指令 | allow |
| `edit` | 精確字串替換修改檔案 | allow |
| `write` | 建立新檔案或覆寫 | allow |
| `read` | 讀取檔案內容(支援行範圍)| allow(.env 除外)|
| `grep` | 正規表示式搜尋內容 | allow |
| `glob` | 萬用字元查找檔案 | allow |
| `list` | 列出目錄內容 | allow |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/opencode_client.py (reported line 204)May include surrounding context.

python
return self._get(f"/session/{session_id}")

    def delete_session(self, session_id: str) -> bool:
        """DELETE /session/{id} — 刪除工作階段"""
        return self._delete(f"/session/{session_id}")

    def send_message(

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises and demonstrates capabilities that imply file access, network access, MCP interaction, and shell/process execution, yet it declares no explicit tool scope or permission boundaries. In an agent environment this can lead to over-broad execution authority, making it harder for operators and users to understand or constrain what the skill may do.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explains HTTP API usage but does not warn that prompts, code, or review content may be transmitted to an external or separately hosted OpenCode server. In a code-review workflow this can expose proprietary source, credentials embedded in code, or sensitive business logic to systems outside the immediate runtime.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The PR review workflow references an authenticated GitHub environment and repository access but does not clearly warn that the skill may access repository data and interact with authenticated services. In practice, this can expand the blast radius from local code review into broader exposure of private repository contents or metadata.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The markdown example includes a system prompt instruction, "只分析不修改,用繁體中文回覆," which mandates a specific language/locale. Under the policy, forcing a language without user opt-in is a natural-language policy violation unless clearly justified or optional.

Content

No source excerpt is available for this finding.

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Content

Scanner excerpt · references/api-reference.md (reported line 18)May include surrounding context.

python
import requests
r = requests.get("http://127.0.0.1:4096/global/health")
print(r.json())  # {"healthy": true, "version": "1.x.x"}

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Content

Scanner excerpt · references/api-reference.md (reported line 117)May include surrounding context.

python
import requests
r = requests.get("http://127.0.0.1:4096/global/health")
print(r.json())  # {"healthy": true, "version": "1.x.x"}

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Content

Scanner excerpt · references/api-reference.md (reported line 121)May include surrounding context.

python
import requests
r = requests.get("http://127.0.0.1:4096/global/health")
print(r.json())  # {"healthy": true, "version": "1.x.x"}

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Content

Scanner excerpt · references/server.md (reported line 33)May include surrounding context.

python
import requests
r = requests.get("http://127.0.0.1:4096/global/health")
print(r.json())  # {"healthy": true, "version": "1.x.x"}

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/api-reference.md (reported line 27)May include surrounding context.

建立 Session

python
r = requests.post("http://127.0.0.1:4096/session", json={"title": "PR Review"})
sid = r.json()["id"]

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/api-reference.md (reported line 145)May include surrounding context.

建立 Session

python
r = requests.post("http://127.0.0.1:4096/session", json={"title": "PR Review"})
sid = r.json()["id"]

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/api-reference.md (reported line 174)May include surrounding context.

建立 Session

python
r = requests.post("http://127.0.0.1:4096/session", json={"title": "PR Review"})
sid = r.json()["id"]

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/api-reference.md (reported line 27)May include surrounding context.

建立 Session

python
r = requests.post("http://127.0.0.1:4096/session", json={"title": "PR Review"})
sid = r.json()["id"]

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Content

Scanner excerpt · references/api-reference.md (reported line 27)May include surrounding context.

建立 Session

python
r = requests.post("http://127.0.0.1:4096/session", json={"title": "PR Review"})
sid = r.json()["id"]

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Content

Scanner excerpt · references/api-reference.md (reported line 145)May include surrounding context.

建立 Session

python
r = requests.post("http://127.0.0.1:4096/session", json={"title": "PR Review"})
sid = r.json()["id"]

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Content

Scanner excerpt · references/api-reference.md (reported line 174)May include surrounding context.

建立 Session

python
r = requests.post("http://127.0.0.1:4096/session", json={"title": "PR Review"})
sid = r.json()["id"]