mirror of
https://github.com/Yamato-Security/WELA.git
synced 2025-12-06 17:22:50 +01:00
fix: correct rule count initialization
This commit is contained in:
6
WELA.ps1
6
WELA.ps1
@@ -5046,10 +5046,10 @@ function AuditLogSetting {
|
|||||||
$ruleCounts = ""
|
$ruleCounts = ""
|
||||||
foreach ($level in [WELA]::Levels) {
|
foreach ($level in [WELA]::Levels) {
|
||||||
$count = $_.RulesCount[$level]
|
$count = $_.RulesCount[$level]
|
||||||
|
if (-not $count) {
|
||||||
|
$count = 0
|
||||||
|
}
|
||||||
if ($level -eq "informational") {
|
if ($level -eq "informational") {
|
||||||
if (-not $count) {
|
|
||||||
$count = 0
|
|
||||||
}
|
|
||||||
$ruleCounts += "info:$([string]$count)"
|
$ruleCounts += "info:$([string]$count)"
|
||||||
} else {
|
} else {
|
||||||
$ruleCounts += "$($level):$($count), "
|
$ruleCounts += "$($level):$($count), "
|
||||||
|
|||||||
Reference in New Issue
Block a user