T09 · Insecure Skill Coding Practices
- Location
SKILL.md:29- Finding
Bearer Token and Sensitive Service Data May Be Transmitted Over Plaintext HTTP
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 29–35 and 39–45
Vulnerability Type: Plaintext transmission of credentials and sensitive data
Risk Level: MediumVulnerable code snippet:
markdown Once agentgate is running, configure these environment variables for your OpenClaw agent: - `AGENT_GATE_URL` — agentgate base URL (e.g., `http://your-agentgate-host:3050`) - `AGENT_GATE_TOKEN` — your agent's API key (create in the agentgate Admin UI → API Keys) ## Authentication All requests require the API key in the Authorization header:Authorization: Bearer $AGENT_GATE_TOKEN
text markdown ## First Steps — Service Discovery After connecting, discover what's available on your instance:GET $AGENT_GATE_URL/api/agent_start_here Authorization: Bearer $AGENT_GATE_TOKEN
text Returns your agent's config, available services, accounts, and full API documentation.Technical Analysis
The documented configuration explicitly uses an
http://gateway URL while requiring a reusable bearer token in every request. HTTP provides neither transport confidentiality nor endpoint authentication. If the example is followed across an untrusted or compromised network, an on-path attacker can observe the Authorization header, capture the token, inspect sensitive request and response data, or modify traffic.This network communication is necessary for the Skill's declared gateway functionality, and the token is not sent to an undisclosed fixed third party. However, permitting plaintext transport exceeds safe minimum-security requirements because HTTPS can provide the same functionality without exposing credentials and personal-service traffic.
Attack Path
- An administrator configures
AGENT_GATE_URLusing the documentedhttp://your-agentgate-host:3050pattern. - The agent sends a request to the gateway with
Authorization: Bearer $AGENT_GATE_TOKEN. - An attacke ...[truncated 1422 chars]
- An administrator configures
- Remediation
View remediation
Remediation Suggestions
- Require HTTPS for every non-loopback Agentgate connection and replace the plaintext example with an
https://URL. - Reject
http://gateway URLs at configuration or invocation time, except for explicitly authorized loopback-only development environments. - Use certificates issued by a trusted authority or securely distribute and pin a private certificate authority for internal deployments. Do not disable certificate validation.
- Consider mutual TLS, a private VPN, or another authenticated encrypted tunnel when deploying the gateway on a separate host.
- Scope each API key to only the services, accounts, endpoints, and operations required by its agent. Keep write-bypass disabled unless it is strictly necessary.
- Rotate API keys periodically and immediately after suspected plaintext exposure. Support revocation and audit access performed with each key.
- Document that mementos, messages, uploaded files, and request bodies may contain sensitive information and should not include secrets unless required and appropriately protected.
- Add a prominent warning that approval-gated writes do not protect the confidentiality of bearer tokens or read responses transmitted over HTTP.
- Require HTTPS for every non-loopback Agentgate connection and replace the plaintext example with an
