Update teams sink validation to accept post-2026 webhook hosts - #4112
Conversation
Soffi AI SummaryThis PR hardens webhook URL validation for Microsoft Teams and Slack notification sinks to support the new post-2026 Microsoft webhook hosts (e.g., Previously, Teams webhook validation only accepted On the frontend, client-side URL pattern matching that previously gated form submission is removed — the form now submits and surfaces server-side validation errors directly to the user via a ChangesExpanded Teams webhook host support
Updated: 2026-09-15 18:34 UTC |
Greptile SummaryUpdates notification sink URL validation to support current Microsoft Teams webhook domains while restricting Slack and Teams URLs to HTTPS on approved hosts.
Confidence Score: 5/5The PR appears safe to merge; the previously reported invalid-port crash is fixed and no new actionable failures were identified. The URL constructor is now guarded, so malformed HTTPS URLs such as those with out-of-range ports return false rather than crashing the notification sink modal. The previous finding was also manually resolved.
|
| Filename | Overview |
|---|---|
| js/console/src/components/settings/notifications/sinks/UpsertNotificationSinkModal.tsx | Adds reusable HTTPS webhook-host validation and safely handles URL parsing failures; no actionable issues remain. |
Reviews (2): Last reviewed commit: "catch malformed urls" | Re-trigger Greptile
|
plural review this |
Plural SummaryFinal-head review found no actionable defects. The webhook classifier now parses HTTPS URLs before allowlist matching, preserves Slack/Teams mutation behavior, and the focused helper tests pass (5/5). Mergeability Grade: AA — merge-ready. The change replaces permissive string matching with exact or dot-delimited subdomain checks on parsed HTTPS hostnames, preventing the reviewed userinfo and suffix spoofing cases while retaining Slack Gov and the newly supported Teams host families. No correctness, security, TypeScript, or call-site regression was found. Files changed (3)
|
|
plural review this |
michaeljguarino
left a comment
There was a problem hiding this comment.
this validation shouldn't be on the frontend at all, it should be done server-side.
|
plural deploy to dev |
|
Acknowledged. I inspected PR #4112 at head |
|
plural deploy to dev |
|
Acknowledged. I verified PR #4112 at head |
https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook?tabs=dotnet
Will allow new MS teams webhooks to be used in addtion to legacy ones. Introduces new helper function to avoid creating additional regex expressions.
Test environment: https://console.plrl-dev-aws.onplural.sh/
Tested with local dev env with the following urls:
Pass
https://environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/abc123/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=test
https://prod-01.westus.logic.azure.com:443/workflows/abc123/triggers/manual/paths/invoke?api-version=2016-10-01&sig=test
https://make.powerautomate.com/workflows/abc123/triggers/manual/paths/invoke?sig=test
https://outlook.office.com/webhook/abc123/IncomingWebhook/test
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
Fail
http://environment.api.powerplatform.com/workflows/abc123
https://example.com/workflows/abc123
https://not-slack.example.com/services/test
not-a-url
Checklist
Plural Flow: console