T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:700
- Finding
- Clinical Record Example Fabricates Unsupported Patient Findings and Interventions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 700–732; conflicting guardrails at lines 609–613 **Vulnerability Type**: Unsafe generation of unsupported clinical-record content **Risk Level**: Medium ### Complete Vulnerable Snippet ```markdown ### Example 1 — SOAP note for physiotherapy follow-up (CDM session) **User:** "Can you help me write a SOAP note for a physio follow-up? Patient is a 58-year-old male with chronic lower back pain. He's on a GPCCMP and this is his 3rd session. He said his pain is 4/10 this week compared to 7/10 at last visit. I did soft tissue work and taught him 3 new strengthening exercises." **Agent output:** PATIENT: [Full Name] | DOB: [dd/mm/yyyy] | Date: [dd/mm/yyyy] Practitioner: [Name], Physiotherapist | AHPRA: PHY000XXXXX Session type: Follow-up (Session 3 of 5 — GPCCMP) Duration: [X] minutes MBS Item: 10960 Referral: GPCCMP — Dr [GP Name], [GP Practice], dated [date] S — SUBJECTIVE Patient reports pain level 4/10 this week (NRS), compared to 7/10 at last session. Describes improvement in ability to stand for longer periods at work. Still experiencing stiffness in the morning, settling within approximately 30 minutes. Reports completing home exercise program 4 out of 7 days this week. O — OBJECTIVE Lumbar ROM: Flexion 70° (improved from 55° initial assessment), extension 20° (unchanged), lateral flexion symmetrical at 25° bilaterally. Prone assessment: L4/5 central PA stiffness — Grade III, reduced from Grade IV initial. Neurological screening: negative for lower limb neurology today. No antalgic posture observed in standing. Core activation present but fatigues at approximately 10 repetitions. A — ASSESSMENT Patient is demonstrating meaningful improvement in lumbar mobility and subjective pain reduction consistent with goals established at initial assessment (Goal: reduce pain to ≤3/10, return to unrestricted standing at work). Treatment response is positive. Primary remaining deficit is lumbar ex ...[truncated 4544 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace every unsupported fact in Example 1 with an explicit placeholder, such as: - `[insert patient-reported functional change]` - `[insert measured lumbar ROM, if assessed]` - `[insert neurological screening result, if performed]` - `[insert exercises, dosage, and resistance exactly as delivered]` 2. Restrict the completed example to information explicitly supplied by the user. For example, retain the reported pain change and soft-tissue intervention, but do not infer work tolerance, adherence, examination findings, goals, or named exercises. 3. Add a validation step before generating a filing-ready note: - Enumerate missing subjective, objective, assessment, and plan fields. - Ask the clinician to provide or confirm each clinical fact. - Keep unconfirmed fields visibly marked as incomplete. 4. Add an instruction immediately before the examples stating that examples must never override the non-fabrication guardrails and that omitted facts must remain placeholders. 5. Modify the documentation check so it explicitly lists every generated statement that still requires clinician verification. Do not state that mandatory elements are present when substantive clinical fields were inferred. 6. Add automated content tests for sparse-input scenarios. Tests should fail if the output introduces measurements, examination results, diagnoses, patient statements, goals, interventions, treatment duration, or exercise prescriptions that were not present in the input. 7. Require an explicit clinician confirmation step before describing generated material as complete, audit-ready, or suitable for filing. ]]>
