fix: ensure score calculations in WELA.ps1 return integer values

This commit is contained in:
fukusuket
2025-10-13 18:13:17 +09:00
parent d71a2ed774
commit 980ed41f84

View File

@@ -5248,7 +5248,7 @@ function Export-MitreHeatmap {
$info = $tagMapping[$techniqueId]
$titlesCount = $info.titles.Count
$score = if ($titlesCount -gt 0) {
[math]::Round(($info.applicableCount / $titlesCount) * 100, 2)
[int][math]::Round(($info.applicableCount / $titlesCount) * 100, 2)
} else {
0
}
@@ -5257,7 +5257,7 @@ function Export-MitreHeatmap {
}
if ($UseIdealCount) {
$score = [math]::Round(($info.idealCount / $titlesCount) * 100, 2)
$score = [int][math]::Round(($info.idealCount / $titlesCount) * 100, 2)
}
$techniques += @{