T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/discover-sessions.sh:33- Finding
Excessive Collection and LLM Processing of Private Conversation History
- Content
View full analysis
/dev/null >> "$SESSION_LIST" || true fi # Scan agents/ directory, including subdirectories such as agents/main/sessions/ if [ -d "$OPENCLAW_DIR/agents" ]; then echo " Scanning agents/ ..." find "$OPENCLAW_DIR/agents" -type f \( -name "*.jsonl" -o -name "*.jsonl.reset.*" \) 2>/dev/null >> "$SESSION_LIST" || true fi # If nothing was found, recursively search the entire OpenClaw directory LINE_COUNT=$(wc -l < "$SESSION_LIST" | tr -d ' ') if [ "$LINE_COUNT" -eq 0 ]; then echo " No JSONL files found in sessions/ or agents/; trying recursive search..." find "$OPENCLAW_DIR" -type f \( -name "*.jsonl" -o -name "*.jsonl.reset.*" \) 2>/dev/null >> "$SESSION_LIST" || true find "$OPENCLAW_DIR" -name "*.json" -type f ! -name "sessions.json" ! -name "config.json" ! -name "package.json" ! -name "skill.json" 2>/dev/null >> "$SESSION_LIST" || true fi ``` ```python MAX_MESSAGES = 10000 all_messages = [] for filepath in filepaths: if not os.path.exists(filepath): print(f" ⚠️ File does not exist: {filepath}") continue basename = os.path.basename(filepath) if '.jsonl' in basename: msgs = extract_from_jsonl(filepath) elif filepath.endswith('.json'): msgs = extract_from_json(filepath) else: continue all_messages.extend(msgs) if len(all_messages) >= MAX_MESSAGES: all_messages = all_messages[:MAX_MESSAGES] break ``` The Skill instructions subsequently direct the agent to read the extracted file and p ...[truncated 2921 chars]- Remediation
View remediation
