Skip to content

Commit

Permalink
Clean logs for C002. (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoireW authored Nov 15, 2024
1 parent 032d5d1 commit aec0e25
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 185 deletions.
2 changes: 1 addition & 1 deletion dblinter/default_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cluster:
- downsize max_connections or upsize memory.
- name: PgHbaEntriesWithMethodTrustOrPasswordShouldNotExists
ruleid: C002
enabled: false
enabled: True
params:
- warning: 1
context:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ def pg_hba_entries_with_trust_or_password_method(
"SELECT count(*) FROM pg_catalog.pg_hba_file_rules WHERE auth_method in ('trust','password')"
)[0][0]

warning = extract_param(param, "warning")
warning = int(extract_param(param, "warning"))

if trust_password >= warning:
message_args = (trust_password, warning)
sarif_document.add_check(
self.get_ruleid_from_function_name(), message_args, db.database, context
)
else:
LOGGER.error("Error: param warning is missing in the configuration file")
181 changes: 0 additions & 181 deletions default_config.yaml

This file was deleted.

0 comments on commit aec0e25

Please sign in to comment.