sa-doc
Audited by Socket on Aug 30, 2026
1 alert found:
AnomalyNo clear indicators of direct Python-based malware (e.g., backdoor, exfiltration, or process tampering) are visible in this fragment. However, the module materially increases security risk by generating an HTML page that executes JavaScript in a browser context: it loads Marked and Mermaid from public CDNs without integrity/pinning controls, renders untrusted Markdown through marked.parse(raw) without explicit sanitization, and (most critically) can embed and execute attacker-controlled inline JavaScript via --marked-js/--mermaid-js. If an attacker can influence the Markdown content or the optional JS override files, or if the CDN dependencies are compromised, the headless browser used for PDF generation will execute that code during rendering.