Update teams sink validation to accept post-2026 webhook hosts - #4112
Update teams sink validation to accept post-2026 webhook hosts#4112JohnBlackwell wants to merge 5 commits into
Conversation
Soffi AI SummaryThis PR updates the webhook URL validation logic for Microsoft Teams and Slack notification sinks to support the post-2026 Microsoft webhook infrastructure. Previously, Teams webhook validation only accepted URLs containing "office" in the hostname, which excluded newer Microsoft Power Automate and Power Platform webhook hosts. The fix introduces a proper allowlist-based validation approach on both the server side (Elixir) and the frontend (React), replacing fragile regex pattern matching with explicit hostname checks against known-good domains. ChangesMS Teams webhook host allowlist
Updated: 2026-09-08 12:54 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 |
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