Skip to content

Conversation

@erwindon
Copy link
Owner

Potential fix for https://github.com/erwindon/SaltGUI/security/code-scanning/13

To fix the issue, all untrusted data concatenated into the html string must be sanitized using _escapeHtml before being assigned to innerHTML. This ensures that any potentially malicious characters are properly escaped, preventing them from being interpreted as HTML. Specifically:

  1. Apply _escapeHtml to all dynamic data (e.g., cmd and pageTitle) before concatenating it into the html string.
  2. Ensure consistent sanitization across all paths leading to innerHTML.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…as HTML

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@sonarqubecloud
Copy link

@erwindon erwindon marked this pull request as ready for review June 10, 2025 22:58
@erwindon erwindon merged commit a37b3c0 into master Jun 10, 2025
8 checks passed
@erwindon erwindon deleted the alert-autofix-13 branch June 10, 2025 23:16
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.

2 participants