PostgreSQL Misconfigured Log Messages Flag
- Query id: 28a757fc-3d8f-424a-90c0-4233363b2711
- Query name: PostgreSQL Misconfigured Log Messages Flag
- Platform: Ansible
- Severity: Low
- Category: Observability
- CWE: 20
- URL: Github
Description¶
PostgreSQL database 'log_min_messages' flag isn't set to a valid value
Documentation
Code samples¶
Code samples with security vulnerabilities¶
Positive test num. 1 - yaml file
- name: sql_instance
google.cloud.gcp_sql_instance:
auth_kind: serviceaccount
database_version: SQLSERVER_13_1
name: "{{ resource_name }}-2"
project: test_project
region: us-central1
service_account_file: /tmp/auth.pem
settings:
database_flags:
- name: log_min_messages
value: debug6
tier: db-n1-standard-1
state: present
Code samples without security vulnerabilities¶
Negative test num. 1 - yaml file
- name: sql_instance
google.cloud.gcp_sql_instance:
auth_kind: serviceaccount
database_version: SQLSERVER_13_1
name: '{{ resource_name }}-2'
project: test_project
region: us-central1
service_account_file: /tmp/auth.pem
settings:
database_flags:
- name: log_min_messages
value: log
tier: db-n1-standard-1
state: present