Skip to content

πŸ›‘οΈ Sentinel: [security improvement] Harden Discord webhook dispatch - #388

Merged
nathfavour merged 1 commit into
masterfrom
sentinel/harden-discord-webhook-dispatch-4982111819576418740
Nov 13, 2026
Merged

nathfavour merged 1 commit into
masterfrom
sentinel/harden-discord-webhook-dispatch-4982111819576418740

Conversation

@nathfavour

Copy link
Copy Markdown
Member
  • 🚨 Severity: MEDIUM
  • πŸ’‘ Vulnerability: Outbound Discord webhook notifications did not enforce an explicit request timeout on fetch, allowing slow or malicious remote endpoints to tie up socket connections and worker threads indefinitely (resource exhaustion / slowloris DoS). In addition, isValidDiscordWebhookUrl did not strip trailing root dots from hostnames before domain matching.
  • 🎯 Impact: High socket concurrency or unresponsive remote webhooks could starve serverless worker threads; inconsistent hostname matching could lead to domain verification edge cases.
  • πŸ”§ Fix: Added signal: AbortSignal.timeout(5000) to the outbound notification fetch in app/api/discord/route.ts and normalized url.hostname with .replace(/\.+$/, '') before domain checking.
  • βœ… Verification: Added unit tests in app/api/discord/route.test.ts for trailing dot hostname verification and verifying that an AbortSignal timeout is attached during outbound webhook dispatch. Ran full test suite (all tests pass) and linting.

PR created automatically by Jules for task 4982111819576418740 started by @nathfavour

Normalize hostname trailing root dots in isValidDiscordWebhookUrl and enforce AbortSignal.timeout(5000) on outbound Discord webhook fetch to prevent socket hanging and resource exhaustion.

Co-authored-by: nathfavour <[email protected]>
@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.

@nathfavour
nathfavour merged commit 32e4fb6 into master Nov 13, 2026
4 checks passed
@nathfavour
nathfavour deleted the sentinel/harden-discord-webhook-dispatch-4982111819576418740 branch November 13, 2026 21:51
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