Gallery › Security Center › Azure built-in policies
[Deprecated]: Vulnerabilities should be remediated by a Vulnerability Assessment solution
Converted Policy AuditIfNotExists Disabled Mode All Version 3.0.0-deprecated Deprecated
Monitors vulnerabilities detected by Vulnerability Assessment solution and VMs without a Vulnerability Assessment solution in Azure Security Center as recommendations.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONASC_VMVulnerabilities_Audit.json · 56 lines
{
"properties": {
"displayName": "[Deprecated]: Vulnerabilities should be remediated by a Vulnerability Assessment solution",
"policyType": "BuiltIn",
"mode": "All",
"description": "Monitors vulnerabilities detected by Vulnerability Assessment solution and VMs without a Vulnerability Assessment solution in Azure Security Center as recommendations.",
"metadata": {
"version": "3.0.0-deprecated",
"category": "Security Center",
"deprecated": true
},
"version": "3.0.0",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "Disabled",
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
}
}
},
"policyRule": {
"if": {
"field": "type",
"in": [
"Microsoft.Compute/virtualMachines",
"Microsoft.ClassicCompute/virtualMachines"
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Security/assessments",
"name": "71992a2a-d168-42e0-b10e-6b45fa2ecddb",
"existenceCondition": {
"field": "Microsoft.Security/assessments/status.code",
"in": [
"NotApplicable",
"Healthy"
]
}
}
}
},
"versions": [
"3.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/760a85ff-6162-42b3-8d70-698e268f648c",
"name": "760a85ff-6162-42b3-8d70-698e268f648c"
}Bylaw760a85ff-6162-42b3-8d70-698e268f648c.bylaw.ps1 · 34 lines
# Converted from ASC_VMVulnerabilities_Audit.json by ConvertTo-Bylaw.
Policy '760a85ff-6162-42b3-8d70-698e268f648c' {
Properties @{
DisplayName = '[Deprecated]: Vulnerabilities should be remediated by a Vulnerability Assessment solution'
Description = 'Monitors vulnerabilities detected by Vulnerability Assessment solution and VMs without a Vulnerability Assessment solution in Azure Security Center as recommendations.'
Version = '3.0.0-deprecated'
Category = 'Security Center'
Deprecated = $true
PolicyVersion = '3.0.0'
Mode = 'All'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('AuditIfNotExists', 'Disabled')
Default = 'Disabled'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource * {
Require 'type is not one of 2 values' {
Field type | Must -Not -BeIn @('Microsoft.Compute/virtualMachines', 'Microsoft.ClassicCompute/virtualMachines') -IfPresent
}
}
AuditIfNotExists 'Microsoft.Security/assessments' -Name '71992a2a-d168-42e0-b10e-6b45fa2ecddb' -Effect (Param Effect) {
Require 'status.code is one of 2 values' {
Field status.code | Must -BeIn @('NotApplicable', 'Healthy')
}
}
}Source: built-in-policies/policyDefinitions/Security Center/ASC_VMVulnerabilities_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw