alanrenouf / vCheck-vSphere

vCheck Daily Report for vSphere
MIT License
733 stars 325 forks source link

VM Check for Spectre Mitigation Plugin False-Positives #755

Open aaronmrqz1 opened 9 months ago

aaronmrqz1 commented 9 months ago

Problem Code only checks for versions vmx-09 thru vmx-13, so newer versions fail and are tagged as affected by vulnerability. Recommend switching to 'greater than or equal to' vmx-09 instead of listing out each version. This way it should account for any newer releases without a need to constantly update plugin.

Current Code:

elseif($vmvHW -eq "vmx-09" -or $vmvHW -eq "vmx-10" -or $vmvHW -eq "vmx-11" -or $vmvHW -eq "vmx-12" -or $vmvHW -eq "vmx-13") {
            $vHWPass = $true
        }

Recommended Code:

if($vmvHW -ge "vmx-09") {
            $vHWPass = $true
}