From efa7c682fc0ac39225b1b65eb916d09c98ebb168 Mon Sep 17 00:00:00 2001 From: Adam Chalkley Date: Wed, 24 Jul 2024 07:28:18 -0500 Subject: [PATCH] Refactor regex for default Workflow URLs Switch from static base pattern of `logic.azure.com` to a regex OR pattern to permit either of `logic.azure.com` or `*.azure-api.net` as has been observed in the wild. This also has the side effect of resolving potential CodeQL alerts raised in PR GH-275. refs GH-262 --- send.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/send.go b/send.go index 83822bd..8e00ec7 100644 --- a/send.go +++ b/send.go @@ -36,7 +36,7 @@ const ( // Known Workflow URL patterns for submitting messages to Microsoft Teams. const ( - WorkflowURLBaseDomain = "logic.azure.com" + WorkflowURLBaseDomain = `^https:\/\/(?:.*\.azure-api|logic\.azure)\.(?:com|net)` ) // DisableWebhookURLValidation is a special keyword used to indicate to