Prevent bare star tracker patterns
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é <emile@getprobo.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user