T09 · Insecure Skill Coding Practices
- Location
openclaw.plugin.json:11- Finding
Plaintext HTTP Is Permitted and Recommended for Transmission of a Privileged API Key
- Content
View full analysis
Vulnerability Details
File Location:
openclaw.plugin.json:11-19; insecure usage examples inREADME.md:21-25,37-40andSKILL.md:23-27,33-39,72-76,125-126
Vulnerability Type: Plaintext transmission of sensitive credentials
Risk Level: HighVulnerable Code and Configuration
The plugin configuration accepts any nonempty string as the server URL and does not require the HTTPS scheme:
json "baseUrl": { "type": "string", "minLength": 1, "description": "1Panel 服务器地址" }, "apiKey": { "type": "string", "minLength": 1, "description": "API 密钥" }The README recommends configuring the privileged API endpoint with plaintext HTTP:
text 5. 配置: ``` 1Panel 地址: http://your-server:port 1Panel API 密钥: your-api-key ```It also provides a plaintext HTTP environment-variable example:
bash APPSTORE_BASE_URL=http://your-server:port \ APPSTORE_API_KEY=your-api-key \ node dist/cli.js listThe skill instructions similarly recommend an HTTP endpoint together with the API key:
text 用户: 设置 1Panel 配置 地址:http://your-server:port 密钥:your-api-key-hereTechnical Analysis
The
baseUrlschema only enforces a minimum string length. It does not validate the value as a URI or restrict its scheme tohttps:. The documentation consistently demonstrateshttp://while pairing the endpoint with a privileged 1Panel API key.If the implementation sends authenticated requests to the configured HTTP endpoint, neither the credentials nor request contents receive transport-layer confidentiality or integrity protection. An attacker able to observe or modify traffic can capture the API key, inspect administrative requests, alter server responses, or tamper with application-management operations.
The executable files referenced by the package, including
dist/plugin.jsanddist/cli.js, were absent from the supplied project. Th ...[truncated 1506 chars]- Remediation
View remediation
Remediation Suggestions
- Require an absolute HTTPS URL in runtime validation and reject all other schemes:
javascript const endpoint = new URL(config.baseUrl); if (endpoint.protocol !== "https:") { throw new Error("The 1Panel endpoint must use HTTPS."); } - Add an appropriate URI format constraint to the configuration schema and, where supported, an HTTPS-specific pattern:
json { "type": "string", "format": "uri", "pattern": "^https://" } - Replace every
http://your-server:portexample inREADME.mdandSKILL.mdwith an HTTPS endpoint. - Do not disable TLS certificate validation. Document deployment with a certificate issued by a trusted internal or public certificate authority.
- If plaintext HTTP is necessary for local development, restrict it to loopback addresses behind an explicit opt-in development setting. Never permit it for remote hosts.
- Use a narrowly scoped API key limited to the operations required by the skill, store it through the platform's protected secret mechanism, and rotate any key that may previously have traversed an HTTP connection.
- Add automated tests confirming that HTTP, non-URL strings, user-information components, and unsupported schemes are rejected before any credential-bearing request is sent.
- Require an absolute HTTPS URL in runtime validation and reject all other schemes:
