From d4c8137933ef46cea19e5a59776cdfaafd009d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89mile=20R=C3=A9?= Date: Tue, 12 May 2026 17:26:02 +0400 Subject: [PATCH] Prevent bare star tracker patterns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a cookie name has no separator and looks variable (e.g. a long hex string), heuristicTemplate returned "*" which created a catch-all glob pattern matching every tracker of the same type and duration bucket. Skip these separator-less names entirely so they remain as individual exact-match patterns for human triage. Signed-off-by: Émile Ré --- pkg/cookiebanner/worker.go | 3 --- pkg/cookiebanner/worker_test.go | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg/cookiebanner/worker.go b/pkg/cookiebanner/worker.go index 49345c8b1..9aac649de 100644 --- a/pkg/cookiebanner/worker.go +++ b/pkg/cookiebanner/worker.go @@ -349,9 +349,6 @@ func findMergeGroups( func heuristicTemplate(name string) (string, bool) { tokens, sep := splitTokens(name) if sep == 0 { - if looksVariable(name) { - return "*", true - } return "", false } diff --git a/pkg/cookiebanner/worker_test.go b/pkg/cookiebanner/worker_test.go index e79419f7e..d275218fd 100644 --- a/pkg/cookiebanner/worker_test.go +++ b/pkg/cookiebanner/worker_test.go @@ -200,8 +200,8 @@ func TestHeuristicTemplate(t *testing.T) { { name: "no separator with variable token", input: "a1b2c3d4e5f6g7h8", - template: "*", - changed: true, + template: "", + changed: false, }, { name: "no separator without variable token",