From 2888b2beb933e2f067e410a8a4f80d35b43ab5b7 Mon Sep 17 00:00:00 2001 From: Jason Cameron Date: Sat, 25 Jan 2025 14:18:06 -0500 Subject: [PATCH] Fix:Missing regular expression anchor Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Jason Cameron --- ranges/fetchers/azure.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ranges/fetchers/azure.go b/ranges/fetchers/azure.go index 914e4f7..8df9959 100644 --- a/ranges/fetchers/azure.go +++ b/ranges/fetchers/azure.go @@ -35,7 +35,7 @@ func (f AzurePublicCloudFetcher) FetchIPRanges() ([]string, error) { } // Step 2: Extract the JSON download URL using a regex - urlRegex := regexp.MustCompile(`https://download\.microsoft\.com/.*?\.json`) + urlRegex := regexp.MustCompile(`^https://download\.microsoft\.com/.*?\.json$`) matches := urlRegex.FindStringSubmatch(string(body)) if len(matches) == 0 { return nil, fmt.Errorf("failed to find JSON download URL in Azure download page")