Bylaw

Gallery › Security Center › Azure built-in policies

[Deprecated]: Adaptive application controls for defining safe applications should be enabled on your machines

Converted Policy AuditIfNotExists Disabled Mode All Version 3.1.0-deprecated Deprecated

Enable application controls to define safe applications and get alerts for others, enhancing security. This policy is deprecated due to the 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_AdaptiveApplicationControls_Audit.json · 57 lines
{
  "properties": {
    "displayName": "[Deprecated]: Adaptive application controls for defining safe applications should be enabled on your machines",
    "policyType": "BuiltIn",
    "mode": "All",
    "description": "Enable application controls to define safe applications and get alerts for others, enhancing security. This policy is deprecated due to the 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"
        ]
      },
      "then": {
        "effect": "[parameters('effect')]",
        "details": {
          "type": "Microsoft.Security/assessments",
          "name": "35f45c95-27cf-4e52-891f-8390d1de5828",
          "existenceCondition": {
            "field": "Microsoft.Security/assessments/status.code",
            "in": [
              "NotApplicable",
              "Healthy"
            ]
          }
        }
      }
    },
    "versions": [
      "3.1.0",
      "3.0.0"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/47a6b606-51aa-4496-8bb7-64b11cf66adc",
  "name": "47a6b606-51aa-4496-8bb7-64b11cf66adc"
}
Bylaw47a6b606-51aa-4496-8bb7-64b11cf66adc.bylaw.ps1 · 34 lines
# Converted from ASC_AdaptiveApplicationControls_Audit.json by ConvertTo-Bylaw.
Policy '47a6b606-51aa-4496-8bb7-64b11cf66adc' {

    Properties @{
        DisplayName   = '[Deprecated]: Adaptive application controls for defining safe applications should be enabled on your machines'
        Description   = 'Enable application controls to define safe applications and get alerts for others, enhancing security. This policy is deprecated due to the 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 2 values' {
            Field type | Must -Not -BeIn @('Microsoft.Compute/virtualMachines', 'Microsoft.ClassicCompute/virtualMachines') -IfPresent
        }
    }

    AuditIfNotExists 'Microsoft.Security/assessments' -Name '35f45c95-27cf-4e52-891f-8390d1de5828' -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_AdaptiveApplicationControls_Audit.json in Azure/azure-policy, under the MIT licence.