T09 · Insecure Skill Coding Practices
- Location
scripts/sync-claude-code.py:11- Finding
Unfiltered Collection and Persistent Storage of Claude Code Session Logs
- Content
View full analysis
last_sync: dest = TARGET_DIR / project_dir.name shutil.copy2(project_dir, dest) synced_count += 1 ``` The same broad collection behavior is also documented in `SKILL.md:91-92`: ```bash # Claude Code cp ~/.claude/projects/*/sessions/*.jsonl memory/sources/claude-code/ ``` ### Technical Analysis The synchronization process recursively searches every project beneath `~/.claude/projects` and copies each matching session file into the Skill's memory directory without: - Restricting collection to explicitly approved projects. - Selecting only fields required for pattern analysis. - Detecting or redacting credentials, tokens, personal information, source code, or other secrets. - Applying retention or deletion policies. - Enforcing restrictive destination permissions. - Limiting input file size. - Preserving project-scoped destination paths. Claude Code session logs may include user messages, source code, command output, filesystem contents, and credentials accidentally entered into a conversation. Copying complete JSONL files creates an additional plaintext repository of that information. The destination uses only `project_dir.name`. Session files f ...[truncated 1709 chars]- Remediation
View remediation
