T09 · Insecure Skill Coding Practices
- Location
SKILL.md:94- Finding
Uncontrolled Persistent Storage of Conversation Summaries
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 94-96
Vulnerability Type: Plaintext persistence of potentially sensitive conversation data
Risk Level: MediumRelevant instruction, translated into English:
markdown ## Memory Management Each time Liangzi mode ends, append the conversation summary to `characters/liangzi_memory.md`.Technical Analysis
The skill directs the agent to append a summary of every persona-mode conversation to a persistent plaintext file. The instruction does not require user consent, data minimization, sensitive-information filtering, access controls, retention limits, or deletion procedures.
Because summaries are derived from user-controlled conversations, they may contain personal data, credentials, confidential material, or attacker-supplied content. The target file is part of the project directory and can persist beyond the current session. It may consequently be exposed to subsequent users, repository commits, backups, synchronization systems, or other processes with access to the project.
The inspected memory file already demonstrates that cross-session state is stored in this location. No evidence of code execution, elevated privileges, network exfiltration, or persistent attacker-authored behavioral rules was found, so the issue is classified as insecure storage rather than agent memory poisoning.
Attack Path
- A user activates the Liangzi persona mode.
- The user supplies sensitive information or specially crafted content during the conversation.
- The user closes the persona mode.
- Following the skill instruction, an agent with filesystem write capability generates a conversation summary and appends it to
characters/liangzi_memory.md. - The stored summary remains available after the session.
- A later user, tool, backup process, or repository operation with access to the project can retrieve or distribute the persisted content.
Expl ...[truncated 756 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove automatic conversation logging unless persistent memory is essential to the skill's declared function.
- Require explicit, informed user consent before storing any conversation-derived information.
- Store only narrowly defined, non-sensitive preferences rather than general conversation summaries.
- Apply filtering to exclude credentials, authentication tokens, financial information, health information, private identifiers, and other confidential content.
- Use per-user isolated storage with restrictive permissions instead of a shared plaintext file inside the skill package.
- Define retention limits and provide mechanisms for users to inspect, correct, and delete stored information.
- Prevent generated memory files from being committed to source control or included in distributable skill packages.
- Treat all persisted content as untrusted data and never interpret it as executable code or higher-priority instructions.
- If persistent storage remains necessary, use authenticated encryption and secure key management appropriate to the host environment.
