Gallery › Security Center › Azure built-in policies
Cloud Services (extended support) role instances should be configured securely
Converted Policy AuditIfNotExists Disabled Mode Indexed Version 1.0.0
Protect your Cloud Service (extended support) role instances from attacks by ensuring they are not expolosed to any OS vulnerabilities.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONASC_CsesOSVulnerabilities_Audit.json · 52 lines
{
"properties": {
"displayName": "Cloud Services (extended support) role instances should be configured securely",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Protect your Cloud Service (extended support) role instances from attacks by ensuring they are not expolosed to any OS vulnerabilities.",
"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": "8941d121-f740-35f6-952c-6561d2b38d36",
"existenceCondition": {
"field": "Microsoft.Security/assessments/status.code",
"in": [
"NotApplicable",
"Healthy"
]
}
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/a0c11ca4-5828-4384-a2f2-fd7444dd5b4d",
"name": "a0c11ca4-5828-4384-a2f2-fd7444dd5b4d"
}Bylawa0c11ca4-5828-4384-a2f2-fd7444dd5b4d.bylaw.ps1 · 28 lines
# Converted from ASC_CsesOSVulnerabilities_Audit.json by ConvertTo-Bylaw.
Policy 'a0c11ca4-5828-4384-a2f2-fd7444dd5b4d' {
Properties @{
DisplayName = 'Cloud Services (extended support) role instances should be configured securely'
Description = 'Protect your Cloud Service (extended support) role instances from attacks by ensuring they are not expolosed to any OS vulnerabilities.'
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 '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_CsesOSVulnerabilities_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw