Back to skill

Security audit

agent-easy-http

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed HTTP gateway for remote agent control, but its default cleartext network exposure and self-healing global configuration changes make it something users should review carefully before installing.

Install only on a host and network you trust. Before starting it, bind to 127.0.0.1 or put it behind HTTPS/reverse-proxy TLS, restrict exposed skills and allowed agents, protect the API key like a password, and disable the watchdog if you need configuration changes to stay reverted. Expect API-key holders to be able to trigger broad agent actions and read returned transcripts.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (20)

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill exposes strong capabilities including file access, shell, network access, and persistent configuration changes, but does not declare permissions explicitly. That weakens reviewability and informed consent, increasing the chance an operator enables a powerful remote-control surface without understanding its true authority.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The documented purpose understates the breadth of behavior: the skill not only proxies requests, but also modifies global OpenClaw configuration, persists secrets, scans local skills, reads agent session files, and runs a self-healing watchdog. This creates a materially larger attack and trust surface than a user would infer from a simple 'HTTP proxy' description.

Description-Behavior Mismatch

Medium
Confidence
88% confidence
Finding
The design expands from a thin HTTP wrapper for installed skills into a generic agent task-execution endpoint (`/run`) where arbitrary user messages are forwarded for autonomous tool/skill selection. In the context of a network-exposed agent gateway, this materially increases attack surface and can enable unintended capability execution, data access, or side effects well beyond the advertised skill-scoped model.

Description-Behavior Mismatch

Medium
Confidence
89% confidence
Finding
The /agent/run endpoint exposes generic agent execution rather than only per-skill proxying, materially broadening what remote callers can cause the backend agent to do. In the context of an agent platform with tool and skill access, this expands the remote attack surface from curated skills to potentially arbitrary agent-directed actions.

Description-Behavior Mismatch

Medium
Confidence
86% confidence
Finding
The result endpoint reads local OpenClaw session files and reconstructs message histories, which exceeds a thin proxy role and exposes internal conversational state over the network. If an API key is obtained or reused broadly, this can leak sensitive prompts, user data, or agent outputs from local storage rather than only returning direct hook metadata.

Context-Inappropriate Capability

Medium
Confidence
77% confidence
Finding
Auto-starting and supervising an external watchdog process gives this HTTP proxy hidden process-management behavior beyond its stated purpose, increasing persistence and operational surprise. In a security-sensitive environment, unexpected self-restarting components make containment, shutdown, and incident response harder and can preserve unintended exposure of the network service.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The deployment guide explicitly promotes HTTP as the default mode for exposing an agent service over a network IP, while clients send an X-API-Key and potentially sensitive prompt/result data over that channel. On any shared, routed, or untrusted network, this enables passive interception and active manipulation of credentials and agent traffic, and the skill context makes this especially sensitive because the exposed endpoint can trigger powerful agent actions remotely.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The design explicitly states that full `SKILL.md` content, message, params, and `callback_url` are sent to the agent, but provides no minimization, redaction, or warning about transmitting potentially sensitive instructions or user-supplied data. In a network-exposed proxy, forwarding complete skill contents and callback targets can leak internal prompts, configuration details, or sensitive request data and also broadens prompt-injection and SSRF-style abuse risk if callback handling is not tightly controlled.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The proposed v2 workflow allows the agent to autonomously perform external side effects such as sending Hi messages on the user's behalf, without any mention of confirmation, authorization boundaries, or audit controls. For an HTTP-exposed agent service, this enables abuse of the gateway for unauthorized messaging, business-action automation, and data exfiltration through external communications.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The standard tells implementers to place callback authentication headers directly into an agent prompt. Even though the secret itself is not embedded, the prompt exposes a valid, secret-derived HMAC token and timestamp to the agent, which may be untrusted, prompt-injected, or able to relay those headers elsewhere within the acceptance window. In the context of an HTTP proxy that exposes agent capabilities over the network, this increases the chance of forged callback submission, job poisoning, or cross-job result injection if an agent or intermediary leaks or reuses the headers.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The script automatically reads the OpenClaw hooks token from the user's private configuration and writes it into another application config without explicit notice or consent. This expands the token's exposure surface to additional files and processes, increasing the chance of credential leakage through weaker file permissions, backups, logs, or other local compromise paths.

External Transmission

Medium
Category
Data Exfiltration
Content
This skill starts a persistent proxy that **exposes your OpenClaw agent as a remotely callable HTTP endpoint**. The agent has file, shell, and messaging capabilities on the host, so this is a **remote control surface** — treat it as exposing an internal service, not a zero-risk wrapper:

- **`/agent/run` is an open-ended entry point.** Any authenticated caller can send **arbitrary prompts** to the agent, which then decides which Skills to run — including side-effecting ones (send messages, modify data). Keep the port reachable only by trusted callers.
- **HTTP is the default and is unencrypted.** By default the `X-API-Key`, prompts, and results travel in **cleartext**. Acceptable only on `localhost` / a trusted network; enable HTTPS when binding `0.0.0.0` or calling cross-host, and never use `curl -k` (skip cert verification) in production.
- **It modifies global config.** init / watchdog write and self-heal the hooks config in `~/.openclaw/openclaw.json` (and optionally sync to external sources via `OPENCLAW_CONFIG_SYNC_PATHS`). This is a platform-level change; the watchdog may re-apply it after a manual revert — be aware of this persistence behavior.
- **Protect the API Key.** It is a bearer credential — leaking it grants agent-invocation rights. Keep it out of shell history, logs, screenshots, and world-readable files.
Confidence
96% confidence
Finding
This README documents that the service exposes the agent over HTTP by default, meaning API keys, prompts, and results can traverse the network unencrypted. In the context of a remotely callable agent with file, shell, and messaging capabilities, interception of that traffic could lead to credential theft and remote agent invocation, making the exposure materially dangerous even though the text warns about it.

External Transmission

Medium
Category
Data Exfiltration
Content
CERT=<workspace>/.http/certs/server.crt

# 跑指定 skill
curl --cacert $CERT -H "X-API-Key: $API_KEY" \
     -H "Content-Type: application/json" \
     -d '{"message":"运行 hello-env"}' \
     https://192.168.1.10:7720/skills/hello-env/run
Confidence
89% confidence
Finding
The skill is explicitly designed to transmit prompts, results, and API-key-authenticated requests over the network to a remotely reachable HTTP(S) endpoint. In context, this is dangerous because the exposed endpoint can drive a local agent with shell/file capabilities, so any weak transport configuration, key leakage, or overexposure turns into remote agent abuse.

External Transmission

Medium
Category
Data Exfiltration
Content
HEADERS = {"X-API-Key": API_KEY}

# 触发
resp = requests.post(
    f"{BASE}/agent/run",
    headers=HEADERS,
    json={"message": "帮我生成本周工作总结"},
Confidence
87% confidence
Finding
The Python example transmits the API key and user message to the remote service, which is expected behavior for this skill, but in the documented configuration BASE is set to plain HTTP. That means the sample code normalizes sending authentication material and potentially sensitive agent requests without transport encryption, increasing the likelihood of insecure copy-paste deployments.

External Transmission

Medium
Category
Data Exfiltration
Content
BASE=http://<your-server-ip>:7720

# 健康检查(无需鉴权)
curl $BASE/health

# 列出可用 skill
curl -H "X-API-Key: $API_KEY" $BASE/skills
Confidence
90% confidence
Finding
The curl examples show operational use of the service over http://, including authenticated calls with X-API-Key and agent input payloads. While external transmission is inherent to an HTTP API skill, documenting insecure transport for normal usage materially increases exposure to credential theft, request tampering, and leakage of agent outputs.

External Transmission

Medium
Category
Data Exfiltration
Content
banner("Step 4/5: TLS / HTTPS")
    print("HTTPS 提供传输层加密,但需要生成自签证书 + 客户端导入,有一定门槛。")
    print("说明:")
    print("  - 不开 HTTPS  → 调用方直接 curl 即可,零门槛(推荐先跑通再加 TLS)")
    print("  - 开 HTTPS    → 调用方需要 --cacert 指定证书(或导入系统信任库)")
    if config.get("listen_host") == "0.0.0.0":
        print("  ⚠️  当前监听 0.0.0.0(局域网可达),如有跨机器调用强烈建议开 TLS")
Confidence
83% confidence
Finding
The wizard explicitly steers users toward deploying the agent over plain HTTP first and defaults the listener to `0.0.0.0`, making the service network-accessible before transport encryption is enabled. Because this skill exposes agent capabilities over the network and relies on an API key for authentication, unencrypted deployment can leak credentials and request/response contents to anyone able to observe local network traffic, especially on shared or enterprise networks.

Session Persistence

Medium
Category
Rogue Agent
Content
- **`/agent/run` is an open-ended entry point.** Any authenticated caller can send **arbitrary prompts** to the agent, which then decides which Skills to run — including side-effecting ones (send messages, modify data). Keep the port reachable only by trusted callers.
- **HTTP is the default and is unencrypted.** By default the `X-API-Key`, prompts, and results travel in **cleartext**. Acceptable only on `localhost` / a trusted network; enable HTTPS when binding `0.0.0.0` or calling cross-host, and never use `curl -k` (skip cert verification) in production.
- **It modifies global config.** init / watchdog write and self-heal the hooks config in `~/.openclaw/openclaw.json` (and optionally sync to external sources via `OPENCLAW_CONFIG_SYNC_PATHS`). This is a platform-level change; the watchdog may re-apply it after a manual revert — be aware of this persistence behavior.
- **Protect the API Key.** It is a bearer credential — leaking it grants agent-invocation rights. Keep it out of shell history, logs, screenshots, and world-readable files.

## Features
Confidence
89% confidence
Finding
The documented behavior of writing and self-healing global hook configuration in ~/.openclaw/openclaw.json introduces persistent platform-level changes that can survive manual rollback. In a skill that exposes a remote control surface, this persistence increases risk because the service may silently re-enable or retain externally reachable agent access after an operator believes it was disabled.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
- **`/agent/run` is an open-ended entry point.** Any authenticated caller can send **arbitrary prompts** to the agent, which then decides which Skills to run — including side-effecting ones (send messages, modify data). Keep the port reachable only by trusted callers.
- **HTTP is the default and is unencrypted.** By default the `X-API-Key`, prompts, and results travel in **cleartext**. Acceptable only on `localhost` / a trusted network; enable HTTPS when binding `0.0.0.0` or calling cross-host, and never use `curl -k` (skip cert verification) in production.
- **It modifies global config.** init / watchdog write and self-heal the hooks config in `~/.openclaw/openclaw.json` (and optionally sync to external sources via `OPENCLAW_CONFIG_SYNC_PATHS`). This is a platform-level change; the watchdog may re-apply it after a manual revert — be aware of this persistence behavior.
- **Protect the API Key.** It is a bearer credential — leaking it grants agent-invocation rights. Keep it out of shell history, logs, screenshots, and world-readable files.

## Features
Confidence
92% confidence
Finding
The README states that HTTP is the default and that the service starts on 0.0.0.0:7720, which is an unsafe default for a proxy that exposes powerful agent capabilities remotely. Even with API-key protection, a default network-accessible cleartext control plane substantially raises the chance of accidental exposure, credential leakage, and unauthorized task execution.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
## 8. 常见问题

### Q1:客户端报「证书不受信任」
A:把 `~/.http/certs/server.crt` 加到客户端 CA 信任链,或临时用 `curl -k` 跳过校验(仅调试)。

### Q2:服务起不来,提示「api_key 不能为空」或「hook_url 无法解析」
A:跑一遍向导:`python3 scripts/server.py init`(会启用 OpenClaw hooks + 生成 API Key)。
Confidence
82% confidence
Finding
The troubleshooting guidance suggests using curl -k to bypass certificate validation, which trains operators to disable a core TLS protection. Even if labeled as temporary debugging, this can become a copy-pasted operational practice that defeats server authentication and permits man-in-the-middle interception or tampering.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
print(f"证书路径:{CERT_PATH}")
    print()
    print("【curl】")
    print(f"  curl --cacert {CERT_PATH} https://your-host:port/health")
    print("  # 或临时跳过验证:curl -k https://...")
    print()
    print("【Python requests】")
Confidence
91% confidence
Finding
The script explicitly instructs users to use `curl -k`, which disables TLS certificate verification and normalizes an unsafe testing pattern. In the context of an agent-exposing HTTP/HTTPS proxy, encouraging verification bypass can lead operators or integrators to accept man-in-the-middle interception, undermining the point of generating certificates at all.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/deployment.md:122