Skip to content

🔒 Replace unsafe innerHTML assignments with textContent in options.js#37

Open
cmuench wants to merge 1 commit intomainfrom
security-fix-innerhtml-options-1454202543036630404
Open

🔒 Replace unsafe innerHTML assignments with textContent in options.js#37
cmuench wants to merge 1 commit intomainfrom
security-fix-innerhtml-options-1454202543036630404

Conversation

@cmuench
Copy link
Contributor

@cmuench cmuench commented Mar 11, 2026

This security fix addresses the use of innerHTML for clearing element content in options/options.js.

🎯 What: Replaced innerHTML = "" with textContent = "" in three locations within options/options.js.
⚠️ Risk: While using innerHTML = "" is generally safe, it can trigger HTML parsers and is often flagged as a security vulnerability (Unsafe Assignment to innerHTML) by automated scanners and browser extension review processes.
🛡️ Solution: Used textContent = "" which is the standard, secure way to clear an element's content without invoking the HTML parser. Also removed a redundant manual removal loop to simplify the code.


PR created automatically by Jules for task 1454202543036630404 started by @cmuench

…tions.js

This change replaces assignments to innerHTML with textContent when
clearing element content in options.js. This addresses a security
vulnerability related to unsafe DOM manipulation and follows best
practices for browser extensions to prevent potential XSS and pass
automated security reviews.

Affected elements:
- webhook-list
- groups-list
- variables-autocomplete

Redundant node removal loops were also removed in favor of the more
efficient textContent = "" approach.

Co-authored-by: cmuench <211294+cmuench@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant