Merge pull request #102 from Yamato-Security/99-print-zero

fix: correct rule count initialization
This commit is contained in:
Zach Mathis (田中ザック)
2025-10-05 13:34:22 +08:00
committed by GitHub
4 changed files with 22 additions and 10 deletions

View File

@@ -9,7 +9,7 @@ jobs:
build:
strategy:
matrix:
os: [windows-2019, windows-2022, windows-2025]
os: [windows-latest, windows-2022, windows-2025]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

View File

@@ -1,4 +1,10 @@
# 初期リリース
# CHANGELOG
## 2.0.0 [2025/11/16] - CODE BLUE リリース
**バグ修正:**
- ルールカウントの一部が正確ではなかった。 (#99) (@fukusuket)
## 1.0.0 [2025/05/20] - AUSCERT/SINCON リリース

View File

@@ -1,4 +1,10 @@
# Initial Release
# CHANGELOG
## 2.0.0 [2025/11/16] - CODE BLUE Release
**Bug Fixes:**
- Some of the rule count was not accurate. (#99) (@fukusuket)
## 1.0.0 [2025/05/20] - AUSCERT/SINCON Release

View File

@@ -350,7 +350,7 @@ function GuideYamatoSecurity
# NTLM Operational
$guid = ""
$eids = @()
$channels = @("Microsoft-Windows-Diagnosis-Scripted/Operational")
$channels = @("Microsoft-Windows-NTLM/Operational")
$enabled = $true
$rules = $all_rules | Where-Object { RuleFilter $_ $eids $channels $guid }
$rules | ForEach-Object { $_.applicable = $enabled }
@@ -1545,7 +1545,7 @@ function GuideASD {
# NTLM Operational
$guid = ""
$eids = @()
$channels = @("Microsoft-Windows-Diagnosis-Scripted/Operational")
$channels = @("Microsoft-Windows-NTLM/Operational")
$enabled = $true
$rules = $all_rules | Where-Object { RuleFilter $_ $eids $channels $guid }
$rules | ForEach-Object { $_.applicable = $enabled }
@@ -2743,7 +2743,7 @@ function GuideMSC {
# NTLM Operational
$guid = ""
$eids = @()
$channels = @("Microsoft-Windows-Diagnosis-Scripted/Operational")
$channels = @("Microsoft-Windows-NTLM/Operational")
$enabled = $true
$rules = $all_rules | Where-Object { RuleFilter $_ $eids $channels $guid }
$rules | ForEach-Object { $_.applicable = $enabled }
@@ -3941,7 +3941,7 @@ function GuideMSS {
# NTLM Operational
$guid = ""
$eids = @()
$channels = @("Microsoft-Windows-Diagnosis-Scripted/Operational")
$channels = @("Microsoft-Windows-NTLM/Operational")
$enabled = $true
$rules = $all_rules | Where-Object { RuleFilter $_ $eids $channels $guid }
$rules | ForEach-Object { $_.applicable = $enabled }
@@ -5046,10 +5046,10 @@ function AuditLogSetting {
$ruleCounts = ""
foreach ($level in [WELA]::Levels) {
$count = $_.RulesCount[$level]
if (-not $count) {
$count = 0
}
if ($level -eq "informational") {
if (-not $count) {
$count = 0
}
$ruleCounts += "info:$([string]$count)"
} else {
$ruleCounts += "$($level):$($count), "