diff --git a/.jules/sentinel.md b/.jules/sentinel.md index 08e5bfbd..7f07c72c 100644 --- a/.jules/sentinel.md +++ b/.jules/sentinel.md @@ -1,9 +1,4 @@ -## 2025-02-18 - Custom Regex Sanitization Risks -**Vulnerability:** The codebase used a custom regex-based implementation (`lib/security/sanitize-html.ts`) for HTML sanitization, which is fragile and prone to XSS bypasses (e.g. unquoted attributes). -**Learning:** Developers often underestimate the complexity of HTML parsing. Relying on custom regex creates a false sense of security. -**Prevention:** Always use established, battle-tested libraries like `isomorphic-dompurify` for HTML sanitization. Ensure `jsdom` is added as a production dependency for `isomorphic-dompurify` to work correctly in SSR environments. - -## 2025-03-08 - Unsafe SVG Rendering via dangerouslySetInnerHTML -**Vulnerability:** User-controlled SVG strings (`avatar.svg_data`) were being injected directly into the DOM using `dangerouslySetInnerHTML`. An attacker could inject an SVG containing embedded malicious `