summaryrefslogtreecommitdiffstats
path: root/bin/report-vuln
diff options
context:
space:
mode:
authorRaphael Geissert <geissert@debian.org>2012-08-20 00:24:02 +0000
committerRaphael Geissert <geissert@debian.org>2012-08-20 00:24:02 +0000
commitb285eb313c795f8d65bafc0d37c385dde460bfc3 (patch)
treecef48798c7f34b1374843af9221e2bdb97a40375 /bin/report-vuln
parent913396b8bc52653cd68da2488d33172775d16ee8 (diff)
Use the temporary description if the id is still RESERVED
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@19982 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/report-vuln')
-rwxr-xr-xbin/report-vuln24
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/report-vuln b/bin/report-vuln
index 5164c88edc..e7fea38daa 100755
--- a/bin/report-vuln
+++ b/bin/report-vuln
@@ -15,6 +15,20 @@
import sys, re, urllib, os
+def setup_path():
+ dirname = os.path.dirname
+ base = dirname(dirname(os.path.realpath(sys.argv[0])))
+ sys.path.insert(0, os.path.join(base, "lib", "python"))
+
+def description_from_list(id):
+ setup_path()
+ import bugs
+ import debian_support
+ for bug in bugs.CVEFile(debian_support.findresource(
+ *"data CVE list".split())):
+ if bug.name == id:
+ return bug.description
+
def gen_index(ids):
ret = ''
for cnt, id in enumerate(ids):
@@ -41,6 +55,7 @@ def get_cve(id):
desc = False
r = re.compile('.*<th\ colspan=.*>Description<.*')
tag = re.compile('.*</?tr>.*')
+ reserved = re.compile(r'\*+\s+RESERVED\s+\*+')
ret = ''
resp = http_get(id)
@@ -49,6 +64,9 @@ def get_cve(id):
desc = True
continue
+ if desc and reserved.search(line):
+ break
+
if tag.match(line) and desc:
continue
@@ -62,6 +80,12 @@ def get_cve(id):
if desc and line != '':
ret = ret + '\n| ' + line
+ if ret == '':
+ ret = description_from_list(id)
+
+ if ret == '':
+ ret = 'No description was found (try on a search engine)'
+
return ret + '\n'
def gen_text(pkg, cveid):

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