From 7cdd311cb312ea74ec4da95f7b4a886fb4e52c4a Mon Sep 17 00:00:00 2001 From: Adam Chalkley Date: Thu, 25 Jul 2024 05:44:20 -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..f38c23b 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