[Secure-testing-commits] r18951 - check-external

Raphael Geissert geissert at alioth.debian.org
Sun Apr 15 19:08:01 UTC 2012


Author: geissert
Date: 2012-04-15 19:08:01 +0000 (Sun, 15 Apr 2012)
New Revision: 18951

Modified:
   check-external/update.sh
Log:
Abort if there's garbage in the cve lists


Modified: check-external/update.sh
===================================================================
--- check-external/update.sh	2012-04-15 17:50:20 UTC (rev 18950)
+++ check-external/update.sh	2012-04-15 19:08:01 UTC (rev 18951)
@@ -22,6 +22,13 @@
 
 export LANG=C
 
+check_list() {
+    if grep -vE '^CVE-[12][0-9]{3}-[0-9]{4}$' $1; then
+	echo "$1 contains garbage (see above), aborting"
+	exit 1
+    fi
+}
+
 # Red Hat provides a complete dump of their tracker, which includes
 # unfixed issues.
 # Note: The downloaded html files are Copyright by Red Hat, Inc.
@@ -32,6 +39,7 @@
 sed -rn '/CVE-[12][0-9]{3}-/{s/^.+>(CVE-[12][0-9]{3}-[0-9]{4})<.+$/\1/;T;p}' cve-*.html |
     sort > cve.list
 
+check_list cve.list
 
 # List of issues fixed by each vendor, according to MITRE. Very
 # incomplete, but it doesn't hurt to double check (including our own list)
@@ -41,4 +49,5 @@
     wget -N http://cve.mitre.org/data/refs/refmap/source-$vendor.html
     sed -rn '/CVE-[12][0-9]{3}-/{s/^.+>(CVE-[12][0-9]{3}-[0-9]{4})<.+$/\1/;p}' source-$vendor.html |
 	sort > $vendor.list
+    check_list $vendor.list
 done




More information about the Secure-testing-commits mailing list