check neg on correct attribute
+from checkov.common.models.consts import ANY_VALUE
from checkov.common.models.enums import CheckCategories, CheckResult
-from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck
+from checkov.terraform.checks.resource.base_resource_negative_value_check import BaseResourceNegativeValueCheck
-class StorageAccountDisablePublicAccess(BaseResourceValueCheck):
+class StorageAccountDisablePublicAccess(BaseResourceNegativeValueCheck):
def __init__(self):
name = "Ensure that Storage accounts disallow public access"
id = "CKV_AZURE_59"
supported_resources = ['azurerm_storage_account']
categories = [CheckCategories.NETWORKING]
- super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources,
- missing_block_result=CheckResult.PASSED)
+ super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
def get_inspected_key(self):
- return "enable_https_traffic_only"
+ return "allow_blob_public_access"
+ def get_forbidden_values(self):
+ return [True]
check = StorageAccountDisablePublicAccess()
