Project: KICS (Provisioning / Security & Compliance)
File: 4d522e7b-f938-4d51-a3b1-974ada528bd3.md

title: Log Profile Incorrect Category hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 4d522e7b-f938-4d51-a3b1-974ada528bd3 Query name: Log Profile Incorrect Category Platform: AzureResourceManager Severity: <span style="color:#edd57e">Low</span> Category: Observability URL: Log Profile Categories should be set to 'Write', 'Delete', and/or 'Action'<br> ```json title="Positive test num. 1 - json file" hl_lines="22" { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "2.0.0.0", "apiProfile": "2019-03-01-hybrid", "parameters": {}, "variables": {}, "functions": [], "resources": [ { "name": "string", "type": "microsoft.insights/logprofiles", "apiVersion": "2016-03-01", "location": "eastus", "tags": {}, "properties": { "storageAccountId": "storageAccountId", "serviceBusRuleId": "serviceBusRuleId", "locations": [ "eastus" ], "categories": [ "Writ" ], "retentionPolicy": { "enabled": true, "days": 450 } } } ], "outputs": {} } ``` ```json title="Positive test num. 2 - json file" hl_lines="24" { "properties": { "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "2.0.0.0", "apiProfile": "2019-03-01-hybrid", "parameters": {}, "variables": {}, "functions": [], "resources": [ { "name": "string", "type": "microsoft.insights/logprofiles", "apiVersion": "2016-03-01", "location": "eastus", "tags": {}, "properties": { "storageAccountId": "storageAccountId", "serviceBusRuleId": "serviceBusRuleId", "locations": [ "eastus" ], "categories": [ "Writ" ], "retentionPolicy": { "enabled": true, "days": 450 } } } ], "outputs": {} }, "parameters": {} }, "kind": "template", "type": "Microsoft.Blueprint/blueprints/artifacts", "name": "myTemplate" } ``` ```json title="Negative test num. 1 - json file" { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "2.0.0.0", "apiProfile": "2019-03-01-hybrid", "parameters": {}, "variables": {}, "functions": [], "resources": [ { "name": "string", "type": "microsoft.insights/logprofiles", "apiVersion": "2016-03-01", "location": "eastus", "tags": {}, "properties": { "storageAccountId": "storageAccountId", "serviceBusRuleId": "serviceBusRuleId", "locations": [ "eastus" ], "categories": [ "Write" ], "retentionPolicy": { "enabled": true, "days": 450 } } } ], "outputs": {} } ``` ```json title="Negative test num. 2 - json file" { "properties": { "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "2.0.0.0", "apiProfile": "2019-03-01-hybrid", "parameters": {}, "variables": {}, "functions": [], "resources": [ { "name": "string", "type": "microsoft.insights/logprofiles", "apiVersion": "2016-03-01", "location": "eastus", "tags": {}, "properties": { "storageAccountId": "storageAccountId", "serviceBusRuleId": "serviceBusRuleId", "locations": [ "eastus" ], "categories": [ "Write" ], "retentionPolicy": { "enabled": true, "days": 450 } } } ], "outputs": {} }, "parameters": {} }, "kind": "template", "type": "Microsoft.Blueprint/blueprints/artifacts", "name": "myTemplate" } ```