@@ -164,6 +164,12 @@ public override void DoTransform(CancellationToken token)
164164
165165 Parallel . ForEach ( State . Projects , ThreadOpts , ( projDescriptor ) =>
166166 {
167+ if ( ! lastScansTask . Result . ContainsKey ( projDescriptor . ProjectId ) )
168+ {
169+ _log . Info ( $ "Project { projDescriptor . ProjectId } :{ projDescriptor . TeamName } :{ projDescriptor . ProjectName } contains no scans.") ;
170+ return ;
171+ }
172+
167173 var latestScanDateForProject = lastScansTask . Result [ projDescriptor . ProjectId ] . Completed ;
168174
169175 // This skips some API I/O since we know the last scan date of some projects.
@@ -334,7 +340,10 @@ private void OutputSastScanResults(IOutputTransaction scanTrx, ProjectDescriptor
334340 flat_details . Add ( "State" , detail_entry . State ) ;
335341 flat_details . Add ( "Status" , detail_entry . Status ) ;
336342 flat_details . Add ( "QueryCweId" , detail_entry . VulnerabilityDetails . CweId ) ;
337- flat_details . Add ( "QueryCategories" , String . Join ( "," , detail_entry . VulnerabilityDetails . Categories ) ) ;
343+
344+ if ( detail_entry . VulnerabilityDetails . Categories != null )
345+ flat_details . Add ( "QueryCategories" , String . Join ( "," , detail_entry . VulnerabilityDetails . Categories ) ) ;
346+
338347 flat_details . Add ( "FalsePositive" , detail_entry . State . CompareTo ( NE_VALUE ) == 0 ) ;
339348 flat_details . Add ( "Branch" , scanHeaders [ scan . ScanId ] . Branch ) ;
340349 flat_details . Add ( "ScanFinished" , scanHeaders [ scan . ScanId ] . Updated ) ;
0 commit comments