mirror of
https://github.com/Yamato-Security/WELA.git
synced 2025-12-06 09:12:46 +01:00
fix: info count
This commit is contained in:
21
WELA.ps1
21
WELA.ps1
@@ -71,11 +71,10 @@
|
|||||||
foreach ($level in [WELA]::Levels) {
|
foreach ($level in [WELA]::Levels) {
|
||||||
$count = $this.RulesCount[$level]
|
$count = $this.RulesCount[$level]
|
||||||
if ($level -eq "informational") {
|
if ($level -eq "informational") {
|
||||||
if ($count -eq 0) {
|
if (-not $count) {
|
||||||
$ruleCounts += "info:0"
|
$count = 0
|
||||||
} else {
|
|
||||||
$ruleCounts += "info:$([string]$count), "
|
|
||||||
}
|
}
|
||||||
|
$ruleCounts += "info:$([string]$count)"
|
||||||
} else {
|
} else {
|
||||||
$ruleCounts += "$($level):$($count), "
|
$ruleCounts += "$($level):$($count), "
|
||||||
}
|
}
|
||||||
@@ -1020,11 +1019,10 @@ function AuditLogSetting {
|
|||||||
foreach ($level in [WELA]::Levels) {
|
foreach ($level in [WELA]::Levels) {
|
||||||
$count = $_.RulesCount[$level]
|
$count = $_.RulesCount[$level]
|
||||||
if ($level -eq "informational") {
|
if ($level -eq "informational") {
|
||||||
if ($count -eq 0) {
|
if (-not $count) {
|
||||||
$ruleCounts += "info:0"
|
$count = 0
|
||||||
} else {
|
|
||||||
$ruleCounts += "info:$([string]$count), "
|
|
||||||
}
|
}
|
||||||
|
$ruleCounts += "info:$([string]$count)"
|
||||||
} else {
|
} else {
|
||||||
$ruleCounts += "$($level):$($count), "
|
$ruleCounts += "$($level):$($count), "
|
||||||
}
|
}
|
||||||
@@ -1042,11 +1040,10 @@ function AuditLogSetting {
|
|||||||
foreach ($level in [WELA]::Levels) {
|
foreach ($level in [WELA]::Levels) {
|
||||||
$count = $_.RulesCount[$level]
|
$count = $_.RulesCount[$level]
|
||||||
if ($level -eq "informational") {
|
if ($level -eq "informational") {
|
||||||
if ($count -eq 0) {
|
if (-not $count) {
|
||||||
$ruleCounts += "info:0"
|
$count = 0
|
||||||
} else {
|
|
||||||
$ruleCounts += "info:$([string]$count), "
|
|
||||||
}
|
}
|
||||||
|
$ruleCounts += "info:$([string]$count)"
|
||||||
} else {
|
} else {
|
||||||
$ruleCounts += "$($level):$($count), "
|
$ruleCounts += "$($level):$($count), "
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user