Commit 38a7002
committed
fix(security): sanitize user-controlled data in logs to prevent log injection
- Use sanitize_log_data() for all user-controlled data before logging
- Sanitize tool_id and message parameters in MCP router
- Sanitize message text in MCP planner graph timeout and routing logs
- Use sanitize_error_message() for HTTP error responses
- Prevents log injection attacks by encoding suspicious data in base64
- Addresses SonarQube security warnings for log injection vulnerabilities1 parent 5301855 commit 38a7002
2 files changed
Lines changed: 22 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
775 | 776 | | |
776 | 777 | | |
777 | 778 | | |
| 779 | + | |
| 780 | + | |
778 | 781 | | |
779 | | - | |
| 782 | + | |
780 | 783 | | |
781 | 784 | | |
782 | | - | |
| 785 | + | |
783 | 786 | | |
784 | 787 | | |
785 | 788 | | |
| |||
1556 | 1559 | | |
1557 | 1560 | | |
1558 | 1561 | | |
| 1562 | + | |
| 1563 | + | |
1559 | 1564 | | |
1560 | 1565 | | |
1561 | | - | |
| 1566 | + | |
1562 | 1567 | | |
1563 | 1568 | | |
1564 | 1569 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
233 | | - | |
234 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
235 | 241 | | |
236 | 242 | | |
237 | 243 | | |
| |||
253 | 259 | | |
254 | 260 | | |
255 | 261 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
260 | 268 | | |
261 | 269 | | |
262 | 270 | | |
| |||
0 commit comments