diff --git a/pacu/modules/iam__privesc_scan/main.py b/pacu/modules/iam__privesc_scan/main.py index b0c43d65..3e67372a 100644 --- a/pacu/modules/iam__privesc_scan/main.py +++ b/pacu/modules/iam__privesc_scan/main.py @@ -1231,7 +1231,7 @@ def dict_lower(input_dict): if perm in target["Permissions"][effect]: checked_perms[effect][perm] = target["Permissions"][effect][perm] else: - for target_perm in target["Permissions"][effect].keys(): + for target_perm in target["Permissions"][effect]: if "*" in target_perm: pattern = re.compile(target_perm.replace("*", ".*")) if pattern.search(perm) is not None: