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 rules about Load Balancer Exposed to Internet #3819

Merged
merged 32 commits into from
Nov 14, 2022

Conversation

pj991207
Copy link
Contributor

@pj991207 pj991207 commented Nov 8, 2022

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_16 is associated with Load Balancer Exposed to Internet

Description

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

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

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 work, just two minor things

checkov/terraform/checks/resource/ncp/LBNetworkPrivate.py Outdated Show resolved Hide resolved
checkov/terraform/checks/resource/ncp/LBNetworkPrivate.py Outdated Show resolved Hide resolved
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.

🍻

Copy link
Contributor

@ChanochShayner ChanochShayner left a comment

Choose a reason for hiding this comment

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

👑

Comment on lines 19 to 20
def get_expected_values(self) -> List[Any]:
return ["PRIVATE"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
def get_expected_values(self) -> List[Any]:
return ["PRIVATE"]
def get_expected_value(self) -> Any:
return "PRIVATE"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay

@gruebel gruebel merged commit 17c72d5 into bridgecrewio:master Nov 14, 2022
nikolaik pushed a commit to nikolaik/checkov that referenced this pull request Nov 14, 2022
…ernet (bridgecrewio#3819)

* [22.10.27][add]LBListenerUsesSecureProtocols

* [22.11.05][add]NCP_LBTargetGroupUsingHTTPS

* [22.11.05][delete]ncp_13_rule

* [22.11.06][addNCP_LBNetworkPrivate

* Delete LBTargetGroupUsingHTTPS.py

[22.11.08][delete]NCP_CKV_15

* Delete tests/terraform/checks/resource/ncp/example_LBTargetGroupUsingHTTPS directory

[22.11.08][delete]CKV_NCP_15

* Delete test_LBTargetGroupUsingHTTPS.py

[22.11.08][delete]CVK_NCP_15

* [22.11.08][add]ncp_ckv_16 example tf code

* [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.

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

[22.11.10][fix]CKV_NCP_16

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

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

[22.11.10][fix]CKV_NCP_16

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

* Revert "[22.11.12][fix]NCP_CKV_16"

This reverts commit 25d3a6e.

* [22.11.12][fix]CKV_NCP_16

* [22.11.12][fix]CKV_NCP_16

* [22.11.13][fix]CKV_NCP_16

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

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

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

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

Co-authored-by: Kuemjong Jeong <[email protected]>
Co-authored-by: Anton Grübel <[email protected]>
nikolaik pushed a commit to nikolaik/checkov that referenced this pull request Nov 14, 2022
…ernet (bridgecrewio#3819)

* [22.10.27][add]LBListenerUsesSecureProtocols

* [22.11.05][add]NCP_LBTargetGroupUsingHTTPS

* [22.11.05][delete]ncp_13_rule

* [22.11.06][addNCP_LBNetworkPrivate

* Delete LBTargetGroupUsingHTTPS.py

[22.11.08][delete]NCP_CKV_15

* Delete tests/terraform/checks/resource/ncp/example_LBTargetGroupUsingHTTPS directory

[22.11.08][delete]CKV_NCP_15

* Delete test_LBTargetGroupUsingHTTPS.py

[22.11.08][delete]CVK_NCP_15

* [22.11.08][add]ncp_ckv_16 example tf code

* [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.

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

[22.11.10][fix]CKV_NCP_16

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

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

[22.11.10][fix]CKV_NCP_16

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

* Revert "[22.11.12][fix]NCP_CKV_16"

This reverts commit 25d3a6e.

* [22.11.12][fix]CKV_NCP_16

* [22.11.12][fix]CKV_NCP_16

* [22.11.13][fix]CKV_NCP_16

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

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

* Update checkov/terraform/checks/resource/ncp/LBNetworkPrivate.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.

6 participants