More Info:
Enable Vulnerability Assessment (VA) setting Also send email notifications to admins and subscription ownersRisk Level
MediumAddress
SecurityCompliance Standards
CISAZURE, CBPTriage and Remediation
Remediation
Using Console
Using Console
To remediate this misconfiguration in Azure using the Azure console, follow these steps:
- Log in to the Azure portal (https://portal.azure.com/).
- Navigate to the Security Center dashboard.
- Click on “Security policy” on the left-hand side of the screen.
- Select the subscription you want to remediate.
- Click on “Vulnerability assessment settings” in the “Security policy” window.
- Ensure that the “Email notifications to subscription owners and admins” toggle is turned on.
- If the toggle is not turned on, click on the toggle to turn it on.
- Click on “Save” to save the changes.
Using CLI
Using CLI
To remediate the misconfiguration “Ensure Vulnerability Assessment Setting To Send Email Notifications To Admins And Subscription Owners Is Set” for Azure using Azure CLI, follow the below steps:
- Open the Azure CLI on your computer.
-
Login to your Azure account using the command:
az login
-
Select the Azure subscription in which the misconfiguration exists using the command:
az account set --subscription <subscription_id>
Replace<subscription_id>
with the ID of your Azure subscription. -
Run the below command to enable email notifications for vulnerability assessment:
az security va-notification-contacts create --email <email_address> --phone <phone_number> --alert-notifications true --security-contact-name <contact_name>
Replace<email_address>
with the email address of the admin or subscription owner who needs to receive the email notifications. Replace<phone_number>
with the phone number of the admin or subscription owner who needs to receive the SMS notifications. Replace<contact_name>
with the name of the contact to be created. -
If you want to verify that the email notifications have been enabled, you can run the below command:
az security va-notification-contacts list
This command will list all the notification contacts that have been created.
Using Python
Using Python
To remediate the misconfiguration “Ensure Vulnerability Assessment Setting To Send Email Notifications To Admins And Subscription Owners Is Set” for Azure using Python, follow the below steps:By following these steps, you can remediate the misconfiguration “Ensure Vulnerability Assessment Setting To Send Email Notifications To Admins And Subscription Owners Is Set” for Azure using Python.
- Import the required libraries:
- Authenticate to Azure using the DefaultAzureCredential:
- Get the current email notification settings:
- Check if the email notification settings are configured to send notifications to admins and subscription owners:
- Create a new email notification subscription:
- Verify that the email notification subscription was created successfully: