From 11a213e0876996217fdfddc3e2dcb731db516a53 Mon Sep 17 00:00:00 2001 From: Carlo Alberto Date: Mon, 5 Feb 2024 13:56:01 +0100 Subject: [PATCH] Update ExtensiveRoleCheck.py Added fix for when the rules dict value is "null". It will skip the entity then. --- ExtensiveRoleCheck.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ExtensiveRoleCheck.py b/ExtensiveRoleCheck.py index ccd2b37..c386473 100644 --- a/ExtensiveRoleCheck.py +++ b/ExtensiveRoleCheck.py @@ -43,6 +43,8 @@ def add_result(self, name, value): def _generate(self): for entity in self._json_file['items']: role_name = entity['metadata']['name'] + if entity['rules'] is None: + continue for rule in entity['rules']: if not rule.get('resources', None): continue