Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nleach999 committed Oct 24, 2022
1 parent 09ff8f8 commit 80dbab6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Libs/Executive/ExecuteLoop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public class ExecuteLoop : ExecuteOnce
}


GC.Collect();

Task.Delay(Service.ProcessPeriodMinutes * 60 * 1000, t.Token).Wait();
} while (!t.Token.IsCancellationRequested);

Expand Down
11 changes: 10 additions & 1 deletion XForm/CxOneTransformer/Transformer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ public override void DoTransform(CancellationToken token)

Parallel.ForEach(State.Projects, ThreadOpts, (projDescriptor) =>
{
if (!lastScansTask.Result.ContainsKey(projDescriptor.ProjectId))
{
_log.Info($"Project {projDescriptor.ProjectId}:{projDescriptor.TeamName}:{projDescriptor.ProjectName} contains no scans.");
return;
}

var latestScanDateForProject = lastScansTask.Result[projDescriptor.ProjectId].Completed;

// This skips some API I/O since we know the last scan date of some projects.
Expand Down Expand Up @@ -334,7 +340,10 @@ private void OutputSastScanResults(IOutputTransaction scanTrx, ProjectDescriptor
flat_details.Add("State", detail_entry.State);
flat_details.Add("Status", detail_entry.Status);
flat_details.Add("QueryCweId", detail_entry.VulnerabilityDetails.CweId);
flat_details.Add("QueryCategories", String.Join(",", detail_entry.VulnerabilityDetails.Categories));

if (detail_entry.VulnerabilityDetails.Categories != null)
flat_details.Add("QueryCategories", String.Join(",", detail_entry.VulnerabilityDetails.Categories));

flat_details.Add("FalsePositive", detail_entry.State.CompareTo(NE_VALUE) == 0);
flat_details.Add("Branch", scanHeaders[scan.ScanId].Branch);
flat_details.Add("ScanFinished", scanHeaders[scan.ScanId].Updated);
Expand Down

0 comments on commit 80dbab6

Please sign in to comment.