T09 · Insecure Skill Coding Practices
- Location
scripts/hihired_api.py:10- Finding
Sensitive Resume Data Is Transmitted over Plaintext HTTP
- Content
View full analysis
Vulnerability Details
File Location:
scripts/hihired_api.py:10, with the insecure transport used by the request functions atscripts/hihired_api.py:20-27andscripts/hihired_api.py:30-61
Vulnerability Type: Plaintext transmission of sensitive information
Risk Level: HighVulnerable Code
python DEFAULT_BASE = os.environ.get("HIHIRED_BASE_URL", "http://18.190.155.165")python def post_json(base_url: str, endpoint: str, payload: dict): body = json.dumps(payload).encode("utf-8") req = request.Request( f"{base_url.rstrip('/')}{endpoint}", data=body, headers={"Content-Type": "application/json", "Accept": "application/json"}, method="POST", ) with request.urlopen(req, timeout=DEFAULT_TIMEOUT) as resp: return parse_json_response(resp)python def post_multipart(base_url: str, endpoint: str, file_path: str, field_name: str = "resume"): path = Path(file_path) if not path.exists(): raise FileNotFoundError(file_path) boundary = "----OpenClawHiHiredBoundary7MA4YWxkTrZu0gW" content_type = mimetypes.guess_type(path.name)[0] or "application/octet-stream" file_bytes = path.read_bytes() parts = [] parts.append(f"--{boundary}\r\n".encode()) parts.append( f'Content-Disposition: form-data; name="{field_name}"; filename="{path.name}"\r\n'.encode() ) parts.append(f"Content-Type: {content_type}\r\n\r\n".encode()) parts.append(file_bytes) parts.append(f"\r\n--{boundary}--\r\n".encode()) body = b"".join(parts) req = request.Request( f"{base_url.rstrip('/')}{endpoint}", data=body, headers={ "Content-Type": f"multipart/form-data; boundary={boundary}", "Accept": "application/json", }, method="POST", ) with request.urlopen(req, timeout=DEFAULT_TIMEOUT) as re ...[truncated 2596 chars]- Remediation
View remediation
Remediation Suggestions
- Replace the plaintext default with an authenticated HTTPS hostname whose certificate is valid for that hostname.
- Reject all base URLs that do not use
https://; do not provide an HTTP fallback. - Maintain an explicit allowlist of approved API hostnames and reject raw IP addresses and arbitrary destinations by default.
- Avoid allowing untrusted environment variables or command-line values to silently redirect sensitive uploads. If custom endpoints are necessary, require an explicit high-friction opt-in and display the destination before transmission.
- Obtain informed user consent before uploading a resume, clearly identifying the recipient, the fields transmitted, and applicable retention behavior.
- Minimize transmitted information to only the fields required for the selected operation.
- Ensure normal TLS certificate and hostname verification remains enabled, and fail closed on certificate errors.
- Update
SKILL.mdandreferences/hihired-capabilities.mdto remove guidance recommending the direct plaintext backend. - Consider adding request-size limits, file-type validation, and privacy-preserving logging controls as defense-in-depth measures.
