mirror of
https://github.com/Yamato-Security/WELA.git
synced 2025-12-06 17:22:50 +01:00
fix: ensure score calculations in WELA.ps1 return integer values
This commit is contained in:
4
WELA.ps1
4
WELA.ps1
@@ -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 += @{
|
||||
|
||||
Reference in New Issue
Block a user