Enclose terms by spaces in app detection

This commit is contained in:
Jan Eitzinger 2025-06-27 12:16:06 +02:00
parent dca25cc601
commit 8378784231

View File

@ -111,7 +111,7 @@ func (t *AppTagger) Match(job *schema.Job) {
for _, a := range t.apps {
tag := a.tag
for _, s := range a.strings {
if strings.Contains(strings.ToLower(jobscript), s) {
if strings.Contains(strings.ToLower(jobscript), fmt.Sprintf(" %s ", s)) {
if !r.HasTag(id, t.tagType, tag) {
r.AddTagOrCreateDirect(id, t.tagType, tag)
break out