Commit 0557f84
feat: Release v3.5.0 - Memory API Security Hardening
## Security Hardening
- Input validation for pattern IDs, agent IDs, and classifications
- Prevents path traversal attacks (../, ..\)
- Validates format with regex patterns
- Rejects null bytes and dangerous characters
- API Key authentication (Bearer token or X-API-Key header)
- Set via --api-key CLI flag or EMPATHY_MEMORY_API_KEY env var
- Constant-time comparison using SHA-256 hash
- Rate limiting (default: 100 requests/minute per IP)
- Configurable via --rate-limit and --no-rate-limit CLI flags
- Returns X-RateLimit-Remaining and X-RateLimit-Limit headers
- HTTPS support via --ssl-cert and --ssl-key CLI flags
- CORS restricted to localhost by default (configurable via --cors-origins)
- Request body size limit (1MB) prevents DoS attacks
## Memory Control Panel
- View Patterns button displays pattern list with classification badges
- Project-level auto_start_redis config in empathy.config.yml
- Visual feedback for button actions (Check Status, Export)
- Fixed config key mismatch (empathyMemory → empathy.memory)
- Fixed API response parsing for Redis status display
## Tests
- Added 37 unit tests for security features
- Input validation, rate limiting, API key auth tests
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent 10d6c3e commit 0557f84
File tree
10 files changed
+1158
-64
lines changed- src/empathy_os/memory
- tests
- vscode-extension
- src
- panels
- services
- webview
10 files changed
+1158
-64
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
9 | 56 | | |
10 | 57 | | |
11 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
21 | 63 | | |
22 | 64 | | |
23 | 65 | | |
24 | 66 | | |
25 | 67 | | |
| 68 | + | |
| 69 | + | |
26 | 70 | | |
27 | 71 | | |
28 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| 382 | + | |
| 383 | + | |
382 | 384 | | |
383 | 385 | | |
384 | 386 | | |
| |||
0 commit comments