Skip to content

🔒 [security fix] Unvalidated URL Scheme in Webhook Target#29

Merged
cmuench merged 1 commit intomainfrom
fix-webhook-url-validation-2789224520900377017
Feb 26, 2026
Merged

🔒 [security fix] Unvalidated URL Scheme in Webhook Target#29
cmuench merged 1 commit intomainfrom
fix-webhook-url-validation-2789224520900377017

Conversation

@cmuench
Copy link
Contributor

@cmuench cmuench commented Feb 25, 2026

The "Unvalidated URL Scheme" vulnerability in the webhook target has been fixed.

🎯 What: Webhook URLs are now validated to ensure they use safe protocols.
⚠️ Risk: Without this validation, an attacker could potentially trigger malicious actions using schemes like javascript: or access local files via file:.
🛡️ Solution: Added a check using the URL constructor to verify that the protocol is either http: or https: before performing the fetch operation. Localized error messages were added for better user experience.


PR created automatically by Jules for task 2789224520900377017 started by @cmuench

This commit adds URL validation to the `sendWebhook` function to ensure that only `http://` and `https://` schemes are allowed for webhook targets. This prevents potential misuse of other protocols allowed by the browser environment, such as `javascript:` or `file:`.

Changes:
- Implemented protocol validation in `utils/utils.js`.
- Added localized error messages in `_locales/en/messages.json`.
- Improved error handling to provide specific feedback for invalid schemes vs malformed URLs.

Co-authored-by: cmuench <211294+cmuench@users.noreply.github.com>
@google-labs-jules
Copy link
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.

@cmuench cmuench merged commit a7d1ef1 into main Feb 26, 2026
1 check passed
@cmuench cmuench deleted the fix-webhook-url-validation-2789224520900377017 branch February 26, 2026 13:45
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