From e9de59a315f00c42018ef4cbc5694ecd7417fdd8 Mon Sep 17 00:00:00 2001 From: James Tucker Date: Wed, 1 Nov 2023 15:39:43 -0700 Subject: [PATCH] tstest/deptest: fix minor escaping error in regex Fixes https://github.com/tailscale/tailscale/security/code-scanning/112 Signed-off-by: James Tucker --- tstest/deptest/deptest.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tstest/deptest/deptest.go b/tstest/deptest/deptest.go index 8ea39e243..57db2b79a 100644 --- a/tstest/deptest/deptest.go +++ b/tstest/deptest/deptest.go @@ -73,7 +73,7 @@ func ImportAliasCheck(t testing.TB, relDir string) { t.Logf("ignoring error: %v, %s", err, matches) return } - badRx := regexp.MustCompile(`^([^:]+:\d+):\s+"golang.org/x/exp/(slices|maps)"`) + badRx := regexp.MustCompile(`^([^:]+:\d+):\s+"golang\.org/x/exp/(slices|maps)"`) if s := strings.TrimSpace(string(matches)); s != "" { for _, line := range strings.Split(s, "\n") { if m := badRx.FindStringSubmatch(line); m != nil {