allow http_method to have no authorization & change check category
@@ -8,12 +8,11 @@ class APIGatewayAuthorization(BaseResourceCheck):
name = "Ensure there is no open access to back-end resources through API "
id = "CKV_AWS_59"
supported_resources = ['aws_api_gateway_method']
- categories = [CheckCategories.SECRETS]
+ categories = [CheckCategories.GENERAL_SECURITY]
super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
def scan_resource_conf(self, conf):
- if 'authorization' in conf.keys():
- if conf['authorization'][0] == "NONE":
+ if conf['http_method'][0] != "OPTIONS" and conf['authorization'][0] == "NONE":
return CheckResult.FAILED
return CheckResult.PASSED
