diff --git a/src/BinSkim.Driver/AnalysisSummaryExtractor.cs b/src/BinSkim.Driver/AnalysisSummaryExtractor.cs index bb2fc206e..ac64c4797 100644 --- a/src/BinSkim.Driver/AnalysisSummaryExtractor.cs +++ b/src/BinSkim.Driver/AnalysisSummaryExtractor.cs @@ -39,12 +39,12 @@ public static AnalysisSummary ExtractAnalysisSummary(SarifLog sarifLog, AnalyzeO public static IEnumerable ExtractExceptionData(SarifLog sarifLog) { - if (sarifLog == null || sarifLog.Runs == null || !sarifLog.Runs.Any()) + IList notifications = sarifLog?.Runs?[0]?.Invocations?[0]?.ToolExecutionNotifications; + if (notifications == null) { yield break; } - IList notifications = sarifLog.Runs[0]?.Invocations[0]?.ToolExecutionNotifications; foreach (Sarif.Notification notification in notifications) {