handle cases where metadata is not in entity conf
@@ -179,9 +179,13 @@ class Runner(BaseRunner):
def get_skipped_checks(entity_conf):
skipped = []
+ metadata = {}
+ if not isinstance(entity_conf,dict):
+ return skipped
if entity_conf["kind"] == "containers" or entity_conf["kind"] == "initContainers":
metadata = entity_conf["parent_metadata"]
else:
+ if "metadata" in entity_conf.keys():
metadata = entity_conf["metadata"]
if "annotations" in metadata.keys():
for key in metadata["annotations"].keys():
