PostgreSQL Log Checkpoints Disabled
- Query id: 7ab33ac0-e4a3-418f-a673-50da4e34df21
- Query name: PostgreSQL Log Checkpoints Disabled
- Platform: Ansible
- Severity: Medium
- Category: Observability
- URL: Github
Description¶
Make sure that for Postgre SQL Database Server, parameter 'log_checkpoints' is set to 'ON'
Documentation
Code samples¶
Code samples with security vulnerabilities¶
Positive test num. 1 - yaml file
---
- name: Update PostgreSQL Server setting
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: log_checkpoints
value: off
- name: Update PostgreSQL Server setting2
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: log_checkpoints
value: Off
- name: Update PostgreSQL Server setting3
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: log_checkpoints
value: OFF
- name: Update PostgreSQL Server setting4
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: log_checkpoints
value: "off"
- name: Update PostgreSQL Server setting5
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: log_checkpoints
value: "Off"
- name: Update PostgreSQL Server setting6
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: log_checkpoints
value: "OFF"
Code samples without security vulnerabilities¶
Negative test num. 1 - yaml file
- name: Update PostgreSQL Server setting
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: log_checkpoints
value: on
- name: Update PostgreSQL Server setting2
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: log_checkpoints
value: On
- name: Update PostgreSQL Server setting3
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: log_checkpoints
value: ON
- name: Update PostgreSQL Server setting4
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: log_checkpoints
value: on
- name: Update PostgreSQL Server setting5
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: log_checkpoints
value: On
- name: Update PostgreSQL Server setting6
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: log_checkpoints
value: ON