diff --git a/dojo/tools/hcl_asoc_sast/parser.py b/dojo/tools/hcl_asoc_sast/parser.py index 40028afda50..3f95373b66f 100644 --- a/dojo/tools/hcl_asoc_sast/parser.py +++ b/dojo/tools/hcl_asoc_sast/parser.py @@ -118,8 +118,7 @@ def get_findings(self, file, test): description = description + causeitem.text + "\n" if aitem.tag == "recommendations": for recitem in aitem: - if recitem.attrib["type"] == "string": - if recitem.text is not None: + if recitem.attrib["type"] == "string" and recitem.text is not None: recommendations = recommendations + recitem.text + "\n" elif recitem.attrib["type"] == "object": codeblock = recitem.iter()