T09 · Insecure Skill Coding Practices
- Location
scripts/run.py:145- Finding
Medical Reports Are Transmitted Without the Promised De-identification
- Content
View full analysis
Vulnerability Details
File Location:
scripts/run.py:45-50, 145-147; related privacy guarantee inSKILL.md:25-29
Vulnerability Type: Sensitive medical information disclosure
Risk Level: HighVulnerable Code
python def llm(messages: List[Dict[str, str]]) -> str: payload = {"model": model, "messages": messages, "temperature": 0} resp = _http_post(url, payload, headers, timeout=timeout) try: return resp["choices"][0]["message"]["content"].strip()python result = llm([sys_msg(SYSTEM_PROMPT), user_msg(prompt)])The
promptvariable containsreport_text.strip(), which is the complete report loaded from the input file.Technical Analysis
The documentation states that directly identifying information will be de-identified before information is sent to any model or API. The implementation does not contain a redaction, tokenization, pseudonymization, or identifier-detection stage.
The report is inserted into the user prompt without modification and passed to the LLM caller. The caller serializes the complete messages collection and sends it to the configured remote API. Consequently, names, identity numbers, telephone numbers, addresses, examination dates, patient identifiers, and sensitive medical findings can all be transmitted if they appear in the supplied report.
This violates the documented privacy boundary and the data-minimization principle. It is especially significant because health records can contain both identifying information and highly sensitive medical data.
Attack Path
- A user supplies a health report containing personal identifiers and medical findings.
load_input()reads and returns the complete report without sanitization.run_overall_report()embeds the unchanged report in the LLM prompt.- The prompt is passed to the
llmclosure. - The closure serializes the messages and transmits them to the remote completion API.
- The remote service receives the identif ...[truncated 888 chars]
- Remediation
View remediation
Remediation Suggestions
- Add a local de-identification stage before prompt construction. Detect and redact names, telephone numbers, email addresses, postal addresses, identity numbers, medical-record numbers, and other direct identifiers.
- Apply data minimization by extracting only findings necessary for interpretation rather than sending the complete original report.
- Validate the sanitized result before transmission and block the request when high-confidence identifiers remain.
- Clearly inform users that medical data will be sent to a remote model and obtain explicit consent before transmission.
- Update the documentation so that its privacy claims exactly match implemented behavior and residual risks.
- Add automated tests containing representative identifiers and verify that none appear in the outgoing request payload.
- Define retention and logging restrictions with the API operator, including suppression of request-body logging where supported.
- Consider a locally hosted processing option for reports that cannot legally or contractually be disclosed to a remote service.
