summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2020-12-01 13:27:36 +0100
committerEmilio Pozuelo Monfort <pochu@debian.org>2020-12-02 09:32:38 +0100
commit75e3c6a67eda8317f5c85fc681568660e54ca6d4 (patch)
tree942b00af233ae32535390ffbff144fb9ac0cf8c3 /lib
parentb3b98ca18ac09714e2754cfd09a7c053833471ec (diff)
sectracker.parsers: do not uniquify CVE names
We need the original name (basically the year) in order to write it back later. Besides the function was taking the line number rather than a hash of the description, so it was buggy anyway. If something needs the unique name at some point, we can add it in an additional field.
Diffstat (limited to 'lib')
-rw-r--r--lib/python/sectracker/parsers.py15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/python/sectracker/parsers.py b/lib/python/sectracker/parsers.py
index 8963a80df6..1b84796f08 100644
--- a/lib/python/sectracker/parsers.py
+++ b/lib/python/sectracker/parsers.py
@@ -250,22 +250,9 @@ def cvelist(path, f):
if desc[-1] != ']':
diag.error("missing ']'")
return (name, desc)
- def cveuniquename(line, anns):
- bug = 0
- for ann in anns:
- if ann.type == "package":
- bugs = [f for f in ann.flags if isinstance(f, PackageBugAnnotation)]
- if bugs:
- bug = bugs[0].bug
- break
- return "TEMP-%07d-%06d" % (bug, line)
def finish(header, headerlineno, anns, diag):
name, desc = header
- if name[-1] == "X":
- name1 = cveuniquename(headerlineno, anns)
- else:
- name1 = name
- return Bug(path, Header(headerlineno, name1, desc), tuple(anns))
+ return Bug(path, Header(headerlineno, name, desc), tuple(anns))
return _parselist(path, f, parseheader, finish)
def _checkrelease(anns, diag, kind):

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