Monitor activity log alert is not configured for "Create or Update or Delete SQL Server Firewall Rule" events Affecting Monitor service in Azure


Severity

0.0
medium
0
10
Severity Framework
Snyk CCSS
Rule category
Monitoring/ Network

Is your environment affected by this misconfiguration?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
Frameworks
CIS-AzureCIS-ControlsHIPAAISO-27001NIST-800-53PCI-DSSSOC-2
  • Snyk IDSNYK-CC-00685
  • creditSnyk Research Team

Description

Monitoring for "Create or Update or Delete SQL Server Firewall Rule" events gives insight into network access changes and may reduce the time it takes to detect suspicious activity.

How to fix?

Set field operationName to Microsoft.Sql/servers/firewallRules/write and set enabled to true or remove the attribute.

Example Configuration

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "resources": [
        {
            "type": "Microsoft.Insights/activityLogAlerts",
            "apiVersion": "2017-04-01",
            "name": "default",
            "location": "global",
            "properties": {
                "scopes": [
                    "[subscription().id]"
                ],
                "condition": {
                    "allOf": [
                        {
                            "field": "category",
                            "equals": "Administrative"
                        },
                        {
                            "field": "operationName",
                            "equals": "Microsoft.Sql/servers/firewallRules/write"
                        }
                    ]
                },
                "actions": {
                    "actionGroups": []
                }
            }
        }
    ]
}