T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:149
- Finding
- Unrestricted Collection and Indefinite Retention of Sensitive Interaction Data<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:149-176`, `SKILL.md:371-394`, and `SKILL.md:437-441` **Vulnerability Type**: Sensitive data exposure and excessive data retention **Risk Level**: Medium ### Vulnerable Code ```json { "episode_id": "EP-20260218-001", "session_id": "S20260218-001", "user": "maria.g", "timestamp_utc": "2026-02-18T09:14:32Z", "skill": "greek-financial-statements", "action_type": "statement_generated", "client_afm": "EL123456789", "period": "2026-01", "commands_called": [ "openclaw statements check-ready --afm EL123456789 --period 2026-01", "openclaw statements generate --afm EL123456789 --period 2026-01 --type all" ], "human_confirmation_required": false, "outcome": "success", "result_summary": "Full statement pack generated. P&L, balance sheet, cash flow, VAT summary. v1 issued.", "tokens_used": 1240, "duration_seconds": 31 } ``` ```json { "failure_id": "FAIL-20260218-003", "episode_id": "EP-20260218-003", "session_id": "S20260218-001", "user": "maria.g", "timestamp_utc": "2026-02-18T11:22:14Z", "skill": "conversational-ai-assistant", "failure_type": "intent_misread", "user_query": "Send the January summary to Alpha Trading", "agent_action_taken": "Attempted openclaw comms send — skill not yet available", "what_went_wrong": "Agent tried to send client communication directly. Skill 16 not deployed at time of query.", "what_should_have_happened": "Recognise outgoing communication unavailable. Draft the summary text. Inform user it needs manual sending.", "human_correction_provided": true, "human_correction_text": "Just write the summary text and tell me to send it manually", "pattern_candidate": true, "skill_improvement_candidate": "14-conversational-ai-assistant", "proposed_change_summary": "Add scope boundary: if comms send requested and Skill 16 unavailable, draft content and state manual sending required" } ``` ```yaml patterns: path: " ...[truncated 3791 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Adopt an explicit allowlist of fields that may be logged. Do not store raw prompts, full command lines, correction text, or result content unless strictly necessary. 2. Replace direct identifiers such as usernames and client tax identifiers with scoped pseudonymous identifiers. Store any re-identification mapping separately with stricter access controls. 3. Add a mandatory redaction stage before every write. It should remove credentials, access tokens, tax identifiers, banking information, personal data, and confidential document content. 4. Encrypt memory records at rest using managed keys separate from the data directory. 5. Require restrictive filesystem permissions and a dedicated service account. Other skills should receive append-only access where feasible, while only the memory processor receives read access. 6. Apply finite retention periods to corrections, patterns, and proposals. Derived records should be deleted when their source records expire unless a documented legal or operational requirement justifies continued retention. 7. Distinguish archival from deletion and implement verifiable deletion from active storage and backups. 8. Add per-field provenance so derived artifacts can be located and removed when a user or client record must be deleted. 9. Require explicit configuration and organizational approval before enabling cross-skill collection. 10. Add automated tests proving that representative tax identifiers, tokens, bank details, and personal information are redacted before persistence. ]]>
