@@ -149,11 +149,7 @@ func hasDependenciesToScan(targetResults *results.TargetResults, logPrefix strin
149149}
150150
151151func scaScanTask (strategy SbomScanStrategy , params ScaScanParams ) (err error ) {
152- logPrefix := ""
153- if params .ThreadId >= 0 {
154- logPrefix = clientUtils .GetLogMsgPrefix (params .ThreadId , false )
155- }
156- log .Info (logPrefix + utils .GetScanStartLog (utils .ScaScan , params .ScanResults .Target , params .TargetCount ))
152+ log .Info (utils .GetScanStartLog (utils .ScaScan , params .ScanResults .Target , params .TargetCount , params .ThreadId ))
157153 // Start the scan
158154 startTime := time .Now ()
159155 if ! params .IsNewFlow {
@@ -163,7 +159,7 @@ func scaScanTask(strategy SbomScanStrategy, params ScaScanParams) (err error) {
163159 if err != nil {
164160 return err
165161 }
166- log .Info (logPrefix + utils .GetScanFindingsLog (utils .ScaScan , len (scanResults .Vulnerabilities ), startTime ))
162+ log .Info (utils .GetScanFindingsLog (utils .ScaScan , len (scanResults .Vulnerabilities ), startTime , params . ThreadId ))
167163 return dumpScanResponseToFileIfNeeded (scanResults , params .ResultsOutputDir , utils .ScaScan , params .ThreadId )
168164 }
169165 // New flow: we scan the SBOM and enrich it with CVE vulnerabilities and calculate violations.
@@ -177,7 +173,7 @@ func scaScanTask(strategy SbomScanStrategy, params ScaScanParams) (err error) {
177173 if params .ScanResults .ScaResults != nil && params .ScanResults .ScaResults .Sbom != nil && params .ScanResults .ScaResults .Sbom .Vulnerabilities != nil {
178174 vulnerabilityCount = len (* params .ScanResults .ScaResults .Sbom .Vulnerabilities )
179175 }
180- log .Info (logPrefix + utils .GetScanFindingsLog (utils .ScaScan , vulnerabilityCount , startTime ))
176+ log .Info (utils .GetScanFindingsLog (utils .ScaScan , vulnerabilityCount , startTime , params . ThreadId ))
181177 return dumpEnrichedCdxToFileIfNeeded (bomWithVulnerabilities , params .ResultsOutputDir , utils .ScaScan , params .ThreadId )
182178}
183179
0 commit comments