Bylaw

Gallery › Regulatory Compliance › Azure built-in policies

Correlate Vulnerability scan information

Converted Policy Disabled Manual Mode All Version 1.1.1

CMA_C1558 - Correlate Vulnerability scan information

ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.

Azure Policy JSONCMA_C1558.json · 45 lines
{
  "properties": {
    "displayName": "Correlate Vulnerability scan information",
    "policyType": "BuiltIn",
    "mode": "All",
    "description": "CMA_C1558 - Correlate Vulnerability scan information",
    "metadata": {
      "version": "1.1.1",
      "category": "Regulatory Compliance",
      "additionalMetadataId": "/providers/Microsoft.PolicyInsights/policyMetadata/CMA_C1558"
    },
    "version": "1.1.1",
    "parameters": {
      "effect": {
        "type": "String",
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy"
        },
        "allowedValues": [
          "Manual",
          "Disabled"
        ],
        "defaultValue": "Manual"
      }
    },
    "policyRule": {
      "if": {
        "field": "type",
        "equals": "Microsoft.Resources/subscriptions"
      },
      "then": {
        "effect": "[parameters('effect')]",
        "details": {
          "defaultState": "Unknown"
        }
      }
    },
    "versions": [
      "1.1.1"
    ]
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/e3905a3c-97e7-0b4f-15fb-465c0927536f",
  "name": "e3905a3c-97e7-0b4f-15fb-465c0927536f"
}
Bylawe3905a3c-97e7-0b4f-15fb-465c0927536f.bylaw.ps1 · 24 lines
# Converted from CMA_C1558.json by ConvertTo-Bylaw.
Policy 'e3905a3c-97e7-0b4f-15fb-465c0927536f' {

    Properties @{
        DisplayName   = 'Correlate Vulnerability scan information'
        Description   = 'CMA_C1558 - Correlate Vulnerability scan information'
        Version       = '1.1.1'
        Category      = 'Regulatory Compliance'
        PolicyVersion = '1.1.1'
        Mode          = 'All'
        Metadata      = [ordered]@{ additionalMetadataId = '/providers/Microsoft.PolicyInsights/policyMetadata/CMA_C1558' }
    }

    Parameter Effect @{
        AllowedValues = @('Manual', 'Disabled')
        Default       = 'Manual'
        DisplayName   = 'Effect'
        Description   = 'Enable or disable the execution of the policy'
    }

    Resource 'Microsoft.Resources/subscriptions'

    Manual -DefaultState Unknown -Effect (Param Effect)
}

Source: built-in-policies/policyDefinitions/Regulatory Compliance/CMA_C1558.json in Azure/azure-policy, under the MIT licence.