nuclei-templates/cloud/azure/postgresql/azure-postgres-log-checkpoi...

55 lines
2.1 KiB
YAML
Raw Normal View History

id: azure-postgres-log-checkpoints-disabled
info:
name: Azure PostgreSQL Flexible Server log_checkpoints Disabled
author: princechaddha
severity: medium
description: |
Ensure that "log_checkpoints" server parameter is enabled for all PostgreSQL flexible database servers available within your Microsoft Azure cloud account. The "log_checkpoints" parameter allows checkpoints and restart points to be logged in the Azure PostgreSQL server log.
impact: |
Disabling "log_checkpoints" can prevent logging of critical events such as checkpoints and restarts, which are important for troubleshooting and ensuring the reliability of the database service.
remediation: |
Enable the "log_checkpoints" parameter for your Azure PostgreSQL flexible servers to ensure critical operational events are logged.
reference:
- https://docs.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-server-parameters
tags: cloud,devops,azure,microsoft,postgres,azure-cloud-config
flow: |
code(1);
for (let ServerData of iterate(template.serverList)) {
ServerData = JSON.parse(ServerData);
set("name", ServerData.name);
set("resourceGroup", ServerData.resourceGroup);
code(2);
}
self-contained: true
code:
- engine:
- sh
- bash
source: |
az postgres flexible-server list --output json --query '[*].{"name":name,"resourceGroup":resourceGroup}'
extractors:
- type: json
name: serverList
internal: true
json:
- '.[]'
- engine:
- sh
- bash
source: |
az postgres flexible-server parameter show --server-name "$name" --resource-group "$resourceGroup" --name log_checkpoints --query 'value'
matchers:
- type: word
words:
- 'off'
extractors:
- type: dsl
dsl:
- 'name + " in " + resourceGroup + " has log_checkpoints disabled"'
2024-09-12 05:59:14 +00:00
# digest: 4a0a0047304502205ab9b96b01ba78c9c0410e1d5afc9dab49fc1f13ca64aa87066af09e1a2373d20221009ed066fe8d7c8ba9a5b83cbf5a64ae34d71a04c71b19bcc0b4ca11222046c003:922c64590222798bb761d5b6d8e72950