🔒 Secure Bug Reporting with Encrypted Logs
Problem
Users want to report bugs with detailed logs, but logs may contain sensitive information (conversation content, file paths, project names). Currently no secure way to share debug information.
Solution
Implement log encryption system allowing users to:
- Clean all user/AI conversation content from logs
- Encrypt logs locally with developer's public key
- Submit encrypted logs via GitHub issues
- Only developer can decrypt logs for debugging
User Workflow
- User encounters bug
- Goes to Settings → Logging section
- Clicks "Encrypt Logs Folder" → creates encrypted bundle + opens folder with result
- User manually creates GitHub issue and pastes encrypted data
- User adds bug description and submits issue
Implementation Plan
Phase 1: Log Cleanup 🧹
Phase 2: Encryption Infrastructure 🔐
Phase 3: Settings UI 🎨
Add new "Logging" section to Settings panel with specific buttons:
Button 1: "Open Logs Folder"
- Action:
Desktop.open(File("logs/"))
- Behavior: Opens logs directory in system file manager
- Position: Top of logging section
Button 2: "Encrypt Logs Folder"
- Action:
- Create ZIP of entire logs/ directory
- Encrypt ZIP with public key
- Save as
logs/encrypted/gromozeka-logs-[timestamp].enc
- Open encrypted/ folder in file manager
- Behavior: Shows progress indicator during encryption
- Success: Toast notification + auto-open result folder
- Error: Error dialog with details
Button 3: "Clear All Logs"
- Action: Delete all files in logs/ directory
- Behavior: Confirmation dialog before deletion
- Position: Bottom of section with warning styling
Technical Implementation Details
Encryption Service
class LogEncryptionService {
fun encryptLogsFolder(): File {
// 1. ZIP logs/ directory
// 2. Encrypt with embedded public key
// 3. Save to logs/encrypted/
// 4. Return encrypted file
}
}
Key Management
- One-time generation: Developer runs key generation script locally
- Public key: Embedded in JAR (
/keys/public.pem)
- Private key:
keys/private.pem in repo root (gitignored)
- Algorithm: RSA 4096-bit for hybrid encryption
File Structure After Encryption
logs/
├── dev.log # Cleaned logs
├── session-abc123.jsonl # Cleaned session logs
├── screenshot.png # User-added files
└── encrypted/
└── gromozeka-logs-20240115-143022.enc # Encrypted bundle
Settings UI Layout
[Logging]
┌─────────────────────────────────┐
│ 📁 [Open Logs Folder] │ ← Opens logs/
├─────────────────────────────────┤
│ 🔒 [Encrypt Logs Folder] │ ← Creates encrypted bundle
├─────────────────────────────────┤
│ 🗑️ [Clear All Logs] │ ← Deletes all log files
└─────────────────────────────────┘
Privacy & Security Guarantees
- ✅ No conversation content in logs (user or AI messages)
- ✅ Full file paths preserved (encrypted anyway)
- ✅ Only developer can decrypt logs
- ✅ User explicit control over encryption timing
- ✅ Local encryption only - no network transmission
Success Criteria
Developer Decryption Workflow
# Decrypt received logs from GitHub issue
cd keys/
openssl rsautl -decrypt -inkey private.pem -in gromozeka-logs-*.enc -out logs.zip
unzip logs.zip
# Analyze full logs with complete context
Files to Update
🤖 Generated with Claude Code
🔒 Secure Bug Reporting with Encrypted Logs
Problem
Users want to report bugs with detailed logs, but logs may contain sensitive information (conversation content, file paths, project names). Currently no secure way to share debug information.
Solution
Implement log encryption system allowing users to:
User Workflow
Implementation Plan
Phase 1: Log Cleanup 🧹
sendMessage()calls)Phase 2: Encryption Infrastructure 🔐
src/main/resources/keys/public.pemkeys/private.pem(add to .gitignore)Phase 3: Settings UI 🎨
Add new "Logging" section to Settings panel with specific buttons:
Button 1: "Open Logs Folder"
Desktop.open(File("logs/"))Button 2: "Encrypt Logs Folder"
logs/encrypted/gromozeka-logs-[timestamp].encButton 3: "Clear All Logs"
Technical Implementation Details
Encryption Service
Key Management
/keys/public.pem)keys/private.pemin repo root (gitignored)File Structure After Encryption
Settings UI Layout
Privacy & Security Guarantees
Success Criteria
StreamLoggerand session logsDeveloper Decryption Workflow
Files to Update
StreamLogger.kt- remove message loggingSession.kt- clean message persistencelogback-spring.xml- remove sensitive log categoriesSettingsPanel.kt- add logging section UI.gitignore- addkeys/private.pem🤖 Generated with Claude Code