From 6787035c9ea28296f40b81f3f208caedf12df902 Mon Sep 17 00:00:00 2001 From: Reshef Sharvit Date: Thu, 14 Mar 2024 10:46:30 +0200 Subject: [PATCH] Fix hardcoded policy name --- iam-ape/iam_ape/evaluator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iam-ape/iam_ape/evaluator.py b/iam-ape/iam_ape/evaluator.py index 5ab0347..93daa54 100644 --- a/iam-ape/iam_ape/evaluator.py +++ b/iam-ape/iam_ape/evaluator.py @@ -628,7 +628,8 @@ def get_direct_policies( ) -> List[PolicyWithSource]: inline_policies = [ PolicyWithSource( - "inline policy", normalize_policy(policy["PolicyDocument"]) + policy.get("PolicyName", "inline policy"), + normalize_policy(policy["PolicyDocument"]), ) for policy in entity_obj.get(f"{entity_type.value}PolicyList", []) ]