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