Log Retention Is Not Set

  • Query id: 0461b4fd-21ef-4687-929e-484ee4796785
  • Query name: Log Retention Is Not Set
  • Platform: Ansible
  • Severity: Medium
  • Category: Observability
  • URL: Github

Description

Make sure that for PostgreSQL Database, server parameter 'log_retention' is set to 'ON'
Documentation

Code samples

Code samples with security vulnerabilities

Postitive test num. 1 - yaml file
---
- name: Update PostgreSQL Server setting
  azure_rm_postgresqlconfiguration:
    resource_group: myResourceGroup
    server_name: myServer
    name: log_retention
    value: off

Code samples without security vulnerabilities

Negative test num. 1 - yaml file
- name: Update PostgreSQL Server setting
  azure_rm_postgresqlconfiguration:
    resource_group: myResourceGroup
    server_name: myServer
    name: log_retention
    value: on