59 lines
2.4 KiB
YAML
59 lines
2.4 KiB
YAML
id: azure-security-solutions-update-unalerted
|
|
info:
|
|
name: Azure Security Solutions Create/Update Alert Not Configured
|
|
author: princechaddha
|
|
severity: high
|
|
description: |
|
|
Ensure that an Azure activity log alert is fired whenever "Create" or "Update Security Solution" events are triggered in your Microsoft Azure cloud account. Activity log alerts get activated when a new activity log event that matches the condition specified in the alert occurs. In this case, the alert condition that this conformity rule searches for is 'Whenever the Security Activity Log "Create or Update Security Solutions (Microsoft.Security/securitySolutions)" has "any" level, with "any" status and event is initiated by "any".
|
|
impact: |
|
|
Without proper alert rules configured for monitoring "Create or Update Security Solution" events, unauthorized or unwanted changes might go unnoticed, leading to potential security risks.
|
|
remediation: |
|
|
Ensure alert rules are properly configured to monitor and notify on "Create or Update Security Solution" events by setting the alert condition to "Microsoft.Security/securitySolutions/write" and ensuring that an action group is attached to manage notifications.
|
|
reference:
|
|
- https://docs.microsoft.com/en-us/azure/azure-monitor/platform/alerts-activity-log
|
|
tags: cloud,devops,azure,microsoft,security-solutions,azure-cloud-config
|
|
|
|
flow: |
|
|
code(1);
|
|
for (let AlertData of iterate(template.alertList)) {
|
|
set("id", AlertData);
|
|
code(2);
|
|
}
|
|
|
|
self-contained: true
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
az monitor activity-log alert list --output json --query '[?(enabled==`true`)].id'
|
|
|
|
extractors:
|
|
- type: json
|
|
name: alertList
|
|
internal: true
|
|
json:
|
|
- '.[]'
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
az monitor activity-log alert show --ids "$id" --query 'condition'
|
|
|
|
matchers-condition: and
|
|
matchers:
|
|
- type: word
|
|
words:
|
|
- '"field": "operationName"'
|
|
|
|
- type: word
|
|
words:
|
|
- "Microsoft.Security/securitySolutions/write"
|
|
negative: true
|
|
|
|
extractors:
|
|
- type: dsl
|
|
dsl:
|
|
- 'id + " does not have the correct alert configuration for Create/Update Security Solution events"'
|
|
# digest: 4b0a00483046022100e9d8ba6a76da681259be7e60c9c77067ffd2d5d2e029561d34470d1acbd7388f022100ff3a922681cc69fa9146b58cae1f751c2605706b10f00eee7c8f67cd4be93a38:922c64590222798bb761d5b6d8e72950 |