Skip to content

Harden ReactMarkdown rendering against javascript: URI injection#17151

Draft
Copilot wants to merge 7674 commits into
mainfrom
copilot/sec-checkreact-markdown-xss-fix
Draft

Harden ReactMarkdown rendering against javascript: URI injection#17151
Copilot wants to merge 7674 commits into
mainfrom
copilot/sec-checkreact-markdown-xss-fix

Conversation

Copilot AI commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Adding or modifying a card/dashboard? Read the Card Development Guide first — it covers required patterns, common pitfalls, and the full file checklist.

New CNCF project card? New cards go in kubestellar/console-marketplace, not this repo. PRs adding new cards here will be redirected.

Use a coding agent. This repo is primarily developed with Claude Code (Opus 4.5/4.6). It knows all codebase patterns (isDemoData, useCardLoadingState, locale strings, DCO). Manual PRs that miss required patterns will be sent back.

📝 Summary of Changes

Five markdown render paths accepted untrusted content without a sanitize pass, allowing javascript: link payloads to survive into rendered output. This PR aligns those paths with the repo’s existing secure markdown pattern by enforcing rehype-sanitize (and GFM in MessageBubble).

  • Security hardening
    • Added rehypePlugins={[rehypeSanitize]} to ReactMarkdown in:
      • web/src/components/stellar/MessageBubble.tsx
      • web/src/components/updates/WhatsNewModal.tsx (all render sites)
      • web/src/components/feedback/SubmitTab.tsx
      • web/src/components/feedback/FeedbackDialogs.tsx
  • Markdown parity in chat surface
    • Added remarkPlugins={[remarkGfm]} in MessageBubble.tsx for consistent markdown behavior on Stellar responses.
  • Scope verification
    • ExecutiveAnalysis.tsx already had rehypeSanitize; no code change was required there.
// before
<ReactMarkdown>{msg.content}</ReactMarkdown>

// after
<ReactMarkdown remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeSanitize]}>
  {msg.content}
</ReactMarkdown>

Changes Made

  • Updated ReactMarkdown usage in vulnerable components to include rehype-sanitize
  • Refactored MessageBubble markdown config to include remark-gfm + sanitize pipeline
  • Fixed unsafe markdown link rendering path for untrusted content sources
  • Added tests for MessageBubble to assert javascript: links are not rendered as clickable links

Checklist

Please ensure the following before submitting your PR:

  • I used a coding agent (Claude Code, Copilot, Gemini, or Codex) to generate/review this code
  • I have reviewed the project's contribution guidelines
  • New cards target console-marketplace, not this repo
  • isDemoData is wired correctly (cards show Demo badge when using demo data)
  • I have written unit tests for the changes (if applicable)
  • I have tested the changes locally and ensured they work as expected
  • All commits are signed with DCO (git commit -s)

Screenshots or Logs (if applicable)

N/A (security behavior change in markdown rendering; no UI layout change).


👀 Reviewer Notes

  • ExecutiveAnalysis.tsx was included in the finding, but already uses rehypeSanitize; this PR leaves it unchanged intentionally.
  • Focus is strictly on sanitization coverage and minimal risk surface.

kubestellar-hive Bot and others added 30 commits June 2, 2026 16:30
Pin all remaining mutable reusable workflow references in GitHub
Actions workflows to a specific kubestellar/infra commit SHA to
avoid trusting a floating @main ref at runtime.

Fixes #16445

Signed-off-by: kubestellar-hive <hive-bot@kubestellar.io>
Co-authored-by: kubestellar-hive <hive-bot@kubestellar.io>
…16463)

pollBackendHealth, and ensureTLSCert covering the key risk areas
identified in the coverage gap analysis.

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add tests for client_pods, client_nodes, client_rbac, and client_watch
using fake clientset pattern already established in the package.

Signed-off-by: kubestellar-hive <hive-bot@kubestellar.io>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add test coverage for the highest-priority untested handlers:
- auth_oauth_test.go: OAuth redirect, callback, token exchange
- sse_handler_test.go: SSE connection lifecycle and event streaming

Part of the broader handler coverage effort (#16429).

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* 🌱 Extract Stellar domain types to pkg/stellar

Moves Stellar domain types from pkg/store to pkg/stellar/types.go,
establishing correct package ownership. The store package now uses
type aliases for backwards compatibility, avoiding the need to update
all call sites immediately.

This is the first step toward separating Stellar business logic from
persistence, addressing the architectural issue where pkg/stellar
cannot be tested in isolation and domain types are defined in the
wrong package.

Changes:
- Created pkg/stellar/types.go with 13 Stellar domain types
- Updated pkg/store/store.go to use type aliases referencing stellar package
- Maintains full backwards compatibility — no breaking changes
- All tests pass

Related to separation of concerns and preparing for future extraction
of Stellar to a standalone service.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 🌱 Add minimal tests for pkg/stellar types

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…6504)

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add an RFC that defines plugin scope, extension points, security constraints, and a phased implementation plan for evolving console-marketplace toward installable extensions.

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* 🔒 Restrict agent token endpoint to admin users only

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 🌱 Add unit tests for agent token admin authorization

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* 🔒 Restrict agent auto-update proxy to admin users

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 🌱 Add unit tests for auto-update proxy admin authorization

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
#16489)

* 🐛 Fix predictable /tmp paths in cmd/watcher to prevent symlink attacks

Replace hardcoded /tmp paths with os.MkdirTemp/os.CreateTemp for unpredictable temporary file paths. Set restrictive permissions (0600/0700) and ensure proper cleanup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com>

* 🌱 Add unit tests for secure temp directory creation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Rename pkg/kagenti_provider → pkg/kagentiprovider (Go naming convention)
- Add README.md to pkg/agent, pkg/kagent, pkg/kagentiprovider documenting boundaries
- Update all imports and type references
- Addresses issue #16430: agent package fragmentation

The rename follows Go package naming conventions (no underscores).
README files clarify the three-package architecture:
- pkg/agent: Primary agent orchestration and provider abstraction
- pkg/kagent: Client for standalone kc-agent binary (local process)
- pkg/kagentiprovider: Client for in-cluster kagenti deployments (K8s-native)

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…6566)

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Use sandboxed iframe with sandbox="" attribute instead of opening blob URL
- Fetch circuit HTML server-side in modal instead of exposing blob URL in same origin
- Add CSP and X-Content-Type-Options headers to quantum proxy
- Prevents CWE-79 XSS vulnerability from malicious upstream quantum services

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* 🔒 Restrict rate-limit status endpoint to admin users

Adds admin authorization check to GetRateLimitStatus handler to prevent
information disclosure of user IDs and IP addresses to non-admin users.

Fixes #16481 (CWE-862: Missing Authorization)

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore: retrigger CI after Docker registry timeout

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix(admin): update test for NewAdminHandler store.Store parameter

Signed-off-by: kubestellar-hive <hive-bot@kubestellar.io>

---------

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: kubestellar-hive <hive-bot@kubestellar.io>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: kubestellar-hive <hive-bot@kubestellar.io>
…6524)

* 🔒 Restrict NPS endpoint to prevent unauthorized feedback exposure

- Removes user feedback comments from public GET /api/nps endpoint
- Feedback field no longer exposed in recent responses array
- Maintains aggregate NPS metrics for dashboard functionality
- Feedback comments may contain PII (emails, incident details, internal URLs)
- Admin endpoint with proper authorization required to access raw feedback

Fixes #16486

Security Impact:
- CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
- CWE-862: Missing Authorization
- Prevents unauthorized access to user-submitted feedback with potential PII

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore: retrigger CI after Docker registry timeout

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…16535)

* 🔒 Require editor-or-admin role on stellar actions execute endpoint

Add requireEditorOrAdmin check to ExecuteAction handler so that
viewer-role users can no longer invoke destructive K8s operations
(DeletePod, ScaleDeployment, RestartDeployment, CordonNode).

Also removes a duplicate RequireAdmin declaration in auth_helpers.go
that was introduced by a recent commit and broke compilation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 🌱 Add RBAC tests for stellar actions execute endpoint

Tests verify that viewer role is rejected (403) and editor/admin
roles are permitted on POST /api/stellar/actions/execute.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* 🌱 Extract cmd/watcher business logic into pkg/watcher

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 🐛 Fix Kagenti provider import alias

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 🌱 Fix service exports handler test expectations

Reset the test kubeconfig before injecting ServiceExport clusters so\nListServiceExports only probes the fake clusters configured by the\ntest. This avoids the placeholder test-cluster triggering a real\ndynamic client lookup and Fiber test timeout.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…#16551)

* 🔒 Fix percent-encoded path traversal bypass in missions-file function

Harden hasInvalidPathInput and hasInvalidRefInput to iteratively decode
percent-encoded values before checking for traversal patterns. Previously,
payloads like %252e%252e would bypass the literal '..' check after a
single URL decode pass.

Matches the defense-in-depth pattern already used in the Go backend's
sanitizePath function (pkg/api/handlers/missions_cache.go).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 🌱 Fix duplicate RequireAdmin declaration

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 🌱 Add unit test for percent-encoded path traversal fix

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…6529)

* 🔒 Restrict admin bootstrap to prevent unauthorized auto-promotion

Fixes #16485

Removes the privilege escalation vulnerability where any authenticated user
could be silently promoted to admin if all admins were deleted or if the
admin count reached zero.

## Security Changes

- **Removed auto-bootstrap from requireAdmin()**: The admin role check no
  longer automatically promotes users even when admin count is zero. This
  prevents privilege escalation if all admins are removed (manually, via
  bug, or via DB corruption).

- **Bootstrap now controlled via environment variable**: Added
  BOOTSTRAP_ADMIN_ALLOWED environment variable (defaults to false) to
  explicitly control whether bootstrap promotion is allowed at all.

- **Bootstrap only during initial OAuth setup**: Bootstrap promotion now
  only occurs during the initial user creation in auth_handler.go during
  OAuth login flow, not on every admin endpoint check.

## Impact

- Self-hosted consoles must set BOOTSTRAP_ADMIN_ALLOWED=true to enable
  first-user admin bootstrap during initial setup.
- Once an admin is created, the bootstrap mechanism is effectively disabled
  unless BOOTSTRAP_ADMIN_ALLOWED is explicitly set.
- If all admins are removed, no new admins can be auto-promoted.

## CWE

CWE-269: Improper Privilege Management
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore: retrigger CI after Docker registry timeout

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 🌱 Fix auth_helpers test expectations for restricted bootstrap

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* � Fix admin bootstrap to allow first-user promotion while restricting subsequent

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* 🌱 Split Store interface into focused sub-interfaces (ISP)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 🐛 Fix interface signatures to match SQLiteStore implementation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 🐛 Fix interface compliance after Store ISP split

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
)

* 🔒 Sanitize nightly E2E image parsing against prototype pollution

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore: retrigger CI after Docker registry timeout

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 🌱 Add test for nightly E2E image sanitization

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 🐛 Fix prototype pollution rejection in nested image parsing

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add requireEditorOrAdmin check to Chat and CallTool handlers so
viewer-role users can no longer invoke arbitrary kagent agents/tools
that may execute privileged Kubernetes operations.

Also removes the duplicate RequireAdmin declaration that broke build.

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: GitHub <noreply@github.com>
@kubestellar-prow

Copy link
Copy Markdown
Contributor

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

📝 Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@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 ask for approval from clubanderson. 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

@kubestellar-prow kubestellar-prow Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 6, 2026
@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Auto Test Generator

The following new files have no corresponding test file:

  • web/src/components/feedback/FeedbackDialogs.tsx
  • web/src/components/feedback/SubmitTab.tsx

Please add tests or apply the needs-tests label to track this PR.

@github-actions

github-actions Bot commented Jun 6, 2026

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.

Copilot AI changed the title [WIP] Fix XSS vulnerability in ReactMarkdown components Harden ReactMarkdown rendering against javascript: URI injection Jun 6, 2026
Copilot AI requested a review from clubanderson June 6, 2026 19:37
@github-actions github-actions Bot added the ai-needs-human AI automation unavailable - needs human intervention label Jun 6, 2026
@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Status Check — Draft PR Stalled

This draft PR has had no activity for ~1h20m (last update: 19:38 UTC, checked at 20:57 UTC), exceeding the 1-hour stuck threshold.

Current status:

  • Build / CI: ✅ All checks passing (38 checks completed successfully)
  • Draft: Still a work-in-progress draft
  • DCO signoff: ❌ Missing — commit 7cd3644 ("Initial plan") lacks Signed-off-by trailer (dco-signoff: no label set)
  • Review: Not approved, no reviewers assigned
  • Label: ai-needs-human now set

Observations:

  • The PR adds rehypeSanitize to multiple ReactMarkdown components and remarkGfm to MessageBubble
  • The only commit is "Initial plan" — it may be a planning commit without the actual code changes committed yet
  • DCO signoff is required on all commits before merging

Recommended next steps for a human maintainer:

  1. Verify whether the actual code changes were committed (the PR body describes specific file changes — check if they are present in the diff)
  2. If the changes exist but the DCO is missing, the commit needs to be amended with a Signed-off-by trailer
  3. If only a planning commit exists, the implementation may not have been completed — consider whether to restart the AI agent or close the PR

Generated by Stuck Detection Workflow · sonnet46 1M ·

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Status Check — Draft PR Stalled (2.5 Hours)

This draft PR remains stalled with no new activity. Last status check was posted at 21:00 UTC; this update is at 23:28 UTC (~2.5 hours later).

Current status:

  • Build / CI: ✅ All 38 checks passing
  • Draft: Still open as work-in-progress
  • DCO signoff: ❌ Missing — commit 7cd3644 ("Initial plan") lacks Signed-off-by trailer
  • Review: Not approved, no reviewers assigned
  • Labels: ai-needs-human already set

Summary:
This PR adds rehypeSanitize to ReactMarkdown usage in MessageBubble.tsx, WhatsNewModal.tsx, SubmitTab.tsx, and FeedbackDialogs.tsx. The build passes but the PR remains in draft with a missing DCO signoff.

Blocking issues:

  1. ❌ DCO signoff missing — the only commit needs a Signed-off-by trailer before this can merge
  2. 📝 Draft state — PR needs to be converted to ready-for-review after DCO is resolved

Recommended next steps for a human maintainer:

  1. Verify the actual security hardening changes are present in the diff (the PR body describes specific file changes)
  2. If changes are present but DCO is missing, amend the commit with a Signed-off-by trailer
  3. If only a planning commit exists with no code changes, consider restarting the AI agent or closing this PR
  4. Once DCO is resolved, convert from draft to ready-for-review and request a code review

Generated by Stuck Detection Workflow · sonnet46 1.2M ·

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Status Check — Draft PR Still Stalled (Overnight)

No new activity since the last status check (~2h52m ago at 23:31 UTC). This update is at 02:23 UTC.

Current status:

  • Build / CI: ✅ All 38 checks passing
  • Draft: Still open as work-in-progress
  • DCO signoff: ❌ Missing — commit 7cd3644 ("Initial plan") lacks Signed-off-by trailer
  • Review: Not approved, no reviewers assigned
  • Label: ai-needs-human already set

No change in state. Human review is recommended at the start of business hours.

Blocking issues (unchanged):

  1. ❌ DCO signoff missing on the only commit
  2. 📝 Still in draft state — needs conversion to ready-for-review after DCO is resolved

Recommended next steps:

  1. Verify the actual security hardening changes are in the diff (rehypeSanitize additions to MessageBubble.tsx, WhatsNewModal.tsx, SubmitTab.tsx, FeedbackDialogs.tsx)
  2. If changes are present, amend the commit with a Signed-off-by trailer to satisfy DCO
  3. If only a planning commit exists with no code, consider restarting the AI agent or closing this PR

Generated by Stuck Detection Workflow · sonnet46 934.1K ·

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Status Check — Draft PR Stalled (Morning Update, ~12 Hours)

No new activity since the last status check at 02:26 UTC (~5 hours ago). Current time: 07:31 UTC (pre-business hours).

Current status:

  • Build / CI: ✅ All 38 checks passing
  • Draft: Still open as work-in-progress
  • DCO signoff: ❌ Missing — commit 7cd3644 ("Initial plan") lacks Signed-off-by trailer
  • Review: Not approved, no reviewers assigned
  • Label: ai-needs-human already set

No change in state. This PR has now been stalled ~12 hours.

Blocking issues (unchanged):

  1. ❌ DCO signoff missing on the only commit
  2. 📝 Still in draft state — needs conversion to ready-for-review after DCO is resolved
  3. ⚠️ Unclear whether the actual security hardening code changes are present (only commit is "Initial plan")

Recommended next steps for a human maintainer at start of business hours:

  1. Inspect the PR diff to confirm whether rehypeSanitize additions to MessageBubble.tsx, WhatsNewModal.tsx, SubmitTab.tsx, and FeedbackDialogs.tsx are actually present
  2. If changes are present but DCO is missing, amend the commit with a Signed-off-by trailer
  3. If only a planning commit exists with no code, consider restarting the AI agent or closing this PR and re-opening from the linked issue

Generated by Stuck Detection Workflow · sonnet46 846.1K ·

@clubanderson

Copy link
Copy Markdown
Collaborator

This PR is superseded by #17158 which addresses the same ReactMarkdown XSS finding, is not a draft, has dco-signoff: yes, and covers all the same files. Please close this PR in favor of #17158.

— sec-check agent (ACMM L6)

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Status Check — Resolution Path Identified (~16.5 Hours)

No new activity since the human collaborator comment at 10:12 UTC (~1h53m ago). Last stuck-detection status comment was at 07:34 UTC (~4.5h ago).

Current status:

  • Build / CI: ✅ All 38 checks passing
  • Draft: Still open as work-in-progress
  • DCO signoff: ❌ Missing — commit 7cd3644 ("Initial plan") lacks Signed-off-by trailer
  • Label: ai-needs-human already set

Resolution path identified by maintainer:
At 10:12 UTC, @clubanderson noted that this PR is superseded by #17158, which:

  • Addresses the same ReactMarkdown XSS / `(redacted) URI injection finding
  • Is not a draft
  • Has dco-signoff: yes
  • Covers all the same files (MessageBubble.tsx, FeedbackDialogs.tsx, SubmitTab.tsx, WhatsNewModal.tsx)

Recommended next steps for a human maintainer:

  1. Close this PR in favor of [sec-check] fix: add rehypeSanitize to ReactMarkdown components (XSS via javascript: URIs) #17158 — the fix is already in a cleaner, ready-to-review PR
  2. Verify [sec-check] fix: add rehypeSanitize to ReactMarkdown components (XSS via javascript: URIs) #17158 has passing checks and approve/merge it to resolve the XSS finding
  3. No action is needed on this PR beyond closure

Generated by Stuck Detection Workflow · sonnet46 1.3M ·

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Status Check Update — ~18h Stalled, Resolution PR Still Awaiting Review

No new activity on this draft PR since the last status check at 12:09 UTC (~2h ago). Labels and state unchanged.

Resolution path (identified by @clubanderson at 10:12 UTC): Close this PR in favor of #17158, which addresses the same ReactMarkdown XSS/`(redacted) URI injection finding.

PR #17158 current status:

  • Checks: ✅ All meaningful checks passing (post-directions failure is a minor automated check)
  • DCO signoff: ✅ Yes
  • State: Open, not draft — ready for review
  • Last activity: 2026-06-06T22:28 UTC (~16h ago, no reviews yet)

This PR remains blocked on:

  1. ❌ DCO signoff missing on only commit (7cd3644)
  2. 📝 Still in draft state

Recommended next steps for a human maintainer:

  1. Review and approve [sec-check] fix: add rehypeSanitize to ReactMarkdown components (XSS via javascript: URIs) #17158 to resolve the XSS security finding
  2. Close this PR (Harden ReactMarkdown rendering against javascript: URI injection #17151) once [sec-check] fix: add rehypeSanitize to ReactMarkdown components (XSS via javascript: URIs) #17158 is merged or approved

Generated by Stuck Detection Workflow · sonnet46 1.2M ·

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Status Check — Stalled ~21 Hours, Resolution PR Needs Review

No activity on this draft PR since the last status check at 14:19 UTC (~2h20m ago). State unchanged.

Current status:

  • Build / CI: ✅ All 38 checks passing
  • Draft: Still open as work-in-progress
  • DCO signoff: ❌ Missing — commit 7cd3644 ("Initial plan") lacks Signed-off-by trailer
  • Label: ai-needs-human already set

Resolution path (identified by @clubanderson at 10:12 UTC on June 7):
This PR is superseded by #17158, which:

  • Addresses the same ReactMarkdown XSS / `(redacted) URI injection finding
  • Is not a draft — ready for review
  • Has dco-signoff: yes
  • Covers all the same files (MessageBubble.tsx, FeedbackDialogs.tsx, SubmitTab.tsx, WhatsNewModal.tsx)

⚠️ PR #17158 also needs attention: It was created ~18 hours ago and has had no review activity since 22:28 UTC on June 6. It is open, not draft, DCO-signed, but unreviewed.

Recommended next steps for a human maintainer:

  1. Review and merge (or approve) [sec-check] fix: add rehypeSanitize to ReactMarkdown components (XSS via javascript: URIs) #17158 to resolve this security finding
  2. Close this PR (Harden ReactMarkdown rendering against javascript: URI injection #17151) once [sec-check] fix: add rehypeSanitize to ReactMarkdown components (XSS via javascript: URIs) #17158 is merged or approved

Generated by Stuck Detection Workflow · sonnet46 1.6M ·

@clubanderson

Copy link
Copy Markdown
Collaborator

✅ sec-check: Verified — Correct ReactMarkdown XSS Fix

All 5 affected ReactMarkdown render sites now have rehypeSanitize in their rehypePlugins array:

File Before After
MessageBubble.tsx No sanitize rehypeSanitize + remarkGfm added
WhatsNewModal.tsx (x3 render sites) No sanitize rehypeSanitize added
SubmitTab.tsx No sanitize rehypeSanitize added
FeedbackDialogs.tsx No sanitize rehypeSanitize added

Test added: MessageBubble.test.tsx verifies that javascript: links are blocked and https:// links render correctly. ✅

This PR is the correct fix. It needs:

  1. DCO sign-off (git commit -s --amend on each commit)
  2. Mark as ready for review

Filed by sec-check agent (ACMM L6 — full mode)

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Status Check — Conflicting Assessments, Needs Human Decision (~24 Hours)

No new bot activity since the last status check at 16:44 UTC (~2h52m ago), but a new human comment arrived at 17:39 UTC (~1h57m ago) that materially changes the situation.

Current status:

  • Build / CI: ✅ All 38 checks passing
  • Draft: Still open as work-in-progress
  • DCO signoff: ❌ Missing — commit 7cd3644 ("Initial plan") lacks Signed-off-by trailer
  • Label: ai-needs-human already set

⚠️ Conflicting assessments — human decision required:

Time Author Assessment
10:12 UTC (Jun 7) @clubanderson This PR is superseded by #17158 — close this PR
17:39 UTC (Jun 7) @clubanderson (sec-check agent) This PR IS the correct fix — needs DCO signoff + ready for review

Both comments are from the same author. The two assessments are mutually exclusive. A human maintainer needs to decide which path to take.

Option A — Keep this PR (#17151):

  1. Add DCO signoff to commit 7cd3644 (git commit -s --amend)
  2. Mark as ready for review (convert from draft)
  3. Close [sec-check] fix: add rehypeSanitize to ReactMarkdown components (XSS via javascript: URIs) #17158 as superseded

Option B — Close this PR in favor of #17158:

  1. Close this PR
  2. Review and merge [sec-check] fix: add rehypeSanitize to ReactMarkdown components (XSS via javascript: URIs) #17158 (already has DCO signoff, all checks passing except minor post-directions check)

Generated by Stuck Detection Workflow · sonnet46 1.8M ·

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Status Check — Stalled ~27 Hours, Outside Business Hours

No new activity since the last status check at 19:41 UTC (~3h12m ago). State unchanged.

Current status:

  • Build / CI: ✅ All 38 checks passing
  • Draft: Still open as work-in-progress
  • DCO signoff: ❌ Missing — commit 7cd3644 ("Initial plan") lacks Signed-off-by trailer
  • Label: ai-needs-human already set
  • Review: Not approved, no reviewers assigned

Decision still pending:
Two conflicting assessments exist from @clubanderson:

Recommended next steps at start of business hours:

  1. Decide whether to keep this PR (fix DCO, convert from draft) or close it in favor of [sec-check] fix: add rehypeSanitize to ReactMarkdown components (XSS via javascript: URIs) #17158
  2. PR [sec-check] fix: add rehypeSanitize to ReactMarkdown components (XSS via javascript: URIs) #17158 is an open (non-draft), DCO-signed alternative that covers the same files — it may be ready to merge once reviewed
  3. Resolve the conflicting assessments before further automation acts on this item

Outside business hours — lower urgency. No new escalation needed.

Generated by Stuck Detection Workflow · sonnet46 1.6M ·

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Stuck Detection Report — 2026-06-08T11:41 UTC

No new stuck items found on this run.

Scan Summary

Category Searched New Stuck Action Taken
Issues with ai-processing > 2h 4 found 0 None (all already labeled)
Issues with ai-awaiting-fix > 4h 0 found 0 None
Issues with ai-fix-requested + no PR > 2h 0 found 0 None
Draft PRs (AI) stuck > 1h without escalation 0 found 0 None
AI PRs with failing checks, not escalated 0 found 0 None

Already-Escalated Items (pre-existing)

11 open PRs and 4 open issues already carry ai-needs-human from prior workflow runs. These are awaiting human review and no duplicate action was taken.

Next scheduled run: ~30 minutes

Generated by Stuck Detection Workflow · sonnet46 1.1M ·

@kubestellar-prow kubestellar-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 8, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Status Check — 2026-06-08T18:03 UTC (~46 hours stuck)

New activity since the last stuck-detection check at 11:45 UTC: prow bot flagged a rebase conflict at 14:04 UTC (needs-rebase label added).

Current status:

Recommended Actions

A human maintainer must decide between:

This item has been awaiting a human decision for ~2 days.

Generated by Stuck Detection Workflow · sonnet46 1.4M ·

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Status Check — 2026-06-08T20:19 UTC (~48+ hours stuck)

No change since the last check at 18:07 UTC (~2 hours ago). This draft PR remains stalled.

Current status:

Recommended Action

A human maintainer must decide between:

This PR has now been awaiting a human decision for ~2 days. Closing is the lower-effort path if #17158 is already complete.

Generated by Stuck Detection Workflow · sonnet46 1.5M ·

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 ai-needs-human AI automation unavailable - needs human intervention dco-signoff: no Indicates the PR's author has not signed the DCO. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tier/2-standard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sec-check] ReactMarkdown XSS: missing rehypeSanitize in 5 components allows javascript: URI injection

4 participants