Skip to content

Commit

Permalink
Security scanning log assertion should only care about errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Piedone committed Nov 10, 2024
1 parent 1e9a5d2 commit 1fbb8c5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public static Func<IWebApplicationInstance, Task> CreateAppLogAssertionForSecuri
app.LogsShouldNotContainAsync(logEntry =>
!permittedErrorLinePatterns.Any(pattern =>
Regex.IsMatch(logEntry.ToString(), pattern, RegexOptions.IgnoreCase | RegexOptions.Compiled)) &&
AppLogAssertionHelper.NotMediaCacheEntries(logEntry));
AppLogAssertionHelper.NotMediaCacheEntries(logEntry) &&
logEntry.Level >= LogLevel.Error);
}
}

0 comments on commit 1fbb8c5

Please sign in to comment.