mirror of
https://github.com/Yamato-Security/WELA.git
synced 2025-12-06 09:12:46 +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]
|
$info = $tagMapping[$techniqueId]
|
||||||
$titlesCount = $info.titles.Count
|
$titlesCount = $info.titles.Count
|
||||||
$score = if ($titlesCount -gt 0) {
|
$score = if ($titlesCount -gt 0) {
|
||||||
[math]::Round(($info.applicableCount / $titlesCount) * 100, 2)
|
[int][math]::Round(($info.applicableCount / $titlesCount) * 100, 2)
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
@@ -5257,7 +5257,7 @@ function Export-MitreHeatmap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($UseIdealCount) {
|
if ($UseIdealCount) {
|
||||||
$score = [math]::Round(($info.idealCount / $titlesCount) * 100, 2)
|
$score = [int][math]::Round(($info.idealCount / $titlesCount) * 100, 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
$techniques += @{
|
$techniques += @{
|
||||||
|
|||||||
Reference in New Issue
Block a user