Skip to content

fix: implement HTML escaping for Markdown strings in report generation#1734

Merged
YamatoSecurity merged 1 commit intomainfrom
fix-xss
Jan 31, 2026
Merged

fix: implement HTML escaping for Markdown strings in report generation#1734
YamatoSecurity merged 1 commit intomainfrom
fix-xss

Conversation

@fukusuket
Copy link
Collaborator

@fukusuket fukusuket commented Jan 31, 2026

What Changed

  • Implement HTML escaping for Markdown strings in report generation

Evidence

Integration-Test

I’d appreciate it if you could check it when you have time🙏

@fukusuket fukusuket requested a review from Copilot January 31, 2026 01:18
@fukusuket fukusuket self-assigned this Jan 31, 2026
@fukusuket fukusuket added the bug Something isn't working label Jan 31, 2026
@fukusuket fukusuket marked this pull request as ready for review January 31, 2026 01:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR attempts to implement HTML escaping for Markdown strings in HTML report generation. The implementation adds a new html_escape function that escapes HTML entities and applies this escaping to the Markdown string before it is parsed by pulldown-cmark.

Changes:

  • Added html_escape function to escape HTML entities (<, >, &, ", ')
  • Applied HTML escaping to Markdown string before passing to pulldown-cmark parser

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@YamatoSecurity YamatoSecurity left a comment

Choose a reason for hiding this comment

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

@fukusuket LGTM! Thanks so much!

@YamatoSecurity YamatoSecurity merged commit 022cc95 into main Jan 31, 2026
20 checks passed
@fukusuket fukusuket deleted the fix-xss branch January 31, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants