Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential fix for code scanning alert no. 11: Unsafe HTML constructed from library input #68

Merged
merged 1 commit into from
Mar 19, 2025

Conversation

ChrisChilders-USDA
Copy link
Collaborator

Potential fix for https://github.com/i5k/i5k.github.io/security/code-scanning/11

To fix the problem, we need to ensure that any HTML content constructed from user input is properly sanitized before being inserted into the DOM. This can be achieved by using a library like DOMPurify to sanitize the HTML content.

  1. Import the DOMPurify library.
  2. Use DOMPurify to sanitize the template variable before inserting it into the DOM.

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

… from library input

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@ChrisChilders-USDA ChrisChilders-USDA marked this pull request as ready for review March 19, 2025 12:59
@ChrisChilders-USDA ChrisChilders-USDA merged commit 1c28e80 into master Mar 19, 2025
3 checks passed
@ChrisChilders-USDA ChrisChilders-USDA deleted the alert-autofix-11 branch March 19, 2025 13:00
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