From f9209a816cfa27d2ef399acb3800f631fe47a482 Mon Sep 17 00:00:00 2001 From: Samuel Lucidi Date: Tue, 19 Dec 2023 14:12:54 -0500 Subject: [PATCH] :bug: Fix ptr-to-loopvar bug in assessment tags module (#585) Fixes an issue which is causing assessment tag autoapply and question include/exclude to fail. Signed-off-by: Sam Lucidi --- assessment/tag.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assessment/tag.go b/assessment/tag.go index 073d00460..798178fad 100644 --- a/assessment/tag.go +++ b/assessment/tag.go @@ -57,8 +57,9 @@ func (r *TagResolver) cacheTags() (err error) { for _, c := range categories { r.cache[c.Name] = make(map[string]*model.Tag) - for _, t := range c.Tags { - r.cache[c.Name][t.Name] = &t + for i := range c.Tags { + t := &c.Tags[i] + r.cache[c.Name][t.Name] = t } }