fix(security): 2 improvements across 2 files#1843
Open
tomaioo wants to merge 2 commits intolinuxfoundation:mainfrom
Open
fix(security): 2 improvements across 2 files#1843tomaioo wants to merge 2 commits intolinuxfoundation:mainfrom
tomaioo wants to merge 2 commits intolinuxfoundation:mainfrom
Conversation
- Security: Unvalidated external URL used for navigation (possible `javascript:` URL XSS/phishing) - Security: Third-party script loaded from CDN without Subresource Integrity (SRI) Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
- Security: Unvalidated external URL used for navigation (possible `javascript:` URL XSS/phishing) - Security: Third-party script loaded from CDN without Subresource Integrity (SRI) Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
fix(security): 2 improvements across 2 files
Problem
Severity:
Medium| File:frontend/app/components/modules/project/components/community/card-displays/default-card.vue:L8The component binds
mention.urldirectly into a link target (:to="mention.url") for a clickable card. Ifmention.urlis sourced from external/untrusted data, an attacker could supply a malicious URL (e.g.,javascript:...or a deceptive phishing URL), leading to script execution on click in some contexts or user redirection to attacker-controlled sites.Solution
Validate and normalize URLs before binding. Allow only
http:andhttps:protocols via a helper (e.g.,new URL(url)+ protocol allowlist), and fallback to#/disabled state for invalid values. Consider centralizing this in asafeExternalUrl()utility used by all community-card link renderers.Changes
frontend/app/components/modules/project/components/community/card-displays/default-card.vue(modified)frontend/.storybook/preview-head.html(modified)