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

feat(terraform): add CKV NCP check about NKS(kubernetes) logging #3855

Merged
merged 41 commits into from
Nov 24, 2022

Conversation

pj991207
Copy link
Contributor

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Description

Add terraform scan rules about provider Naver Cloud Platform.
CKV_NCP_21 is associated with "NKS control plane logging enabled for all log types"

Description

https://registry.terraform.io/providers/NaverCloudPlatform/ncloud/latest/docs/resources/nks_cluster

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

pj991207 and others added 30 commits October 27, 2022 18:12
from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceCheck


class NKSControlPlaneLogging(BaseResourceCheck):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be great if you can change it to a BaseResourceValueCheck, makes it much easier 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank your advice. I fixed my code.

Copy link
Contributor

@gruebel gruebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, thanks for the change, one more improvement suggested

@gruebel gruebel changed the title feat(terraform): add CKV NCP rules about NKS(kubernetes) logging feat(terraform): add CKV NCP check about NKS(kubernetes) logging Nov 22, 2022
@gruebel
Copy link
Contributor

gruebel commented Nov 22, 2022

hey @pj991207 can you commit something in and out again, somehow the workflow was not triggered.

Copy link
Contributor

@gruebel gruebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍻

@gruebel gruebel merged commit 05eeaa0 into bridgecrewio:master Nov 24, 2022
mayblo pushed a commit to cider-rnd/checkov that referenced this pull request Nov 24, 2022
…dgecrewio#3855)

* [22.10.27][add]LBListenerUsesSecureProtocols

* [22.11.01][add]NksPublicAccess

* [22.11.01][delete]ncp-13 rule

* [22.11.01][fix]NksPublicAccess Description fix

* [22.11.01][fix] test_NksPublicAccess.py

* [22.11.05][add]NCP_LBTargetGroupUsingHTTPS

* [22.11.05][delete]ncp_13_rule

* [22.11.06][addNCP_LBNetworkPrivate

* [22.11.08][add]CKV_NCP_18

* [22.11.08][add]NCP_CKV_39

* [22.11.08][fix]CKV_NCP_21

* [22.11.08][delete]CKVP_NCP_15

* [22.11.08]CKV_NCP_32

* Revert "[22.11.08]CKV_NCP_32"

This reverts commit c3aa017.

* [22.11.08][add]CKV_NCP_32

* Revert "[22.11.08][add]CKV_NCP_32"

This reverts commit b7341f7.

* [22.11.12][fix]CKV_NCP_27

* [22.11.12][fix]CKV_NCP_27

* [22.11.14][fix]NCP_CKV_19

* [22.11.16]CKV_NCP_19 BaseResourceNegativeValueCheck

* [22.11.16][delet]CKV_NCP_27

* [22.11.21][fix]CKV_NCP_21

* Update checkov/terraform/checks/resource/ncp/NKSControlPlaneLogging.py

Co-authored-by: Anton Grübel <[email protected]>

Co-authored-by: Kuemjong Jeong <[email protected]>
Co-authored-by: Anton Grübel <[email protected]>
mayblo pushed a commit to cider-rnd/checkov that referenced this pull request Nov 24, 2022
…dgecrewio#3855)

* [22.10.27][add]LBListenerUsesSecureProtocols

* [22.11.01][add]NksPublicAccess

* [22.11.01][delete]ncp-13 rule

* [22.11.01][fix]NksPublicAccess Description fix

* [22.11.01][fix] test_NksPublicAccess.py

* [22.11.05][add]NCP_LBTargetGroupUsingHTTPS

* [22.11.05][delete]ncp_13_rule

* [22.11.06][addNCP_LBNetworkPrivate

* [22.11.08][add]CKV_NCP_18

* [22.11.08][add]NCP_CKV_39

* [22.11.08][fix]CKV_NCP_21

* [22.11.08][delete]CKVP_NCP_15

* [22.11.08]CKV_NCP_32

* Revert "[22.11.08]CKV_NCP_32"

This reverts commit c3aa017.

* [22.11.08][add]CKV_NCP_32

* Revert "[22.11.08][add]CKV_NCP_32"

This reverts commit b7341f7.

* [22.11.12][fix]CKV_NCP_27

* [22.11.12][fix]CKV_NCP_27

* [22.11.14][fix]NCP_CKV_19

* [22.11.16]CKV_NCP_19 BaseResourceNegativeValueCheck

* [22.11.16][delet]CKV_NCP_27

* [22.11.21][fix]CKV_NCP_21

* Update checkov/terraform/checks/resource/ncp/NKSControlPlaneLogging.py

Co-authored-by: Anton Grübel <[email protected]>

Co-authored-by: Kuemjong Jeong <[email protected]>
Co-authored-by: Anton Grübel <[email protected]>
mayblo pushed a commit to cider-rnd/checkov that referenced this pull request Nov 24, 2022
…dgecrewio#3855)

* [22.10.27][add]LBListenerUsesSecureProtocols

* [22.11.01][add]NksPublicAccess

* [22.11.01][delete]ncp-13 rule

* [22.11.01][fix]NksPublicAccess Description fix

* [22.11.01][fix] test_NksPublicAccess.py

* [22.11.05][add]NCP_LBTargetGroupUsingHTTPS

* [22.11.05][delete]ncp_13_rule

* [22.11.06][addNCP_LBNetworkPrivate

* [22.11.08][add]CKV_NCP_18

* [22.11.08][add]NCP_CKV_39

* [22.11.08][fix]CKV_NCP_21

* [22.11.08][delete]CKVP_NCP_15

* [22.11.08]CKV_NCP_32

* Revert "[22.11.08]CKV_NCP_32"

This reverts commit c3aa017.

* [22.11.08][add]CKV_NCP_32

* Revert "[22.11.08][add]CKV_NCP_32"

This reverts commit b7341f7.

* [22.11.12][fix]CKV_NCP_27

* [22.11.12][fix]CKV_NCP_27

* [22.11.14][fix]NCP_CKV_19

* [22.11.16]CKV_NCP_19 BaseResourceNegativeValueCheck

* [22.11.16][delet]CKV_NCP_27

* [22.11.21][fix]CKV_NCP_21

* Update checkov/terraform/checks/resource/ncp/NKSControlPlaneLogging.py

Co-authored-by: Anton Grübel <[email protected]>

Co-authored-by: Kuemjong Jeong <[email protected]>
Co-authored-by: Anton Grübel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants