Skip to content

🛡️ Sentinel: Fix potential XSS via announcement link protocol evasion - #45

Closed
one-more-refactor wants to merge 1 commit into
masterfrom
sentinel/url-validation-xss-fix-11899933106075306149
Closed

one-more-refactor wants to merge 1 commit into
masterfrom
sentinel/url-validation-xss-fix-11899933106075306149

Conversation

@one-more-refactor

Copy link
Copy Markdown
Owner

🛡️ Sentinel: Fix potential XSS via announcement link protocol evasion

  • Severity: HIGH
  • Vulnerability: Weak link URL validation relying on string prefix matching, which can be vulnerable to bypasses using control characters, case variations, or protocol scheme tricks (e.g. javascript:, data:).
  • Impact: Stored Cross-Site Scripting (XSS) if an operator sets an announcement link to an executable script payload that users click on.
  • Fix: Used WHATWG URL constructor with fallback origin to parse relative and absolute links, stripping ASCII control characters ([\x00-\x1F\x7F]) and enforcing http: or https: protocol checks.
  • Verification: Added src/main.test.ts unit test suite covering javascript:, data:, vbscript:, null byte injection, and valid HTTP(S) links. Verified via bun test, bun run check, and bun run build.

PR created automatically by Jules for task 11899933106075306149 started by @one-more-refactor

Replaces naive prefix string check for announcement links with WHATWG URL
constructor parsing after stripping ASCII control characters. Ensures links
strictly use http or https protocols to prevent XSS via javascript URIs.

Co-authored-by: one-more-refactor <297687349+one-more-refactor@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: acce2671-b205-4fe9-8b2d-bec867faf08e
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@one-more-refactor
one-more-refactor force-pushed the sentinel/url-validation-xss-fix-11899933106075306149 branch from 4fb31ac to c94a9ab Compare October 15, 2026 14:14
@one-more-refactor
one-more-refactor deleted the sentinel/url-validation-xss-fix-11899933106075306149 branch October 15, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant