From 5c4f3514396d14396ccc0bf10d1e3afe124c125d Mon Sep 17 00:00:00 2001 From: David Roe Date: Tue, 15 Aug 2023 12:10:57 +0100 Subject: [PATCH] fix: hashing of scanners in scan id --- pkg/commands/artifact/scanid/scanid.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/commands/artifact/scanid/scanid.go b/pkg/commands/artifact/scanid/scanid.go index dfaf8b1c3..44f6d2d47 100644 --- a/pkg/commands/artifact/scanid/scanid.go +++ b/pkg/commands/artifact/scanid/scanid.go @@ -104,7 +104,7 @@ func hashRules(rules map[string]*settings.Rule) ([]byte, error) { func hashScanners(scanners []string) ([]byte, error) { hashBuilder := md5.New() - var sortedScanners []string + sortedScanners := make([]string, len(scanners)) copy(sortedScanners, scanners) sort.Strings(sortedScanners)