Jason Woltje
01639fff95
feat(#285): Add input sanitization for XSS prevention
Security improvements:
- Create sanitization utility using sanitize-html library
- Add @Sanitize() and @SanitizeObject() decorators for DTOs
- Apply sanitization to vulnerable fields:
- Connection rejection/disconnection reasons
- Connection metadata
- Identity linking metadata
- Command payloads
- Remove script tags, event handlers, javascript: URLs
- Prevent data exfiltration, CSS-based XSS, SVG-based XSS
Changes:
- Add sanitize.util.ts with recursive sanitization functions
- Add sanitize.decorator.ts for class-transformer integration
- Update connection.dto.ts with sanitization decorators
- Update identity-linking.dto.ts with sanitization decorators
- Update command.dto.ts with sanitization decorators
- Add comprehensive test coverage including attack vectors
Part of M7.1 Remediation Sprint P1 security fixes.
Fixes #285
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-03 21:47:32 -06:00
..
2026-02-03 21:47:32 -06:00
2026-02-04 03:08:09 +00:00
2026-02-03 19:53:09 -06:00
2026-02-03 14:37:06 -06:00
2026-02-03 20:47:41 -06:00
2026-02-03 20:47:41 -06:00
2026-02-03 13:30:16 -06:00
2026-02-03 13:30:16 -06:00
2026-02-03 21:32:47 -06:00
2026-02-03 21:32:47 -06:00
2026-02-03 21:43:01 -06:00
2026-02-03 21:43:01 -06:00
2026-02-03 21:35:15 -06:00
2026-02-03 21:35:15 -06:00
2026-02-03 13:45:00 -06:00
2026-02-03 13:45:00 -06:00
2026-02-03 13:45:00 -06:00
2026-02-03 13:45:00 -06:00
2026-02-04 03:08:09 +00:00
2026-02-04 03:08:09 +00:00
2026-02-03 16:50:06 -06:00
2026-02-03 20:07:49 -06:00
2026-02-03 14:51:59 -06:00
2026-02-03 20:35:00 -06:00
2026-02-03 21:43:01 -06:00
2026-02-03 21:33:57 -06:00
2026-02-03 21:33:57 -06:00
2026-02-04 03:08:09 +00:00
2026-02-03 21:36:31 -06:00
2026-02-03 21:36:31 -06:00
2026-02-03 12:55:37 -06:00
2026-02-03 16:50:06 -06:00
2026-02-03 12:55:37 -06:00
2026-02-03 12:55:37 -06:00
2026-02-03 19:53:09 -06:00
2026-02-03 16:50:06 -06:00
2026-02-03 16:50:06 -06:00
2026-02-03 13:12:12 -06:00
2026-02-03 13:12:12 -06:00
2026-02-03 21:32:47 -06:00
2026-02-03 21:32:47 -06:00
2026-02-03 21:43:01 -06:00
2026-02-03 21:43:01 -06:00