diff --git a/policies/aws_s3_policies/aws_s3_bucket_policy_confused_deputy.py b/policies/aws_s3_policies/aws_s3_bucket_policy_confused_deputy.py index c1e552f94..8d827f4f0 100644 --- a/policies/aws_s3_policies/aws_s3_bucket_policy_confused_deputy.py +++ b/policies/aws_s3_policies/aws_s3_bucket_policy_confused_deputy.py @@ -25,6 +25,6 @@ def policy(resource): if isinstance(condition, dict): flat_condition_keys.update(condition.keys()) # Check if any required condition key is present - if not REQUIRED_CONDITIONS.intersection(flat_condition_keys): + if not {str.casefold(x) for x in REQUIRED_CONDITIONS} & {str.casefold(x) for x in flat_condition_keys}: return False return True