T09 · Insecure Skill Coding Practices
- Location
scripts/service.py:13- Finding
Payment Credentials and Patent Information Transmitted Over Plaintext HTTP
- Content
View full analysis
None: payload = json.dumps( { "question": question, "orderNo": order_no, "credential": credential, }, ensure_ascii=False, ).encode("utf-8") req = urllib.request.Request( GET_RESULT_URL, data=payload, headers={"Content-Type": "application/json"}, method="POST", ) try: with urllib.request.urlopen(req, timeout=120) as resp: body = json.loads(resp.read().decode("utf-8")) ``` Order creation also uses the same plaintext HTTP service and sends the user's invention topic: ```python DEFAULT_BASE = os.environ.get("SKILL_SERVER_BASE_URL", "http://api.clawtip.top").rstrip("/") CREATE_ORDER_URL = f"{DEFAULT_BASE}/api/clawtip/createOrder" def create_order(question: str) -> tuple[str, int | str, str, str]: payload = json.dumps( {"question": question, "clientIp": ""}, ensure_ascii=False, ).encode("utf-8") req = urllib.request.Request( CREATE_ORDER_URL, data=payload, headers={"Content-Type": "application/json"}, method="POST", ) try: with urllib.request.urlopen(req, timeout=60) as resp: body = json.loads(resp.read().decode("utf-8")) ``` The documented workf ...[truncated 3002 chars]- Remediation
View remediation
