Repository: microsoft/CSS-Exchange
File: Diagnostics/HealthChecker/Analyzer/Security/Invoke-AnalyzerSecurityVulnerability.ps1 (PowerShell)

Code before:
        $params = $baseParams + @{
            Name                      = "Security Vulnerabilities"
            Details                   = $details
            DisplayWriteType          = "Red"
            AddDisplayResultsLineInfo = $false
        }
        Add-AnalyzedResultInformation @params

        # Only add this if on current supported and releasing SU for Exchange.
        if (-not ($noLongerSecureExchange)) {

            $params = $baseParams + @{
                Name                      = "Vulnerability Detected"
                Details                   = $true
                AddDisplayResultsLineInfo = $false
                DisplayWriteType          = "Red"
                AddHtmlOverviewValues     = $true
                AddHtmlDetailRow          = $false
            }
            Add-AnalyzedResultInformation @params
        }
    }

    if ($noLongerSecureExchange) {
        $params = $baseParams + @{
            Details          = "No longer considered secure as no SUs are released for this version of Exchange."
            DisplayWriteType = "Red"
            AddHtmlDetailRow = $false
        }
        Add-AnalyzedResultInformation @params

        $params = $baseParams + @{
            Name                      = "Vulnerability Detected"
            Details                   = "Expired Version of Exchange"
            DisplayWriteType          = "Red"
            AddDisplayResultsLineInfo = $false
            AddHtmlOverviewValues     = $true
        }
        Add-AnalyzedResultInformation @params
    }
}


Review comment (security):
Can we change this to: 
```
Exchange Server 2013 is now out of support and will not receive any further security updates. We do not perform any vulnerability testing against this version of Exchange anymore. Exchange Server 2013 is likely vulnerable to any vulnerabilities disclosed after April 2023 and you should migrate to Exchange Server 2019 or Exchange Online as soon as possible and decommission Exchange Server 2013 from your environment.
```

Code after:
        $params = $baseParams + @{
            Name                      = "Security Vulnerabilities"
            Details                   = $details
            DisplayWriteType          = "Red"
            AddDisplayResultsLineInfo = $false
        }
        Add-AnalyzedResultInformation @params

        # Only add this if on current supported and releasing SU for Exchange.
        if (-not ($noLongerSecureExchange)) {

            $params = $baseParams + @{
                Name                      = "Vulnerability Detected"
                Details                   = $true
                AddDisplayResultsLineInfo = $false
                DisplayWriteType          = "Red"
                AddHtmlOverviewValues     = $true
                AddHtmlDetailRow          = $false
            }
            Add-AnalyzedResultInformation @params
        }
    }

    if ($noLongerSecureExchange) {
        $friendlyName = ($buildVersion.FriendlyName.ToString()).Replace(($buildVersion.CU), " ").Trim()
        $details = "`r`n`t$friendlyName is out of support and will not receive any further security updates." +
        "`r`n`tWe do not perform any vulnerability testing against this version of Exchange any more." +
        "`r`n`t$friendlyName is likely vulnerable to any vulnerabilities disclosed after $($buildVersion.ExtendedSupportDate.ToString("yyyy/MM/dd"))" +
        "`r`n`tYou should migrate to the latest Exchange Server for On Prem or Exchange Online as soon as possible and decommission $friendlyName from your environment."
        $params = $baseParams + @{
            Details          = $details
            DisplayWriteType = "Red"
            AddHtmlDetailRow = $false
        }
        Add-AnalyzedResultInformation @params

        $params = $baseParams + @{
            Name                      = "Vulnerability Detected"
            Details                   = "Expired Version of Exchange"
            DisplayWriteType          = "Red"
            AddDisplayResultsLineInfo = $false
            AddHtmlOverviewValues     = $true
        }
        Add-AnalyzedResultInformation @params
    }
}