Skip to content

Conversation

@erwindon
Copy link
Owner

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

To fix the issue, ensure that all untrusted data concatenated into the html variable is properly escaped using the _escapeHtml method. This involves identifying all instances where untrusted data flows into html and applying _escapeHtml to sanitize the data. Specifically, the cmd variable and any other untrusted inputs should be escaped before being used in HTML strings.

Changes are required in the following areas:

  1. Ensure that cmd is escaped before being concatenated into html on line 313.
  2. Review all other instances where untrusted data is concatenated into html and apply _escapeHtml as needed.

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

@erwindon erwindon self-assigned this Jun 10, 2025
…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 23:25
@erwindon erwindon merged commit 161167f into master Jun 10, 2025
8 checks passed
@erwindon erwindon deleted the alert-autofix-13 branch June 10, 2025 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants