Skip to content

Commit

Permalink
Update dojo/tools/hcl_asoc_sast/parser.py
Browse files Browse the repository at this point in the history
Co-authored-by: Charles Neill <[email protected]>
  • Loading branch information
xpert98 and cneill authored Dec 5, 2024
1 parent 84c210b commit 923bb46
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dojo/tools/hcl_asoc_sast/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ def get_findings(self, file, test):
if aitem.tag == "cause":
description = description + "***Cause:" + "\n"
for causeitem in aitem:
if causeitem.attrib["type"] == "string":
if causeitem.text is not None:
if causeitem.attrib["type"] == "string" and causeitem.text is not None:
description = description + causeitem.text + "\n"
if aitem.tag == "recommendations":
for recitem in aitem:
Expand Down

0 comments on commit 923bb46

Please sign in to comment.