Gallery › Security Center › Azure built-in policies
[Deprecated]: Vulnerabilities in container security configurations should be remediated
Converted Policy AuditIfNotExists Disabled Mode All Version 3.1.0-deprecated Deprecated
Audit Docker security vulnerabilities and display recommendations in Azure Security Center. This policy is deprecated due to Azure Monitoring agent deprecation. Learn more at aka.ms/policydefdeprecation.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONASC_ContainerBenchmark_Audit.json · 58 lines
{
"properties": {
"displayName": "[Deprecated]: Vulnerabilities in container security configurations should be remediated",
"policyType": "BuiltIn",
"mode": "All",
"description": "Audit Docker security vulnerabilities and display recommendations in Azure Security Center. This policy is deprecated due to Azure Monitoring agent deprecation. Learn more 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",
"in": [
"Microsoft.Compute/virtualMachines",
"Microsoft.ClassicCompute/virtualMachines",
"Microsoft.Compute/virtualMachineScaleSets"
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Security/assessments",
"name": "0677209d-e675-2c6f-e91a-54cef2878663",
"existenceCondition": {
"field": "Microsoft.Security/assessments/status.code",
"in": [
"NotApplicable",
"Healthy"
]
}
}
}
},
"versions": [
"3.1.0",
"3.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/e8cbc669-f12d-49eb-93e7-9273119e9933",
"name": "e8cbc669-f12d-49eb-93e7-9273119e9933"
}Bylawe8cbc669-f12d-49eb-93e7-9273119e9933.bylaw.ps1 · 34 lines
# Converted from ASC_ContainerBenchmark_Audit.json by ConvertTo-Bylaw.
Policy 'e8cbc669-f12d-49eb-93e7-9273119e9933' {
Properties @{
DisplayName = '[Deprecated]: Vulnerabilities in container security configurations should be remediated'
Description = 'Audit Docker security vulnerabilities and display recommendations in Azure Security Center. This policy is deprecated due to Azure Monitoring agent deprecation. Learn more at aka.ms/policydefdeprecation.'
Version = '3.1.0-deprecated'
Category = 'Security Center'
Deprecated = $true
PolicyVersion = '3.1.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 3 values' {
Field type | Must -Not -BeIn @('Microsoft.Compute/virtualMachines', 'Microsoft.ClassicCompute/virtualMachines', 'Microsoft.Compute/virtualMachineScaleSets') -IfPresent
}
}
AuditIfNotExists 'Microsoft.Security/assessments' -Name '0677209d-e675-2c6f-e91a-54cef2878663' -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_ContainerBenchmark_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw