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)