Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: sanitize mermaid diagrams to prevent XSS (#2900)

Louis Beaumont3405e9793a2d
diff --git a/apps/screenpipe-app-tauri/components/rewind/mermaid-diagram.tsx b/apps/screenpipe-app-tauri/components/rewind/mermaid-diagram.tsx
index a47e75bca..3e344a33a 100644
--- a/apps/screenpipe-app-tauri/components/rewind/mermaid-diagram.tsx
+++ b/apps/screenpipe-app-tauri/components/rewind/mermaid-diagram.tsx
@@ -80,7 +80,7 @@ export function MermaidDiagram({ chart, className }: MermaidDiagramProps) {
mermaid.initialize({
startOnLoad: false,
- securityLevel: "loose",
+ securityLevel: "strict",
suppressErrorRendering: true,
...theme,
});