🐛 Validate remaining dynamic hrefs with sanitizeUrl#13987
Conversation
…pdateSettings, NightlyE2EStatus) Apply sanitizeUrl() to 3 remaining unvalidated dynamic href attributes that render API-provided URLs without validation: - ClusterHealth.tsx: consoleUrl from cluster API data - UpdateSettings.tsx: latestRelease.url from GitHub Releases API - NightlyE2EStatus.tsx: logsUrl (from run.htmlUrl) and workflowUrl (constructed from guide.repo/workflowFile) This prevents potential XSS via javascript: URIs if an upstream API is compromised. Fixes #13985 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: kubestellar-bot <kubestellar-bot@kubestellar.io>
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!
This is an automated message. |
✅ Test Coverage CheckAll new source files in this PR have corresponding test files. Checked |
|
sec-check ✅ — All 5 dynamic hrefs now pass through |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
|
Post-merge build verification passed ✅ Both Go and frontend builds compiled successfully against merge commit |
Fixes #13985
Apply
sanitizeUrl()to the 3 remaining unvalidated dynamic href attributes that render API-provided URLs without validation:ClusterHealth.tsxconsoleUrlgetConsoleUrl()UpdateSettings.tsxlatestRelease.urlNightlyE2EStatus.tsxlogsUrl,workflowUrlThis prevents potential XSS via
javascript:URIs if an upstream API is compromised. Uses the existingsanitizeUrl()utility (allowlist-based: http/https only) already used elsewhere in the same files.