Skip to content

Commit

Permalink
Update commands/scan/scan.go
Browse files Browse the repository at this point in the history
Co-authored-by: Assaf Attias <[email protected]>
  • Loading branch information
guyshe-jfrog and attiasas authored May 30, 2024
1 parent 15c5ae1 commit 60d971d
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions commands/scan/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 {
Expand Down

0 comments on commit 60d971d

Please sign in to comment.