/[secure-testing]/bin/get-todo-items
ViewVC logotype

Contents of /bin/get-todo-items

Parent Directory Parent Directory | Revision Log Revision Log


Revision 17955 - (show annotations) (download)
Sun Jan 1 10:35:28 2012 UTC (17 months, 2 weeks ago) by luk
File size: 1534 byte(s)
Also show CVEs that are not numbered correctly
1 #!/bin/bash
2 # Nico Golde <nion@debian.org>
3 # Latest change: Do Sep 20 20:13:19 CEST 2007
4 # extract TODO items for unfixed security issues in unstable/testing
5
6
7 _DIR=`pwd`
8 _NEW_D=(${_DIR//\// })
9 _CNT=`COUNT=0; for i in ${_NEW_D[*]}; do [ ${i} = "secure-testing" ] && echo ${COUNT}; COUNT=$(( COUNT + 1 )); done`
10 _BASE="$( for i in `seq 0 ${_CNT}`; do echo -n "/${_NEW_D[${i}]}"; done; echo )"
11
12 DATA="${_BASE}/data/CVE/list"
13 TMP="list.tmp"
14
15 :> $TMP
16
17 awk "BEGIN { RS = \"CVE-\" } /<unfixed>/" $DATA > $TMP
18
19 while read LINE; do
20
21 case "$LINE" in
22 *\-*\ \(*...\))
23 CVE="CVE-$( echo "$LINE" | cut -d ' ' -f 1 )"
24 ;;
25 *\-[0-9,X][0-9,X][0-9,X][0-9,X])
26 CVE="CVE-$( echo "$LINE" | cut -d ' ' -f 1 )"
27 ;;
28 *NOTE:*) ;;
29 *\[lenny\]*) ;;
30 *\[etch\]*) ;;
31 *\[sarge\]*) ;;
32 *\<unfixed\>*)
33 # output unimportant issues with -v
34 if [ ! "$1" = "-v" ]; then
35 STATUS="$( echo "$LINE" | grep -e '(*unimportant)*' )"
36 if [ "x$STATUS" = "x$LINE" ]; then
37 continue
38 fi
39 fi
40
41 PKG="$( echo "$LINE" | sed -e 's/.*- \(.\+\)\ <unfixed>.*/\1/' )"
42 BUG="$( echo "$LINE" | sed -e 's/.*bug\ #\([0-9]\+\).*/\1/' )"
43
44 if [ "x$BUG" = "x" -o "x$BUG" = "x$LINE" ]; then
45 TODO="TODO: report bug"
46 echo "$CVE" "$PKG" "$TODO"
47 else
48 TODO="$( ${_BASE}/bin/get-bug-status "$BUG" )"
49 echo "$CVE" "$PKG" "$BUG" "$TODO"
50 fi
51 ;;
52 *) ;;
53 esac
54
55 done < $TMP
56
57 rm -f $TMP

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5