T09 · Insecure Skill Coding Practices
- Location
scripts/openclaw_skill_config.py:131- Finding
Bearer Credentials and User Content Can Be Transmitted over Plaintext HTTP
- Content
View full analysis
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_url ``` Authenticated requests subsequently use the accepted URL: ```python status, payload, response_headers = request( url=f"{server_url}/v1/executions", method="POST", headers={ "Authorization": f"Bearer {api_key}", }, payload=body, ) ``` Billing requests use the same URL validation and bearer credential: ```python 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}"} status, payload = fetch_authoritative_balance(server_url, auth_headers) ``` ### Technical Analysis `require_server_url()` accepts both HTTPS and plaintext HTTP origins. It only rejects the browser-facing `openmarlin.ai` hostname; it does not require TLS for remote hosts, validate that the value is a bare origin, or reject URL user information, queries, fragments, and unexpected paths. The validated value is later used for authenticated execution, task, model, balance, us ...[truncated 1738 chars]- Remediation
View remediation
