@@ -102,10 +102,12 @@ def get_severity_justification(vulnerability):
102
102
def process_component (component ):
103
103
mitigation = ""
104
104
impact = "**Impact paths**\n \n - "
105
+ fix_available = False
105
106
fixed_versions = component .get ("fixed_versions" )
106
107
if fixed_versions :
107
108
mitigation = "**Versions containing a fix:**\n \n - "
108
109
mitigation += "\n - " .join (fixed_versions )
110
+ fix_available = True
109
111
if "impact_paths" in component :
110
112
refs = []
111
113
impact_paths_l1 = component ["impact_paths" ]
@@ -117,7 +119,7 @@ def process_component(component):
117
119
refs .append (item ["full_path" ])
118
120
if refs :
119
121
impact += "\n - " .join (sorted (set (refs ))) # deduplication
120
- return mitigation , impact
122
+ return mitigation , impact , fix_available
121
123
122
124
123
125
def get_cve (vulnerability ):
@@ -158,7 +160,7 @@ def get_item_set(vulnerability):
158
160
159
161
for component_name_with_version , component in vulnerability .get ("components" , {}).items ():
160
162
component_name , component_version = get_component_name_version (component_name_with_version )
161
- mitigation , impact = process_component (component )
163
+ mitigation , impact , fix_available = process_component (component )
162
164
163
165
title = clean_title (vulnerability ["summary" ])
164
166
# create the finding object
@@ -176,6 +178,7 @@ def get_item_set(vulnerability):
176
178
dynamic_finding = False ,
177
179
cvssv3 = cvssv3 ,
178
180
vuln_id_from_tool = vuln_id_from_tool ,
181
+ fix_available = fix_available ,
179
182
)
180
183
if vulnerability_ids :
181
184
finding .unsaved_vulnerability_ids = vulnerability_ids
0 commit comments