@@ -77,6 +77,7 @@ def _build_common_output(node, lib_name=None):
7777 ransomware_used = node .get ("malicious" , None )
7878 known_exploited = node .get ("exploitable" , None )
7979 component_path = node ["component" ].get ("path" , None )
80+ fix_available = False
8081 if component_path :
8182 locations .append (component_path )
8283 if "topFix" in node :
@@ -91,6 +92,7 @@ def _build_common_output(node, lib_name=None):
9192 + topfix_node .get ("fixResolution" , "" )
9293 + "\n "
9394 )
95+ fix_available = True
9496 except Exception :
9597 logger .exception ("Error handling topFix node." )
9698 elif "library" in node :
@@ -116,17 +118,20 @@ def _build_common_output(node, lib_name=None):
116118 component_name = node ["library" ].get ("artifactId" )
117119 component_version = node ["library" ].get ("version" )
118120 cvss3_score = node .get ("cvss3_score" , None )
121+ fix_available = False
119122 if "topFix" in node :
120123 try :
121124 topfix_node = node .get ("topFix" )
122125 mitigation = "**Resolution** ({}): {}\n " .format (
123126 topfix_node .get ("date" ),
124127 topfix_node .get ("fixResolution" ),
125128 )
129+ fix_available = True
126130 except Exception :
127131 logger .exception ("Error handling topFix node." )
128132 else :
129133 description = node .get ("description" , "Unknown" )
134+ fix_available = False
130135
131136 cve = node .get ("name" )
132137 title = "CVE-None | " + lib_name if cve is None else cve + " | " + lib_name
@@ -208,6 +213,7 @@ def _build_common_output(node, lib_name=None):
208213 impact = impact if impact is not None else None ,
209214 steps_to_reproduce = "**Locations Found**: " + ", " .join (locations ) if locations is not None else None ,
210215 kev_date = kev_date if kev_date is not None else None ,
216+ fix_available = fix_available ,
211217 )
212218 # only overwrite default values if they are not None #12989
213219 if known_exploited is not None :
0 commit comments