diff --git a/dojo/tools/trivy_operator/parser.py b/dojo/tools/trivy_operator/parser.py index 7bd3a3d1da5..b76e47a4039 100644 --- a/dojo/tools/trivy_operator/parser.py +++ b/dojo/tools/trivy_operator/parser.py @@ -30,6 +30,14 @@ def get_findings(self, scan_file, test): if data is None: return [] + + if isinstance(data, dict): + self.handle_resource(data, test) + else: + for resource in data: + self.handle_resource(resource, test) + + def handle_resource(self, data, test): metadata = data.get("metadata", None) if metadata is None: return []