File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed
checkov/terraform/checks/resource/azure Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 22
33from typing import Any
44
5- from checkov .common .models .enums import CheckCategories , CheckResult
6- from checkov .terraform .checks .resource .base_resource_negative_value_check import BaseResourceNegativeValueCheck
5+ from checkov .common .models .enums import CheckCategories
6+ from checkov .terraform .checks .resource .base_resource_value_check import BaseResourceValueCheck
77
88
9- class StorageAccountDisablePublicAccess (BaseResourceNegativeValueCheck ):
9+ class StorageAccountDisablePublicAccess (BaseResourceValueCheck ):
1010 def __init__ (self ) -> None :
1111 name = "Ensure that Storage accounts disallow public access"
1212 id = "CKV_AZURE_59"
@@ -17,14 +17,13 @@ def __init__(self) -> None:
1717 id = id ,
1818 categories = categories ,
1919 supported_resources = supported_resources ,
20- missing_attribute_result = CheckResult .FAILED ,
2120 )
2221
2322 def get_inspected_key (self ) -> str :
2423 return "public_network_access_enabled"
2524
26- def get_forbidden_values (self ) -> list [Any ]:
27- return [True ]
25+ def get_expected_values (self ) -> list [Any ]:
26+ return [False ]
2827
2928
3029check = StorageAccountDisablePublicAccess ()
Original file line number Diff line number Diff line change 22
33from typing import Any
44
5- from checkov .common .models .enums import CheckCategories , CheckResult
6- from checkov .terraform .checks .resource .base_resource_negative_value_check import BaseResourceNegativeValueCheck
5+ from checkov .common .models .enums import CheckCategories
6+ from checkov .terraform .checks .resource .base_resource_value_check import BaseResourceValueCheck
77
88
9- class StorageBlobRestrictPublicAccess (BaseResourceNegativeValueCheck ):
9+ class StorageBlobRestrictPublicAccess (BaseResourceValueCheck ):
1010 def __init__ (self ) -> None :
1111 name = "Ensure that Storage blobs restrict public access"
1212 id = "CKV_AZURE_190"
@@ -17,14 +17,13 @@ def __init__(self) -> None:
1717 id = id ,
1818 categories = categories ,
1919 supported_resources = supported_resources ,
20- missing_attribute_result = CheckResult .FAILED ,
2120 )
2221
2322 def get_inspected_key (self ) -> str :
2423 return "allow_nested_items_to_be_public"
2524
26- def get_forbidden_values (self ) -> list [Any ]:
27- return [True ]
25+ def get_expected_values (self ) -> list [Any ]:
26+ return [False ]
2827
2928
3029check = StorageBlobRestrictPublicAccess ()
You can’t perform that action at this time.
0 commit comments