Skip to content

Commit

Permalink
stabilizing
Browse files Browse the repository at this point in the history
  • Loading branch information
nleach999 committed Oct 25, 2022
1 parent b97d5eb commit 87961df
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions XForm/CxOneTransformer/Transformer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,18 +288,23 @@ private void OutputScaScanResults(IOutputTransaction scanTrx, ProjectDescriptor
{
using (var detailed_report = CxScanResults.GetScaScanResults(Context, ThreadOpts.CancellationToken, scan.ScanId))
{
var flat_summary = new SortedDictionary<String, Object>();
AddScanHeaderElements(scan, flat_summary);
AddCommonScanFields(scan, scanHeaders, flat_summary);
AddPairsAsTags(scanHeaders[scan.ScanId].Tags, flat_summary);
ScaTransformer.Transformer.FillScanSummaryData(detailed_report.Result, flat_summary, scan.Project.ProjectName);
scanTrx.write(ScaScanSummaryOut, flat_summary);

var detail_header = new SortedDictionary<String, Object>();
AddScanHeaderElements(scan, detail_header);
AddCommonScanFields(scan, scanHeaders, detail_header);
foreach (var flat_details in ScaTransformer.Transformer.GenerateScanDetailData(detailed_report.Result, detail_header, scan, riskStates))
scanTrx.write(ScaScanDetailOut, flat_details);
if (detailed_report.Result != null)
{
var flat_summary = new SortedDictionary<String, Object>();
AddScanHeaderElements(scan, flat_summary);
AddCommonScanFields(scan, scanHeaders, flat_summary);
AddPairsAsTags(scanHeaders[scan.ScanId].Tags, flat_summary);
ScaTransformer.Transformer.FillScanSummaryData(detailed_report.Result, flat_summary, scan.Project.ProjectName);
scanTrx.write(ScaScanSummaryOut, flat_summary);

var detail_header = new SortedDictionary<String, Object>();
AddScanHeaderElements(scan, detail_header);
AddCommonScanFields(scan, scanHeaders, detail_header);
foreach (var flat_details in ScaTransformer.Transformer.GenerateScanDetailData(detailed_report.Result, detail_header, scan, riskStates))
scanTrx.write(ScaScanDetailOut, flat_details);
}
else
_log.Warn($"Project {project.ProjectId}:{project.ProjectName} - SCA results for scan {scan.ScanId} are not available.");
}
}

Expand Down

0 comments on commit 87961df

Please sign in to comment.