Gallery › Security Center › Azure built-in policies
Cloud Services (extended support) role instances should have system updates installed
Converted Policy AuditIfNotExists Disabled Mode Indexed Version 1.0.0
Secure your Cloud Services (extended support) role instances by ensuring the latest security and critical updates are installed on them.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONASC_CsesMissingSystemUpdates_Audit.json · 52 lines
{
"properties": {
"displayName": "Cloud Services (extended support) role instances should have system updates installed",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Secure your Cloud Services (extended support) role instances by ensuring the latest security and critical updates are installed on them.",
"metadata": {
"version": "1.0.0",
"category": "Security Center"
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "AuditIfNotExists",
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
}
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Compute/cloudServices"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Security/assessments",
"name": "bd20bd91-aaf1-7f14-b6e4-866de2f43146",
"existenceCondition": {
"field": "Microsoft.Security/assessments/status.code",
"in": [
"NotApplicable",
"Healthy"
]
}
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/4df26ba8-026d-45b0-9521-bffa44d741d2",
"name": "4df26ba8-026d-45b0-9521-bffa44d741d2"
}Bylaw4df26ba8-026d-45b0-9521-bffa44d741d2.bylaw.ps1 · 28 lines
# Converted from ASC_CsesMissingSystemUpdates_Audit.json by ConvertTo-Bylaw.
Policy '4df26ba8-026d-45b0-9521-bffa44d741d2' {
Properties @{
DisplayName = 'Cloud Services (extended support) role instances should have system updates installed'
Description = 'Secure your Cloud Services (extended support) role instances by ensuring the latest security and critical updates are installed on them.'
Version = '1.0.0'
Category = 'Security Center'
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('AuditIfNotExists', 'Disabled')
Default = 'AuditIfNotExists'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Compute/cloudServices'
AuditIfNotExists 'Microsoft.Security/assessments' -Name 'bd20bd91-aaf1-7f14-b6e4-866de2f43146' -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_CsesMissingSystemUpdates_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw