Gallery › Security Center › Azure built-in policies
[Deprecated]: Vulnerabilities in security configuration on your virtual machine scale sets should be remediated
Converted Policy AuditIfNotExists Disabled Mode Indexed Version 3.1.0-deprecated Deprecated
Audit the OS vulnerabilities on your virtual machine scale sets to protect them from attacks, This policy is deprecated because it depends on the Azure Monitoring agent, which has also been deprecated. Learn more about policy definition deprecation at aka.ms/policydefdeprecation.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONASC_VmssOSVulnerabilities_Audit.json · 54 lines
{
"properties": {
"displayName": "[Deprecated]: Vulnerabilities in security configuration on your virtual machine scale sets should be remediated",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Audit the OS vulnerabilities on your virtual machine scale sets to protect them from attacks, This policy is deprecated because it depends on the Azure Monitoring agent, which has also been deprecated. Learn more about policy definition deprecation at aka.ms/policydefdeprecation.",
"metadata": {
"version": "3.1.0-deprecated",
"category": "Security Center",
"deprecated": true
},
"version": "3.1.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",
"equals": "Microsoft.Compute/virtualMachineScaleSets"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Security/assessments",
"name": "8941d121-f740-35f6-952c-6561d2b38d36",
"existenceCondition": {
"field": "Microsoft.Security/assessments/status.code",
"in": [
"NotApplicable",
"Healthy"
]
}
}
}
},
"versions": [
"3.1.0",
"3.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/3c735d8a-a4ba-4a3a-b7cf-db7754cf57f4",
"name": "3c735d8a-a4ba-4a3a-b7cf-db7754cf57f4"
}Bylaw3c735d8a-a4ba-4a3a-b7cf-db7754cf57f4.bylaw.ps1 · 29 lines
# Converted from ASC_VmssOSVulnerabilities_Audit.json by ConvertTo-Bylaw.
Policy '3c735d8a-a4ba-4a3a-b7cf-db7754cf57f4' {
Properties @{
DisplayName = '[Deprecated]: Vulnerabilities in security configuration on your virtual machine scale sets should be remediated'
Description = 'Audit the OS vulnerabilities on your virtual machine scale sets to protect them from attacks, This policy is deprecated because it depends on the Azure Monitoring agent, which has also been deprecated. Learn more about policy definition deprecation at aka.ms/policydefdeprecation.'
Version = '3.1.0-deprecated'
Category = 'Security Center'
Deprecated = $true
PolicyVersion = '3.1.0'
Mode = 'Indexed'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('AuditIfNotExists', 'Disabled')
Default = 'Disabled'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Compute/virtualMachineScaleSets'
AuditIfNotExists 'Microsoft.Security/assessments' -Name '8941d121-f740-35f6-952c-6561d2b38d36' -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_VmssOSVulnerabilities_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw