This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
fix: LEAP-444: Implement HTML sanitization in LSF #1651
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Dec 27, 2023
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1651 +/- ##
==========================================
+ Coverage 68.28% 68.30% +0.01%
==========================================
Files 443 443
Lines 28690 28693 +3
Branches 7630 7630
==========================================
+ Hits 19592 19598 +6
+ Misses 7846 7844 -2
+ Partials 1252 1251 -1 ☔ View full report in Codecov by Sentry. |
/git merge master
|
hlomzik
approved these changes
Dec 28, 2023
/git merge master
|
MasherJames
pushed a commit
to HelloPareto/label-studio-frontend
that referenced
this pull request
Feb 29, 2024
* fix: LEAP-444: Implement HTML sanitization in LSF
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR fulfills these requirements
[fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made
ex.fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
Change has impacts in these area(s)
(check all that apply)
Describe the reason for change
The primary goal of this PR is to enhance the security and integrity of the Label Studio Frontend (LSF) by introducing HTML sanitization across all components. This effort is in response to the need for a secure environment that effectively neutralizes potential security threats in HTML inputs while maintaining essential functionalities and user experience.
What does this fix?
This PR specifically addresses the issue of Cross-Site Scripting (XSS) vulnerabilities in the Label Studio Frontend by implementing proper HTML sanitization in all components that use
dangerouslySetInnerHTML
. The changes ensure that any HTML content rendered through dangerouslySetInnerHTML is thoroughly sanitized, thereby preventing the execution of malicious scripts or XSS attacks. This enhancement significantly strengthens the security of the application, safeguarding it against common web vulnerabilities associated with improper handling of HTML content.What libraries were added/updated?
none
Does this change affect performance?
no
Does this change affect security?
Yes. This PR significantly enhances security by implementing HTML sanitization in components using dangerouslySetInnerHTML. It mitigates Cross-Site Scripting (XSS) risks by neutralizing malicious scripts in HTML content, ensuring safer handling of HTML in the application. This proactive approach not only prevents XSS attacks but also sets a higher standard for future security practices in the Label Studio Frontend.
What alternative approaches were there?
no
What feature flags were used to cover this change?
fflag_fix_front_leap_444_html_sanitization_lsf_components
Does this PR introduce a breaking change?
(check only one)
What level of testing was included in the change?
(check all that apply)