Skip to content

Conversation

@Dargon789
Copy link
Owner

Fixes https://github.com/Dargon789/hardhat/security/code-scanning/21

To fix the problem, we should replace the custom regular expression with a well-tested sanitization library. This will ensure that all edge cases are handled correctly and that the input is thoroughly sanitized. The sanitize-html library is a popular choice for this purpose.

  1. Install the sanitize-html library.
  2. Replace the custom regex-based sanitization with a call to sanitize-html.

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

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@Dargon789 Dargon789 marked this pull request as ready for review October 20, 2024 17:15
Signed-off-by: Legion's  <64915515+Dargon789@users.noreply.github.com>
@Dargon789 Dargon789 merged commit e7a2e24 into main Oct 27, 2024
2 of 12 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 26, 2025
Repository owner unlocked this conversation Oct 21, 2025
@Dargon789 Dargon789 self-assigned this Oct 21, 2025
Copy link
Owner Author

@Dargon789 Dargon789 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix code scanning alert no. 21: Incomplete multi-character sanitization#10

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

Projects

Archived in project
Status: Todo

Development

Successfully merging this pull request may close these issues.

PR diff clean v-next hardhat full debug main to main use vercel bot diff clean --force

2 participants