@@ -82,6 +82,10 @@ def compute_individual_advisory_todo(self):
82
82
logger = self .log ,
83
83
)
84
84
85
+ self .log (
86
+ f"Successfully created { new_todos_count } ToDos for missing summary, affected and fixed packages"
87
+ )
88
+
85
89
def detect_conflicting_advisories (self ):
86
90
"""
87
91
Create ToDos for advisories with conflicting opinions on fixed and affected
@@ -128,6 +132,10 @@ def detect_conflicting_advisories(self):
128
132
logger = self .log ,
129
133
)
130
134
135
+ self .log (
136
+ f"Successfully created { new_todos_count } ToDos for conflicting affected and fixed packages"
137
+ )
138
+
131
139
132
140
def check_missing_summary (
133
141
advisory ,
@@ -266,14 +274,14 @@ def check_conflicting_affected_and_fixed_by_packages_for_alias(
266
274
267
275
if len (unique_set_of_affected_vers ) > 1 :
268
276
has_conflicting_affected_packages = True
269
- conflicting_affected = json .dumps (unique_set_of_affected_vers , default = list )
270
277
messages .append (
271
- f"{ cve } : { purl } with conflicting affected versions { conflicting_affected } "
278
+ f"{ cve } : { purl } with conflicting affected versions { unique_set_of_affected_vers } "
272
279
)
273
280
if len (unique_set_of_fixed_versions ) > 1 :
274
281
has_conflicting_fixed_package = True
275
- conflicting_fixed = json .dumps (unique_set_of_fixed_versions , default = list )
276
- messages .append (f"{ cve } : { purl } with conflicting fixed version { conflicting_fixed } " )
282
+ messages .append (
283
+ f"{ cve } : { purl } with conflicting fixed version { unique_set_of_fixed_versions } "
284
+ )
277
285
278
286
if not has_conflicting_affected_packages and not has_conflicting_fixed_package :
279
287
return
@@ -284,13 +292,16 @@ def check_conflicting_affected_and_fixed_by_packages_for_alias(
284
292
elif not has_conflicting_affected_packages :
285
293
issue_type = "CONFLICTING_FIXED_BY_PACKAGES"
286
294
287
- messages .append ("Comparison matrix:" )
288
- messages .append (json .dumps (matrix , indent = 2 , default = list ))
295
+ issue_detail = {
296
+ "Conflict summary" : messages ,
297
+ "Conflict matrix" : matrix ,
298
+ }
299
+
289
300
todo_id = advisories_checksum (advisories )
290
301
todo = AdvisoryToDo (
291
302
related_advisories_id = todo_id ,
292
303
issue_type = issue_type ,
293
- issue_detail = " \n " . join ( messages ),
304
+ issue_detail = json . dumps ( issue_detail , default = list ),
294
305
)
295
306
todo_to_create .append (todo )
296
307
advisory_relation_to_create [todo_id ] = list (advisories )
0 commit comments