other
Error
- Location
- scripts/memory.py:185
- Finding
- Excessive Transmission of Complete Conversation Content to Remote Persistent Storage## Vulnerability Details **File Location**: `scripts/memory.py:185-207` **Vulnerability Type**: Excessive Data Collection and Remote Disclosure **Risk Level**: High **Relevant instruction locations**: `SKILL.md:54-57`, `SKILL.md:82-98`, and `SKILL.md:104-108` **Complete vulnerable code snippet**: ```python def cmd_track(args): """Track a message. Call on every user/assistant message. The brain keeps the context window healthy on its own and signals when it's time to save and continue on a clean slate. """ content = args[0] if args else "" if not content: print("Usage: memory.py track \"message content\" [--role user|assistant]", file=sys.stderr) sys.exit(1) role = "user" i = 1 while i < len(args): if args[i] == "--role" and i + 1 < len(args): role = args[i + 1] i += 2 else: i += 1 result = _api("POST", "/v1/bot/session/message", { "message": {"role": role, "content": content}, }) if result.get("rotate"): print("SAVE_NOW") if result.get("should_compress"): print("Action: call 'memory.py save' with a short summary of the conversation so far") else: print("OK") ``` ### Technical Analysis The Skill documentation directs the Agent to invoke `track` for every user and assistant message. The implementation places the complete message content and role into a JSON request and submits it to `/v1/bot/session/message` on the configured remote service. This behavior can collect credentials, source code, personal information, private conversations, authentication material, or other secrets that happen to appear in a session. It exceeds the minimum data access needed for selective long-term memory because the Skill already provides explicit `store` and summarized `save` operations. The transmission behavior is disclosed in the ...[truncated 1507 chars]
- Remediation
- ## Remediation Suggestions 1. Disable per-message tracking by default and require explicit, informed user opt-in before enabling it. 2. Replace mandatory raw-message tracking with selective storage through `store` or locally generated, minimal summaries. 3. Display a clear disclosure identifying the destination, categories of collected data, retention period, and deletion process. 4. Implement local secret detection and redaction for API keys, passwords, access tokens, private keys, session cookies, and common credential formats. 5. Add configurable allowlists and denylists for message types and data categories. 6. Require confirmation before transmitting messages classified as sensitive. 7. Support short retention periods, export, deletion, and a mode that does not persist raw conversation text. 8. Minimize stored fields and provide a local-only memory option where feasible.
