Gallery › Regulatory Compliance › Azure built-in policies
Prohibit binary/machine-executable code
Converted Policy Disabled Manual Mode All Version 1.1.0
CMA_C1717 - Prohibit binary/machine-executable code
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONCMA_C1717.json · 45 lines
{
"properties": {
"displayName": "Prohibit binary/machine-executable code",
"policyType": "BuiltIn",
"mode": "All",
"description": "CMA_C1717 - Prohibit binary/machine-executable code",
"metadata": {
"version": "1.1.0",
"category": "Regulatory Compliance",
"additionalMetadataId": "/providers/Microsoft.PolicyInsights/policyMetadata/CMA_C1717"
},
"version": "1.1.0",
"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.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/8e920169-739d-40b5-3f99-c4d855327bb2",
"name": "8e920169-739d-40b5-3f99-c4d855327bb2"
}Bylaw8e920169-739d-40b5-3f99-c4d855327bb2.bylaw.ps1 · 24 lines
# Converted from CMA_C1717.json by ConvertTo-Bylaw.
Policy '8e920169-739d-40b5-3f99-c4d855327bb2' {
Properties @{
DisplayName = 'Prohibit binary/machine-executable code'
Description = 'CMA_C1717 - Prohibit binary/machine-executable code'
Version = '1.1.0'
Category = 'Regulatory Compliance'
PolicyVersion = '1.1.0'
Mode = 'All'
Metadata = [ordered]@{ additionalMetadataId = '/providers/Microsoft.PolicyInsights/policyMetadata/CMA_C1717' }
}
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_C1717.json in Azure/azure-policy, under the MIT licence.
Bylaw