other
- Location
scripts/run.py:87- Finding
Sensitive Medication Records Are Transmitted to an External Model Service
- Content
View full analysis
str: payload = {"model": MODEL, "temperature": 0.0, "messages": [ {"role": "system", "content": system_prompt}, {"role": "user", "content": user_prompt}]} try: req = Request(API_URL, data=json.dumps(payload, ensure_ascii=False).encode("utf-8"), headers={"Content-Type": "application/json", "Authorization": f"Bearer {appkey}"}) resp = urlopen(req, timeout=120) return json.loads(resp.read().decode("utf-8"))["choices"][0]["message"]["content"] ``` ```python user_prompt = f"""请整理以下用药记录: 总记录数:{len(medications)} 正在服用:{len(active)}种 已停用:{len(stopped)}种 正在服用的药品: ```json {json.dumps(active, ensure_ascii=False, indent=2)} ``` 已停用的药品: ```json {json.dumps(stopped, ensure_ascii=False, indent=2)} ``` 请生成用药管理摘要,分类展示,标注长期/短期用药,给出用药提醒。""" text = _call_llm(SYSTEM_PROMPT, user_prompt, appkey) ``` ### Technical Analysis The application inserts complete medication records into a model prompt and transmits that prompt to `https://maas-api.hivoice.cn/v1/chat/completions`. The transmitted fields can include medication names, doses, frequencies, treatment dates, statuses, and free-form notes. These values constitute sensitive health information, while free-form notes may also contain names, diagnoses, contact information, or other identifying details. The transfer is documented in `SKILL.md`, so it is not covert; however, external inference is mandatory, and the implementation provides no local-only mode, field minimization, pseudonymization, redaction, or technical consent mechanism. The bearer credential is placed in an HTTPS authorization header and is not wri ...[truncated 1140 chars]- Remediation
View remediation
