Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GoogleCloudPostgreSql checks falsely pass when not declared at all #3323

Closed
losisin opened this issue Aug 8, 2022 · 1 comment · Fixed by #3457
Closed

GoogleCloudPostgreSql checks falsely pass when not declared at all #3323

losisin opened this issue Aug 8, 2022 · 1 comment · Fixed by #3457
Labels
checks Check additions or changes terraform

Comments

@losisin
Copy link
Contributor

losisin commented Aug 8, 2022

Describe the issue
Checks regarding GoogleCloudPostgreSql (database_flags) seems to return failure only when explicitly set while not taking into account default behaviour from cloud provider. Instead, I would suggest we invert the logic of the tests and also add missing flags as failure. I've tested this with log_lock_waits and log_connections and by looking at code it seems to expand to more. I would like to volunteer to fine comb all those checks according to official documentation and maybe even add some more checks.

Examples
It should be if (flag['name'] == 'log_lock_waits') and (flag['value'] == 'on'): and also fix pass2 in example as fail2 and add it in test.

Version (please complete the following information):

  • Checkov Version 2.1.90
@losisin losisin added the checks Check additions or changes label Aug 8, 2022
@gruebel
Copy link
Contributor

gruebel commented Aug 19, 2022

hey @losisin thanks for reaching out. Sure, we are always happy about contributions 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
checks Check additions or changes terraform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants