From 60d971ddaa0cda0dc7885adc60448eafd7fea97d Mon Sep 17 00:00:00 2001 From: Guy Sheffer <144031599+guyshe-jfrog@users.noreply.github.com> Date: Thu, 30 May 2024 15:41:03 +0300 Subject: [PATCH] Update commands/scan/scan.go Co-authored-by: Assaf Attias <49212512+attiasas@users.noreply.github.com> --- commands/scan/scan.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/commands/scan/scan.go b/commands/scan/scan.go index 276408ae..08570d03 100644 --- a/commands/scan/scan.go +++ b/commands/scan/scan.go @@ -522,9 +522,7 @@ func appendErrorSlice(scanErrors []formats.SimpleJsonError, errorsToAdd [][]form return scanErrors } -func depsListFromVulnerabilities(scanResult ...services.ScanResponse) []string { - var depsList []string - var technologiesList []coreutils.Technology +func depsListFromVulnerabilities(scanResult ...services.ScanResponse) (depsList []string) { for _, result := range scanResult { for _, vulnerability := range result.Vulnerabilities { dependencies := maps.Keys(vulnerability.Components) @@ -533,15 +531,9 @@ func depsListFromVulnerabilities(scanResult ...services.ScanResponse) []string { depsList = append(depsList, dependency) } } - - if !slices.Contains(technologiesList, coreutils.Technology(vulnerability.Technology)) && (vulnerability.Technology != "") { - technologiesList = append(technologiesList, coreutils.Technology(vulnerability.Technology)) - } - } - } - return depsList + return } func ConditionalUploadDefaultScanFunc(serverDetails *config.ServerDetails, fileSpec *spec.SpecFiles, threads int, scanOutputFormat format.OutputFormat) error {