T09 · Insecure Skill Coding Practices
- Location
scripts/openclaw_skill_config.py:129- Finding
Platform credentials and sensitive request data may be transmitted over unencrypted HTTP
- Content
View full analysis
Vulnerability Details
File Location:
scripts/openclaw_skill_config.py:129-143, with authenticated request sinks inscripts/platform_request.py:722-739andscripts/billing.py:698-699, 764-765, 840-841, 895-896, 943-944
Vulnerability Type: Insufficient API-origin and transport-security validation
Risk Level: HighVulnerable Code
python def require_server_url(raw: str) -> str: server_url = raw.strip().rstrip("/") if not server_url: raise SystemExit(build_server_url_setup_message()) parsed = urllib.parse.urlparse(server_url) if parsed.scheme in {"http", "https"} and parsed.netloc.lower() == "openmarlin.ai": raise SystemExit( build_server_url_setup_message( resolved_value=server_url, reason=( "OPENMARLIN_SERVER_URL points at the OpenMarlin website frontend. " f"Use the API origin instead: {DEFAULT_SERVER_URL}" ), ) ) return server_urlThe resulting URL is subsequently used for authenticated requests:
python status, payload, response_headers = request( url=f"{server_url}/v1/executions", method="POST", headers={ "Authorization": f"Bearer {api_key}", }, payload=body, )python status, payload, response_headers = request( url=f"{server_url}/v1/tasks", method="POST", headers={ "Authorization": f"Bearer {api_key}", }, payload=body, )Billing requests use the same trust decision:
python server_url = require_server_url(args.server_url) api_key, api_key_source = resolve_api_key_or_exit( args.api_key, args.profile_id, args.agent_id, ) auth_headers = {"Authorization": f"Bearer {api_key}"}Technical Analysis
require_server_url()rejects the browser-facingopenmarlin.aihostname, but ...[truncated 2218 chars]- Remediation
View remediation
Remediation Suggestions
- Require
httpsfor all non-loopback destinations. - Permit plain HTTP only when the parsed hostname is a validated loopback address such as
127.0.0.1,::1, orlocalhost, preferably behind an explicit development option. - Require the URL to be a bare origin with:
- an allowed scheme;
- a nonempty hostname;
- no user information;
- no query string or fragment;
- no preconfigured API path.
- Resolve and normalize the hostname before applying loopback checks to avoid textual bypasses.
- Record the issuing API origin in the credential profile and refuse to send that credential to another origin without explicit user approval.
- Disable or tightly constrain cross-origin redirects for authenticated requests. Never forward an authorization header to a different origin.
- Clearly warn users whenever a custom deployment is selected, and display the exact origin before transmitting credentials.
- Require
