Repository navigation
🔒 Fix XSS vulnerability with DOMPurify - #105
google-labs-jules[bot] wants to merge 1 commit into
Conversation
Sanitize HTML before assigning to innerHTML.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Two problems. First, it does not work: the PR vendors Closing as part of triaging the open PRs against #109, which restructures the extension (it removes the |
Understood. Acknowledging that this work is now obsolete and stopping work on this task. |
🎯 What: This PR fixes a Cross-Site Scripting (XSS) vulnerability in
⚠️ Risk: The previous reliance on a simple
extension/sidepanel/sidepanel.jswhere dynamically generated audit and dossier HTML is inserted viainnerHTMLwithout proper, robust sanitization.escapeHtmlfunction did not adequately protect against all XSS vectors, leaving the extension vulnerable if malicious structured data were rendered, leading to execution of untrusted scripts in the extension context.🛡️ Solution: Integrated DOMPurify 3.0.6 (served locally as
purify.min.js) and wrapped all.innerHTMLassignments withDOMPurify.sanitize(). This provides a secure and robust method for rendering safe HTML while removing any malicious payload vectors. Test assertions were also updated to ensurepurify.min.jsremains present in the extension bundle.PR created automatically by Jules for task 18098757636375171575 started by @savvides