MAESTRO: Add DOMPurify XSS defense-in-depth to TerminalPreview (closes PR #896)

PR #896 identified a valid XSS concern in TerminalPreview.tsx but was
broken (missing DOMPurify import and dependency). The existing
escapeXML:true on AnsiToHtml already mitigates the vector, but
DOMPurify adds defense-in-depth sanitization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2026-02-05 18:14:46 -05:00
parent e6af8d207a
commit d0b4c7ee59
5 changed files with 27 additions and 14 deletions
+2
View File
@@ -99,6 +99,7 @@
"@anthropic-ai/claude-agent-sdk": "^0.1.76",
"@modelcontextprotocol/sdk": "^1.25.1",
"ansi-to-html": "^0.7.2",
"dompurify": "^3.3.1",
"express": "^4.18.2",
"glob": "^11.0.3",
"handlebars": "^4.7.8",
@@ -109,6 +110,7 @@
},
"devDependencies": {
"@types/cors": "^2.8.19",
"@types/dompurify": "^3.0.5",
"@types/express": "^4.17.21",
"@types/node": "^20.0.0",
"@types/react": "^18.3.5",