summaryrefslogtreecommitdiffstats
path: root/bin/merge-cve-files
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2022-01-06 14:04:39 +0000
committerNeil Williams <codehelp@debian.org>2022-01-27 09:08:15 +0000
commit5c78a9edc92adac0fb04c57e3ae96df53d7fe997 (patch)
treebe74b5e674f4bdd38843d7419062d55da23f33b3 /bin/merge-cve-files
parent23c1259dafe643660d9fc92cb9bf96af67cd7241 (diff)
Update grab-cve-in-fix for known examples
Support catching errors in the d.changelog Add support for forcing a specific version Fix typo in new support in bin/merge-cve-files Update support in update-vuln to insert new PackageAnnotations in specific order.
Diffstat (limited to 'bin/merge-cve-files')
-rwxr-xr-xbin/merge-cve-files10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/merge-cve-files b/bin/merge-cve-files
index 90495f07fc..55f487e2d5 100755
--- a/bin/merge-cve-files
+++ b/bin/merge-cve-files
@@ -4,6 +4,7 @@
# the main one.
#
# Copyright © 2020 Emilio Pozuelo Monfort <pochu@debian.org>
+# Copyright (c) 2021-2022 Neil Williams <codehelp@debian.org>
import os.path
import sys
@@ -30,16 +31,17 @@ def merge_notes(bug, notes):
"""
new_notes = []
cve = bug.header.name
- current_note = note.get(cve)
- if not current_note:
+ merge_list = notes.get(cve) # list of notes to merge
+ if not merge_list:
+ # nothing to merge
return bug
- tagged_notes = [note.description for note in current_note]
+ tagged_notes = [note.description for note in merge_list]
bug_notes = [ann.description for ann in bug.annotations if isinstance(ann, StringAnnotation)]
# get the list items in tagged_notes which are not in bug_notes
new_strings = list(set(tagged_notes) - set(bug_notes))
if not new_strings:
return bug
- for new_ann in current_note:
+ for new_ann in merge_list:
if new_ann.description in new_strings:
new_notes.append(new_ann)
bug_list = list(bug.annotations)

© 2014-2024 Faster IT GmbH | imprint | privacy policy