More Info:
Security solution changes have been detected within your Microsoft Azure cloud account.Risk Level
HighAddress
SecurityCompliance Standards
- CIS AZURE
- Cloudanix Best Practice
- HIPAA
- ISO 27001
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
Sure, here are the step by step instructions to remediate the misconfiguration of “Create Alert for Create or Update Security Solution Events” for Azure using Azure console:
- Login to the Azure portal (https://portal.azure.com/).
- Click on “All services” on the left-hand side of the page and search for “Security Center” in the search bar.
- Click on “Security Center” and select “Security policy” from the left-hand side menu.
- In the “Security policy” page, click on the “Edit” button to edit the security policy.
- Scroll down to the “Activity log alerts” section and click on the “Add activity log alert” button.
- In the “Add activity log alert” page, fill in the required fields:
- Name: Enter a name for the alert.
- Description: Enter a description for the alert.
- Subscription: Select the subscription in which you want to create the alert.
- Resource group: Select the resource group in which you want to create the alert.
- Event category: Select “Security” from the drop-down menu.
- Event type: Select “Microsoft.Security/complianceResults/write” from the drop-down menu.
- Severity: Select the severity level for the alert.
- Action group: Select an action group to trigger when the alert is fired.
- Tags: Add relevant tags if required.
- Click on the “OK” button to create the alert.
Using CLI
Using CLI
To remediate the misconfiguration “Create Alert for ‘Create or Update Security Solution’ Events” in Azure using Azure CLI, follow the below steps:Step 1: Open the Azure CLI in your local machine or Azure portal.Step 2: Run the following command to create an alert rule for “Create or Update Security Solution” events:Here, replace the Here, replace the
<Alert_Rule_Name> with the name of the alert rule you want to create, <Description> with the description of the alert rule, <Resource_ID> with the ID of the resource for which you want to create the alert, and <Action_Group_ID> with the ID of the action group to which you want to send the alert notification.Step 3: Verify the alert rule by running the following command:<Alert_Rule_Name> with the name of the alert rule you created in step 2, and <Resource_Group_Name> with the name of the resource group where the resource is located.Step 4: If the alert rule is working correctly, you will receive notifications whenever a “Create or Update Security Solution” event occurs.Note: You can also create the alert rule using the Azure portal or Azure PowerShell.Using Python
Using Python
To remediate this misconfiguration in Azure, you can use the Azure SDK for Python to create an alert for “Create or Update Security Solution” events. Here are the steps:This will create an alert rule in Azure that will trigger an email notification when a “Create or Update Security Solution” event occurs. You can customize the alert rule by changing the conditions and actions as needed.
- Install the Azure SDK for Python by running the following command in your terminal:
- Import the necessary modules in your Python script:
- Set up your Azure credentials by creating a Service Principal and assigning it the necessary permissions. You will need the following information:
- Subscription ID
- Tenant ID
- Client ID
- Client Secret
- Create an instance of the
MonitorManagementClient:
- Define the conditions for the alert rule. In this case, we want to create an alert for “Create or Update Security Solution” events. We will use the
ManagementEventRuleConditionto specify this:
- Define the actions to take when the alert is triggered. In this case, we will send an email to a specified email address:
- Create the alert rule:
Using Terraform
Using Terraform
terraform plan should show one new azurerm_monitor_action_group and one new azurerm_monitor_activity_log_alert to be created, with the criteria.operation_name exactly set to "Create or Update Security Solution".
