diff --git a/psmodules/Check-DefenderForCloudConfig.zip b/psmodules/Check-DefenderForCloudConfig.zip index 75a65501..4b176ba0 100644 Binary files a/psmodules/Check-DefenderForCloudConfig.zip and b/psmodules/Check-DefenderForCloudConfig.zip differ diff --git a/setup/IaC/modules/automationaccount.bicep b/setup/IaC/modules/automationaccount.bicep index 8fafc049..88f7b62c 100644 --- a/setup/IaC/modules/automationaccount.bicep +++ b/setup/IaC/modules/automationaccount.bicep @@ -203,7 +203,7 @@ resource module14 'modules' = if (newDeployment || updatePSModules) { properties: { contentLink: { uri: '${ModuleBaseURL}/Check-DefenderForCloudConfig.zip' - version: '1.1.9' + version: '1.1.10' } } } diff --git a/src/GUARDRAIL 11 LOGGING AND MONITORING/Audit/Check-DefenderForCloudConfig.psd1 b/src/GUARDRAIL 11 LOGGING AND MONITORING/Audit/Check-DefenderForCloudConfig.psd1 index 36a06831..3a7f8bbc 100644 --- a/src/GUARDRAIL 11 LOGGING AND MONITORING/Audit/Check-DefenderForCloudConfig.psd1 +++ b/src/GUARDRAIL 11 LOGGING AND MONITORING/Audit/Check-DefenderForCloudConfig.psd1 @@ -14,7 +14,7 @@ RootModule = '.\Check-DefenderForCloudConfig.psm1' # Version number of this module. -ModuleVersion = '1.1.9' +ModuleVersion = '1.1.10' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/src/GUARDRAIL 11 LOGGING AND MONITORING/Audit/Check-DefenderForCloudConfig.psm1 b/src/GUARDRAIL 11 LOGGING AND MONITORING/Audit/Check-DefenderForCloudConfig.psm1 index 323ff8cf..884e62a8 100644 --- a/src/GUARDRAIL 11 LOGGING AND MONITORING/Audit/Check-DefenderForCloudConfig.psm1 +++ b/src/GUARDRAIL 11 LOGGING AND MONITORING/Audit/Check-DefenderForCloudConfig.psm1 @@ -48,7 +48,7 @@ function Get-DefenderForCloudConfig { $ErrorList.Add($errorMsg) } - if ([string]::IsNullOrEmpty($ContactInfo.Email) -or [string]::IsNullOrEmpty($null -eq $ContactInfo.Phone)) + if ([string]::IsNullOrEmpty($ContactInfo.emails) -or [string]::IsNullOrEmpty($null -eq $ContactInfo.phone)) { $nonCompliantSubs++ $Comments+= $msgTable.noSecurityContactInfo -f $sub.Name @@ -63,14 +63,22 @@ function Get-DefenderForCloudConfig { if ($defenderPlans.PricingTier -contains 'Free') { $nonCompliantSubs++ - $Comments += $msgTable.notAllDfCStandard -f $sub.Name + if ($Comments -eq ""){ + $Comments += $msgTable.notAllDfCStandard -f $sub.Name + } + else{ + $Comments += " " + $msgTable.notAllDfCStandard -f $sub.Name + } + } } + + # compliance status if ($nonCompliantSubs -eq 0) { $IsCompliant=$true - $Comments += "All subscriptions have a security contact and Defender for Cloud is set to Standard." + } else { $IsCompliant=$false @@ -78,6 +86,7 @@ function Get-DefenderForCloudConfig { if ($IsCompliant) { $Comments= $msgTable.logsAndMonitoringCompliantForDefender + $Comments += "All subscriptions have a security contact and Defender for Cloud is set to Standard." } $object = [PSCustomObject]@{