diff options
Diffstat (limited to 'collector/parse.py')
-rw-r--r-- | collector/parse.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/collector/parse.py b/collector/parse.py index 96cb25f..c2d9610 100644 --- a/collector/parse.py +++ b/collector/parse.py @@ -26,7 +26,6 @@ import mmap import os import re -# TODO rework interval? import interval regex = { @@ -86,9 +85,7 @@ def bugzilla_dict(directory, bugid): return dic -# TODO: Add <ref source="CONFIRM"> information -# TODO: product name, product vendor -# TODO: Rework! (To many FIXMEs) +# TODO: Add <ref source="CONFIRM">, product name, product vendor def nvd_dict(directory): 'Returns a dictionary containing all CVEs from the National Vulnerability Database' @@ -116,14 +113,14 @@ def nvd_dict(directory): else: dic[j] = tree.get(j) - # FIXME Maybe there is an easier way + # TODO : Try to find an easier way for child in tree: if child.tag == '{http://nvd.nist.gov/feeds/cve/1.2}refs': for ref in child: - url.append(ref.items()[0][1]) # FIXME bad coding :( [0][1] + url.append(ref.items()[0][1]) # FIXME : [0][1] dic['refs'] = url - dic['desc'] = tree[0][0].text # FIXME again bad coding :( [0][0] + dic['desc'] = tree[0][0].text # FIXME : [0][0] main[cve] = dic @@ -161,7 +158,7 @@ def create_xml(directory, bugid, bug_dict, nvd_dict): intervals = interval.from_whiteboard(bug_dict['status_whiteboard']) if intervals: for item in intervals: - item.to_xml(affectedroot) # FIXME: Rework to_xml + item.to_xml(affectedroot) else: node = et.SubElement(bugroot, element) node.text = xml_bug_dict[element] |