SQL server vulnerability assessments are not enabled Affecting Database service in Azure


Severity

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

Is your enviroment 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-Azure
  • Snyk ID SNYK-CC-00698
  • credit Snyk Research Team

Description

The SQL vulnerability assessment service scans databases for known security vulnerabilities and highlights issues such as misconfigurations, excessive permissions, and unprotected sensitive data.

How to fix?

Set isEnabled attribute to true in properties.recurringScans.

Example Configuration

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "resources": [
        {
            "name": "example698a1/allowed",
            "type": "Microsoft.Sql/servers/vulnerabilityAssessments",
            "apiVersion": "2018-06-01-preview",
            "properties": {
                "storageContainerPath": "[concat(reference(resourceId('Microsoft.Storage/storageAccounts', 'example698')).primaryEndpoints.blob, 'vulnerability-assessment')]",
                "storageAccountAccessKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', 'example698'), '2018-02-01').keys[0].value]",
                "recurringScans": {
                    "isEnabled": true,
                    "emailSubscriptionAdmins": true,
                    "emails": []
                }
            },
            "dependsOn": [
                "[concat('Microsoft.Storage/storageAccounts/', 'example698')]",
                "[concat('Microsoft.Sql/servers/', 'example698a1', '/securityAlertPolicies/Default')]"
            ]
        }
    ]
}