Skip to content

Commit

Permalink
fix log_min_messages_invalid_value Checkmarx#1880 (Checkmarx#1882)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarvalhox authored Jan 29, 2021
1 parent d6f25fc commit 6835c1e
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ CxPolicy[result] {
instance := task["google.cloud.gcp_sql_instance"]
settings := instance.settings
database_flags := settings.database_flags

not check_database_flags_content(database_flags)
database_flags[x].name == "log_min_messages"
not check_database_flags_content(database_flags[x])

result := {
"documentId": document.id,
Expand All @@ -27,14 +27,6 @@ getTasks(document) = result {
}

check_database_flags_content(database_flags) {
database_flags[x].name == "log_min_messages"
cmd := ["fatal", "panic", "log", "error", "warning", "notice", "info", "debug1", "debug2", "debug3", "debug4", "debug5"]
some k
contains(database_flags[x].value, cmd[k])
}

check_database_flags_content(database_flags) {
database_flags.name == "log_min_messages"
cmd := ["fatal", "panic", "log", "error", "warning", "notice", "info", "debug1", "debug2", "debug3", "debug4", "debug5"]
some k
contains(database_flags.value, cmd[k])
Expand Down

0 comments on commit 6835c1e

Please sign in to comment.