diff options
author | Raphael Geissert <geissert@debian.org> | 2012-04-15 19:08:01 +0000 |
---|---|---|
committer | Raphael Geissert <geissert@debian.org> | 2012-04-15 19:08:01 +0000 |
commit | 8bc310d08ad3c1da172422e5827e6278f6d92cd3 (patch) | |
tree | 7fb91f1a1b2b876ffa71dc92ab0baf08cd968b5a /check-external | |
parent | f2229b7754f97e5b9ca6623a965069acaed30f38 (diff) |
Abort if there's garbage in the cve lists
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@18951 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'check-external')
-rwxr-xr-x | check-external/update.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/check-external/update.sh b/check-external/update.sh index 9d0cabca19..655895b9e3 100755 --- a/check-external/update.sh +++ b/check-external/update.sh @@ -22,6 +22,13 @@ set -e 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 @@ done 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 @@ for vendor in SUSE DEBIAN GENTOO FEDORA REDHAT UBUNTU; do 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 |