~ubuntu-security/ubuntu-cve-tracker/master

« back to all changes in this revision

Viewing changes to scripts/report-todo-plot

  • Committer: Steve Beattie
  • Date: 2019-02-19 06:18:27 UTC
  • Revision ID: sbeattie@ubuntu.com-20190219061827-oh57fzcfc1u9dlfk
The ubuntu-cve-tracker project has been converted to git.

Please use 'git clone https://git.launchpad.net/ubuntu-cve-tracker' to
get the converted tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
 
3
 
# Author: Kees Cook <kees@ubuntu.com>
4
 
# Copyright (C) 2005-2008 Canonical Ltd.
5
 
#
6
 
# This script is distributed under the terms and conditions of the GNU General
7
 
# Public License, Version 2 or later. See http://www.gnu.org/copyleft/gpl.html
8
 
# for details.
9
 
 
10
 
# Reports a terse numeric of CVEs that need attention for supported packages.
11
 
 
12
 
TABLE=$(./scripts/ubuntu-table -s "$@")
13
 
for category in SUPPORTED
14
 
do
15
 
  if [ "x$category" = "xuniverse" ]; then
16
 
    filter="-v '(SUPPORTED|PARTNER)'"
17
 
  else
18
 
    filter=$category
19
 
  fi
20
 
 
21
 
  for prio in critical high medium low
22
 
  do
23
 
      COUNT=$(echo "$TABLE" | grep $filter | grep ' '"$prio"'$' | wc -l)
24
 
      OUT="$OUT$COUNT "
25
 
  done
26
 
  if [ -n "$OUT" ]; then
27
 
      COUNT=$(echo "$TABLE" | grep $filter | cut -d" " -f2 | cut -d: -f1 | sort -u | wc -l)
28
 
      fmtcat=`echo $category | tr [A-Z] [a-z]`
29
 
      OUT="$OUT$COUNT"
30
 
  fi
31
 
  echo "$OUT"
32
 
done