T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:13
- Finding
- Automatic Plaintext Persistence and Indexing of Personal Data<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 13-14 and 28-32 **Vulnerability Type**: Unprotected persistent storage of personal and inferred data **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown - **Họ tên đầy đủ** (theo CCCD/CMND) - **Ngày tháng năm sinh** (theo CCCD/CMND) ``` ```markdown ## Lưu trữ kết quả phân tích Sau khi thực hiện phân tích Thần Cửu (cho một người hoặc mối tương quan giữa hai người), em sẽ tự động lưu trữ toàn bộ nội dung kết quả vào thư mục `knowledge/md/ThanCuu/TuongQuan/` dưới dạng file `.md`. Tên file sẽ được đặt theo cú pháp `TenNguoi1_TenNguoi2_TuongQuan.md` (đối với phân tích tương quan) hoặc `TenNguoi_PhanTich.md` (đối với phân tích một người). Đồng thời, em sẽ cập nhật `knowledge/INDEX.md` để file kết quả này được đưa vào kho tri thức của anh. Khi anh muốn xem lại, em sẽ truy xuất từ đó để cung cấp nhanh chóng, không cần tính toán lại. ``` Related data-collection requirements also appear in `references/GioiThieuThanCuu.md`, lines 80-83, and `references/TracNghiemThanCuu.md`, lines 7-15. ### Technical Analysis The Skill requests full legal names and dates of birth based on official identity documents. It then instructs the Agent to store the complete analysis automatically in plaintext Markdown and add the record to a persistent knowledge index. No explicit consent check, storage opt-out, retention period, deletion mechanism, redaction policy, access restriction, or encryption requirement is defined. Relationship analysis can also persist information about a second person who may not have consented to collection or storage. Indexing increases discoverability and extends exposure beyond the immediate session. The generated reports additionally contain inferred personality and relationship information associated with identifiable individuals. ### Attack Path 1. A user invokes the Skill and supplies one or two full legal names and dates of birth. 2. The Agent generates identifiable ...[truncated 891 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Make persistent storage explicitly opt-in rather than automatic. 2. Obtain informed consent from every person represented in a report, especially for two-person analyses. 3. Default to transient processing and return the result directly without writing it to disk. 4. Store only the minimum data necessary; avoid retaining dates of birth and full legal names when a pseudonymous identifier is sufficient. 5. Do not add sensitive reports to a global knowledge index by default. 6. Define a clear retention period and provide deletion, review, and export controls. 7. Restrict file permissions to the minimum required principals. 8. Encrypt sensitive records at rest where supported. 9. Warn users before persistence and clearly identify the destination, retained fields, retention duration, and access scope. ]]>
