Skip to content

🐛 Validate remaining dynamic hrefs with sanitizeUrl#13987

Merged
kubestellar-hive[bot] merged 1 commit into
mainfrom
fix/13985-validate-remaining-hrefs
May 16, 2026
Merged

🐛 Validate remaining dynamic hrefs with sanitizeUrl#13987
kubestellar-hive[bot] merged 1 commit into
mainfrom
fix/13985-validate-remaining-hrefs

Conversation

@kubestellar-hive
Copy link
Copy Markdown
Contributor

Fixes #13985

Apply sanitizeUrl() to the 3 remaining unvalidated dynamic href attributes that render API-provided URLs without validation:

File Variable Source
ClusterHealth.tsx consoleUrl Cluster API data via getConsoleUrl()
UpdateSettings.tsx latestRelease.url GitHub Releases API
NightlyE2EStatus.tsx logsUrl, workflowUrl Nightly E2E API / constructed from API data

This prevents potential XSS via javascript: URIs if an upstream API is compromised. Uses the existing sanitizeUrl() utility (allowlist-based: http/https only) already used elsewhere in the same files.

…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>
Copilot AI review requested due to automatic review settings May 16, 2026 00:39
Copy link
Copy Markdown
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label May 16, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 16, 2026

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit ecea1b6
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6a07bca686ac7f000856de87
😎 Deploy Preview https://deploy-preview-13987.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kubestellar-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions
Copy link
Copy Markdown
Contributor

👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@github-actions github-actions Bot added tier/2-standard ai-generated Pull request generated by AI labels May 16, 2026
@kubestellar-prow kubestellar-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 16, 2026
@github-actions
Copy link
Copy Markdown
Contributor

✅ Test Coverage Check

All new source files in this PR have corresponding test files.

Checked web/src/hooks/ and web/src/components/ against origin/main.

@kubestellar-hive
Copy link
Copy Markdown
Contributor Author

sec-check ✅ — All 5 dynamic hrefs now pass through sanitizeUrl(). Import verified on PR branch. Allowlist-based sanitizer is sound (scheme-check via new URL() + explicit allowlist). No security concerns. LGTM from sec perspective.

@kubestellar-hive kubestellar-hive Bot merged commit b6b1c6a into main May 16, 2026
40 of 41 checks passed
@kubestellar-prow kubestellar-prow Bot deleted the fix/13985-validate-remaining-hrefs branch May 16, 2026 01:01
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

@github-actions
Copy link
Copy Markdown
Contributor

Post-merge build verification passed

Both Go and frontend builds compiled successfully against merge commit b6b1c6aff95d9baf51b2caf3e25890b3ef60d409.

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

Labels

ai-generated Pull request generated by AI copilot dco-signoff: yes Indicates the PR's author has signed the DCO. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. tier/2-standard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 3 remaining unvalidated dynamic hrefs from API data (ClusterHealth, UpdateSettings, NightlyE2EStatus)

1 participant