Merge ~alexmurray/ubuntu-cve-tracker:no-empty-titles-descriptions-in-package-info-overrides into ubuntu-cve-tracker:master

Proposed by Alex Murray
Status: Merged
Merged at revision: b195a03782fd7d510a0411408fe31b66baecb646
Proposed branch: ~alexmurray/ubuntu-cve-tracker:no-empty-titles-descriptions-in-package-info-overrides
Merge into: ubuntu-cve-tracker:master
Diff against target: 534 lines (+73/-67)
2 files modified
meta_lists/package_info_overrides.json (+65/-65)
scripts/test_cve_lib.py (+8/-2)
Reviewer Review Type Date Requested Status
Spyros Seimenis Approve
Review via email: mp+439788@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Spyros Seimenis (sespiros) wrote :

LGTM

review: Approve
Revision history for this message
Steve Beattie (sbeattie) wrote :

On Tue, Mar 28, 2023 at 05:17:19AM -0000, Alex Murray wrote:
> Alex Murray has proposed merging ~alexmurray/ubuntu-cve-tracker:no-empty-titles-descriptions-in-package-info-overrides into ubuntu-cve-tracker:master.

This all looks great to me, okay to commit as-is. One suggested
improvement that could be made as a followup below.

> diff --git a/scripts/test_cve_lib.py b/scripts/test_cve_lib.py
> index cdfa1aa..3e15944 100755
> --- a/scripts/test_cve_lib.py
> +++ b/scripts/test_cve_lib.py
> @@ -59,8 +59,15 @@ class TestPackageOverrideTests:
> def test_get_desc_linux(self):
> assert cve_lib.lookup_package_override_description('linux') == 'Linux kernel'
>
> - # XXX add a test to validate that all the package description
> - # XXX override entries have both a non-empty title and description.
> + def test_all_non_empty(self):
> + assert cve_lib.package_info_overrides is not None
> + for pkg in cve_lib.package_info_overrides:
> + title = cve_lib.lookup_package_override_title(pkg)
> + desc = cve_lib.lookup_package_override_description(pkg)
> + assert title is not None
> + assert desc is not None
> + assert len(title) > 0
> + assert len(desc) > 0

Because the way this works, if there are multiple entries that are
missing something, the test here will trip an assert and stop on the
first occurrence. This means that someone coming along might end up
taking multiple steps to address all issues that would be caught by this
test loop.

One of the advantages of using python's unittest is that provides the
subTest context manager. A failure in a subtest would mark the whole
test as failed but allows the continuation of execution so that all the
entries could be tested, and all failing entries could be reported.

To give an example of how to use them, I'm attaching a patch
series that I had been working on to start adding some tests to
lp:ubuntu-security-tools for umt. The second patch demonstrates the
use of subTest().

[I haven't proposed these patches to lp:ubuntu-security-tools because I
would like to re-work the structure of the code, so that umt selftest
does not need to be invoked.]

It's not a big deal here, but it might be useful technique to put in
place here to demonstrate the use of subtest here for future tests
where it might be more important to have in place.

--
Steve Beattie
<email address hidden>

0From aac4a41cc9e9b5968dfbd26f9a1da2282b79cdae Mon Sep 17 00:00:00 20010From aac4a41cc9e9b5968dfbd26f9a1da2282b79cdae Mon Sep 17 00:00:00 2001
1From: Steve Beattie <steve.beattie@canonical.com>1From: Steve Beattie <steve.beattie@canonical.com>
2Date: Sat, 3 Sep 2022 05:31:35 -07002Date: Sat, 3 Sep 2022 05:31:35 -0700
3Subject: [PATCH 1/3] umt: stub out a selftest command for running unit tests3Subject: [PATCH 1/3] umt: stub out a selftest command for running unit tests
44
5Start to add some basic infrastructure for creating tests5Start to add some basic infrastructure for creating tests
66
7Signed-off-by: Steve Beattie <steve.beattie@canonical.com>7Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
8--
9build-tools/umt | 16 ++++++++++++++++8build-tools/umt | 16 ++++++++++++++++
101 file changed, 16 insertions(+)91 file changed, 16 insertions(+)
1110
diff --git a/build-tools/umt b/build-tools/umt
index e92b11e..06dfab2 100755
--- a/build-tools/umt
+++ b/build-tools/umt
@@ -29,6 +29,7 @@ import yaml
29import threading29import threading
30import lpl_common30import lpl_common
31import webbrowser31import webbrowser
32import unittest
32from collections import namedtuple33from collections import namedtuple
3334
34BinaryPackages = collections.namedtuple('BinaryPackages', 'binaries pkg_versions')35BinaryPackages = collections.namedtuple('BinaryPackages', 'binaries pkg_versions')
@@ -5296,6 +5297,20 @@ class BetterUbuntuDistroInfo(distro_info.UbuntuDistroInfo):
5296 else:5297 else:
5297 return release5298 return release
52985299
5300# I would like to have tests in separate files, but one cannot import
5301# umt; really, the main umt script should be broken apart into separate
5302# components.
5303def cmd_selftest():
5304 parser = umt_argparse("usage: %(prog)s selftest [options]")
5305 parser.add_argument("-v", "--verbose", action='count', default=0,
5306 help="run selftests with increased verbose output")
5307 (opt, args) = parser.parse_known_args()
5308
5309 suite = unittest.TestSuite()
5310 rc = unittest.TextTestRunner(verbosity=(opt.verbose * 2)).run(suite)
5311 if not rc.wasSuccessful():
5312 sys.exit(1)
5313
5299#5314#
5300# Main program5315# Main program
5301#5316#
@@ -5336,6 +5351,7 @@ commands = {
5336 'sing' : cmd_sing,5351 'sing' : cmd_sing,
5337 'monument' : cmd_monument,5352 'monument' : cmd_monument,
5338 'logs' : cmd_logs,5353 'logs' : cmd_logs,
5354 'selftest' : cmd_selftest,
5339 'help' : cmd_help5355 'help' : cmd_help
5340}5356}
53415357
5342-
53432.34.153582.34.1
0From f4202cf05f59425a14e0ba34dedc3640a167ddd3 Mon Sep 17 00:00:00 20010From f4202cf05f59425a14e0ba34dedc3640a167ddd3 Mon Sep 17 00:00:00 2001
1From: Steve Beattie <steve.beattie@canonical.com>1From: Steve Beattie <steve.beattie@canonical.com>
2Date: Sat, 3 Sep 2022 09:49:51 -07002Date: Sat, 3 Sep 2022 09:49:51 -0700
3Subject: [PATCH 2/3] umt: add unit tests for version increment functions3Subject: [PATCH 2/3] umt: add unit tests for version increment functions
44
5Add unit tests for version increment functions. These check that:5Add unit tests for version increment functions. These check that:
66
7 (a) the functions generate the expected version, and7 (a) the functions generate the expected version, and
8 (b) the newly generated version is indeed greater than the prior8 (b) the newly generated version is indeed greater than the prior
9 version, according to dpkg, and9 version, according to dpkg, and
10 (c) generated esm versions would sort less than a generated non-esm10 (c) generated esm versions would sort less than a generated non-esm
11 version11 version
1212
13There are some cases that the existing code can't handle, and have been13There are some cases that the existing code can't handle, and have been
14segregated to a testcase that is expected to fail; there is also the14segregated to a testcase that is expected to fail; there is also the
15condition introduced in:15condition introduced in:
1616
17 6214e93 ("umt: Handle another versioning edge case in `umt changelog`")17 6214e93 ("umt: Handle another versioning edge case in `umt changelog`")
1818
19which I cannot figure out what sort of versions it is supposed to19which I cannot figure out what sort of versions it is supposed to
20handle; I *think* it is supposed to match stuff like 'ubuntu5~18.04'20handle; I *think* it is supposed to match stuff like 'ubuntu5~18.04'
21but that gets (incorrectly) handled by a prior condition in21but that gets (incorrectly) handled by a prior condition in
22increment_version_security().22increment_version_security().
2323
24There are more testcases needed around security fakesyncs and the24There are more testcases needed around security fakesyncs and the
25debian update versions.25debian update versions.
2626
27Signed-off-by: Steve Beattie <steve.beattie@canonical.com>27Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
28--
29build-tools/umt | 131 ++++++++++++++++++++++++++++++++++++++++++++++++28build-tools/umt | 131 ++++++++++++++++++++++++++++++++++++++++++++++++
301 file changed, 131 insertions(+)291 file changed, 131 insertions(+)
3130
diff --git a/build-tools/umt b/build-tools/umt
index 06dfab2..72b6b32 100755
--- a/build-tools/umt
+++ b/build-tools/umt
@@ -5055,6 +5055,7 @@ def increment_version_security(old_version, esm=False):
5055 new_version = old_version + 'ubuntu0.1'5055 new_version = old_version + 'ubuntu0.1'
5056 if esm:5056 if esm:
5057 new_version = new_version + '~esm1'5057 new_version = new_version + '~esm1'
5058 # XXX not sure this condition is ever used
5058 elif re.search(r'~\d{2}\.\d{2}$', old_version):5059 elif re.search(r'~\d{2}\.\d{2}$', old_version):
5059 new_version = old_version + '.1'5060 new_version = old_version + '.1'
5060 if esm:5061 if esm:
@@ -5065,6 +5066,135 @@ def increment_version_security(old_version, esm=False):
50655066
5066 return new_version5067 return new_version
50675068
5069
5070class VersionChangeTest(unittest.TestCase):
5071
5072 def test_increment_version_build(self):
5073 # testcases are tuples of (old_version, expected_result)
5074 testcases = [
5075 ('2.1-3', '2.1-3build1'), # unmodified debian version
5076 ('2-3', '2-3build1'), # unmodified debian version
5077 ('2.0-2build2', '2.0-2build3'), # prior no-change rebuild version
5078 ('1:2.13.95-1', '1:2.13.95-1build1'), # version with epoch
5079 ('2.95-1.2', '2.95-1.2build1'),
5080 ('7.1-13build154', '7.1-13build155'), # whole lotta builds
5081 ('65', '65build1'), # debian native version
5082
5083 # XXX need to convert sys.exit(1) to raise an exception
5084 # ('1.2-1ubuntu1', 'error'),
5085 ]
5086
5087 for (testcase, expected) in testcases:
5088 with self.subTest(testcase=testcase):
5089 new_version = increment_version_build(testcase)
5090 self.assertEqual(new_version, expected)
5091 # ensure expected version is actually greater than prior version
5092 self.assertEqual(
5093 _compare_versions(new_version, 'gt', testcase), 0,
5094 f"generated version {new_version} is not greater than original {testcase}"
5095 )
5096
5097 def test_increment_version_security(self):
5098 # testcases are tuples of (old_version, expected_result)
5099 testcases = [
5100 ('2.1-3', '2.1-3ubuntu0.1'), # unmodified debian version
5101 ('2.1-3ubuntu1', '2.1-3ubuntu1.1'), # ubuntu version
5102 ('2.1-3ubuntu12', '2.1-3ubuntu12.1'), # ubuntu version
5103 ('2.95-1.2', '2.95-1.2ubuntu0.1'),
5104 ('1:2.13.95-1', '1:2.13.95-1ubuntu0.1'), # version with epoch
5105 ('9.8-2ubuntu2.1', '9.8-2ubuntu2.2'), # prior security upload
5106 ('9.8-2ubuntu0.18.04.1', '9.8-2ubuntu0.18.04.2'), # prior release-specific upload
5107 ('9.8-2ubuntu0.18.04.5', '9.8-2ubuntu0.18.04.6'), # prior release-specific upload
5108 ('9.8-2ubuntu4~18.04.1', '9.8-2ubuntu4~18.04.2'), # prior release-specific upload
5109
5110 # prior no-change builds
5111 ('2.0-2build2', '2.0-2ubuntu0.1'), # prior no-change rebuild version
5112 ('7.1-13build154', '7.1-13ubuntu0.1'), # whole lotta builds
5113 ('65', '65ubuntu0.1'), # debian native version
5114 ]
5115
5116 for (testcase, expected) in testcases:
5117 with self.subTest(testcase=testcase):
5118 new_version = increment_version_security(testcase)
5119 self.assertEqual(increment_version_security(testcase), expected)
5120 # ensure expected version is actually greater than prior version
5121 self.assertEqual(
5122 _compare_versions(new_version, 'gt', testcase), 0,
5123 f"generated version {new_version} is not greater than original {testcase}"
5124 )
5125
5126 @unittest.expectedFailure
5127 def test_increment_version_security_exfail(self):
5128 # these tests are expected to fail, due to the current code not
5129 # handling them correctly; they'd be nice to fix
5130 testcases = [
5131 ('1.2-2ubuntu0.18.04', '1.2-2ubuntu0.18.04.1'), # prior release-specific upload that doko sometimes does
5132 ('1.2-2ubuntu18.04', '1.2-2ubuntu18.04.1'), # prior release-specific upload
5133
5134 # prior release-specific upload; tries to trigger the case
5135 # introduced in:
5136 # 6214e93 ("umt: Handle another versioning edge case in `umt changelog`")
5137 # but gets covered by earlier cases, not sure how to trigger
5138 # the case intended to be covered by 6214e93.
5139 ('9.8-2ubuntu7~18.04', '9.8-2ubuntu7~18.04.1'),
5140 ]
5141
5142 for (testcase, expected) in testcases:
5143 with self.subTest(testcase=testcase):
5144 self.assertEqual(increment_version_security(testcase), expected)
5145
5146 def test_increment_version_security_esm(self):
5147 testcases = [
5148 ('2.1-3', '2.1-3ubuntu0.1~esm1'), # unmodified debian version
5149 ('2.1-3ubuntu1', '2.1-3ubuntu1+esm1'), # ubuntu version
5150 ('2.1-3ubuntu12', '2.1-3ubuntu12+esm1'), # ubuntu version
5151 ('2.95-1.2', '2.95-1.2ubuntu0.1~esm1'),
5152 ('1:2.13.95-1', '1:2.13.95-1ubuntu0.1~esm1'), # version with epoch
5153 ('9.8-2ubuntu2.1', '9.8-2ubuntu2.1+esm1'), # prior security upload
5154 ('9.8-2ubuntu0.18.04.1', '9.8-2ubuntu0.18.04.1+esm1'), # prior release-specific upload
5155 ('9.8-2ubuntu0.18.04.5', '9.8-2ubuntu0.18.04.5+esm1'), # prior release-specific upload
5156 # prior no-change builds
5157 ('2.0-2build2', '2.0-2ubuntu0.1~esm1'), # prior no-change rebuild version
5158 ('7.1-13build154', '7.1-13ubuntu0.1~esm1'), # whole lotta builds
5159 ('65', '65ubuntu0.1~esm1'), # debian native version
5160 ]
5161
5162 for (testcase, expected) in testcases:
5163 with self.subTest(testcase=testcase):
5164 esm_version = increment_version_security(testcase, esm=True)
5165 self.assertEqual(esm_version, expected)
5166
5167 # ensure expected version is actually greater than prior version
5168 self.assertEqual(
5169 _compare_versions(esm_version, 'gt', testcase), 0,
5170 f"generated version {esm_version} is not greater than original {testcase}"
5171 )
5172
5173 # ensure esm version would sort less than a no-esm increment
5174 no_esm_version = increment_version_security(testcase)
5175 self.assertEqual(
5176 _compare_versions(esm_version, 'lt', no_esm_version), 0,
5177 f"generated esm version {esm_version} is not less than generated {no_esm_version}"
5178 )
5179
5180 def test_increment_version_security_esm_existing_esm_version(self):
5181 testcases = [
5182 ('2.1-3ubuntu0.1~esm1', '2.1-3ubuntu0.1~esm2'),
5183 ('2.1-3ubuntu1+esm1', '2.1-3ubuntu1+esm2'),
5184 ('2.1-3ubuntu1+esm9', '2.1-3ubuntu1+esm10'),
5185 ('2.1-3ubuntu12+esm5', '2.1-3ubuntu12+esm6'),
5186 ]
5187 for (testcase, expected) in testcases:
5188 with self.subTest(testcase=testcase):
5189 new_version = increment_version_security(testcase, esm=True)
5190 self.assertEqual(new_version, expected)
5191 # ensure expected version is actually greater than prior version
5192 self.assertEqual(
5193 _compare_versions(new_version, 'gt', testcase), 0,
5194 f"generated version {new_version} is not greater than original {testcase}"
5195 )
5196
5197
5068def launch_dch(old_ver, new_ver, release=None, note=None, is_devel_release=False):5198def launch_dch(old_ver, new_ver, release=None, note=None, is_devel_release=False):
5069 '''Launches dch with a new version'''5199 '''Launches dch with a new version'''
50705200
@@ -5307,6 +5437,7 @@ def cmd_selftest():
5307 (opt, args) = parser.parse_known_args()5437 (opt, args) = parser.parse_known_args()
53085438
5309 suite = unittest.TestSuite()5439 suite = unittest.TestSuite()
5440 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(VersionChangeTest))
5310 rc = unittest.TextTestRunner(verbosity=(opt.verbose * 2)).run(suite)5441 rc = unittest.TextTestRunner(verbosity=(opt.verbose * 2)).run(suite)
5311 if not rc.wasSuccessful():5442 if not rc.wasSuccessful():
5312 sys.exit(1)5443 sys.exit(1)
5313-
53142.34.154442.34.1
0From f3029aa6165fa25d1e8f00abd7446320774d35cd Mon Sep 17 00:00:00 20010From f3029aa6165fa25d1e8f00abd7446320774d35cd Mon Sep 17 00:00:00 2001
1From: Steve Beattie <steve.beattie@canonical.com>1From: Steve Beattie <steve.beattie@canonical.com>
2Date: Tue, 6 Sep 2022 09:52:24 -07002Date: Tue, 6 Sep 2022 09:52:24 -0700
3Subject: [PATCH 3/3] umt: add a couple more version tests from tzdata package3Subject: [PATCH 3/3] umt: add a couple more version tests from tzdata package
44
5Signed-off-by: Steve Beattie <steve.beattie@canonical.com>5Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
6--
7build-tools/umt | 2 ++6build-tools/umt | 2 ++
81 file changed, 2 insertions(+)71 file changed, 2 insertions(+)
98
diff --git a/build-tools/umt b/build-tools/umt
index 72b6b32..8a77f57 100755
--- a/build-tools/umt
+++ b/build-tools/umt
@@ -5105,6 +5105,7 @@ class VersionChangeTest(unittest.TestCase):
5105 ('9.8-2ubuntu2.1', '9.8-2ubuntu2.2'), # prior security upload5105 ('9.8-2ubuntu2.1', '9.8-2ubuntu2.2'), # prior security upload
5106 ('9.8-2ubuntu0.18.04.1', '9.8-2ubuntu0.18.04.2'), # prior release-specific upload5106 ('9.8-2ubuntu0.18.04.1', '9.8-2ubuntu0.18.04.2'), # prior release-specific upload
5107 ('9.8-2ubuntu0.18.04.5', '9.8-2ubuntu0.18.04.6'), # prior release-specific upload5107 ('9.8-2ubuntu0.18.04.5', '9.8-2ubuntu0.18.04.6'), # prior release-specific upload
5108 ('2022c-0ubuntu0.18.04.0', '2022c-0ubuntu0.18.04.1'), # real-world tzdata example
5108 ('9.8-2ubuntu4~18.04.1', '9.8-2ubuntu4~18.04.2'), # prior release-specific upload5109 ('9.8-2ubuntu4~18.04.1', '9.8-2ubuntu4~18.04.2'), # prior release-specific upload
51095110
5110 # prior no-change builds5111 # prior no-change builds
@@ -5152,6 +5153,7 @@ class VersionChangeTest(unittest.TestCase):
5152 ('1:2.13.95-1', '1:2.13.95-1ubuntu0.1~esm1'), # version with epoch5153 ('1:2.13.95-1', '1:2.13.95-1ubuntu0.1~esm1'), # version with epoch
5153 ('9.8-2ubuntu2.1', '9.8-2ubuntu2.1+esm1'), # prior security upload5154 ('9.8-2ubuntu2.1', '9.8-2ubuntu2.1+esm1'), # prior security upload
5154 ('9.8-2ubuntu0.18.04.1', '9.8-2ubuntu0.18.04.1+esm1'), # prior release-specific upload5155 ('9.8-2ubuntu0.18.04.1', '9.8-2ubuntu0.18.04.1+esm1'), # prior release-specific upload
5156 ('2022c-0ubuntu0.18.04.0', '2022c-0ubuntu0.18.04.0+esm1'), # real-world tzdata example
5155 ('9.8-2ubuntu0.18.04.5', '9.8-2ubuntu0.18.04.5+esm1'), # prior release-specific upload5157 ('9.8-2ubuntu0.18.04.5', '9.8-2ubuntu0.18.04.5+esm1'), # prior release-specific upload
5156 # prior no-change builds5158 # prior no-change builds
5157 ('2.0-2build2', '2.0-2ubuntu0.1~esm1'), # prior no-change rebuild version5159 ('2.0-2build2', '2.0-2ubuntu0.1~esm1'), # prior no-change rebuild version
5158-
51592.34.151602.34.1
Revision history for this message
Alex Murray (alexmurray) wrote :

Thanks for the review Steve and Spyros - it seems we can't use unittest.subtest as we are using pytest but I was able to achieve the same thing with the parametrize decorator in https://git.launchpad.net/~alexmurray/ubuntu-cve-tracker/commit/?id=3a948a4338e68fd67b0aa557dbdeb68c09761e90

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/meta_lists/package_info_overrides.json b/meta_lists/package_info_overrides.json
index 0ce4b1e..3eadb39 100644
--- a/meta_lists/package_info_overrides.json
+++ b/meta_lists/package_info_overrides.json
@@ -28,11 +28,11 @@
28 "title": "AppArmor update"28 "title": "AppArmor update"
29 },29 },
30 "apport": {30 "apport": {
31 "description": "",31 "description": "automatically generate crash reports for debugging",
32 "title": "Apport"32 "title": "Apport"
33 },33 },
34 "apr": {34 "apr": {
35 "description": "",35 "description": "Apache Portable Runtime Library",
36 "title": "APR"36 "title": "APR"
37 },37 },
38 "apt": {38 "apt": {
@@ -117,14 +117,14 @@
117 },117 },
118 "boost1.50": {118 "boost1.50": {
119 "description": "C++ utility libraries",119 "description": "C++ utility libraries",
120 "title": ""120 "title": "boost1.50"
121 },121 },
122 "bouncycastle": {122 "bouncycastle": {
123 "description": "Java implementation of cryptographic algorithms",123 "description": "Java implementation of cryptographic algorithms",
124 "title": "Bouncy Castle"124 "title": "Bouncy Castle"
125 },125 },
126 "brotli": {126 "brotli": {
127 "description": "",127 "description": "lossless compression algorithm and format (command line utility)",
128 "title": "Brotli"128 "title": "Brotli"
129 },129 },
130 "bsh": {130 "bsh": {
@@ -188,7 +188,7 @@
188 "title": "colord"188 "title": "colord"
189 },189 },
190 "commons-beanutils": {190 "commons-beanutils": {
191 "description": "",191 "description": "Apache Commons BeanUtils - Utility for manipulating Java beans",
192 "title": "Apache Commons BeanUtils"192 "title": "Apache Commons BeanUtils"
193 },193 },
194 "condor": {194 "condor": {
@@ -237,7 +237,7 @@
237 },237 },
238 "db": {238 "db": {
239 "description": "Berkeley DB Utilities",239 "description": "Berkeley DB Utilities",
240 "title": ""240 "title": "db"
241 },241 },
242 "db4.8": {242 "db4.8": {
243 "description": "Berkeley DB Utilities",243 "description": "Berkeley DB Utilities",
@@ -264,7 +264,7 @@
264 "title": "DHCP"264 "title": "DHCP"
265 },265 },
266 "dino-im": {266 "dino-im": {
267 "description": "",267 "description": "modern XMPP client",
268 "title": "Dino"268 "title": "Dino"
269 },269 },
270 "djvulibre": {270 "djvulibre": {
@@ -340,7 +340,7 @@
340 "title": "Exim"340 "title": "Exim"
341 },341 },
342 "exiv2": {342 "exiv2": {
343 "description": "",343 "description": "EXIF/IPTC/XMP metadata manipulation tool",
344 "title": "Exiv2"344 "title": "Exiv2"
345 },345 },
346 "expat": {346 "expat": {
@@ -356,7 +356,7 @@
356 "title": "file"356 "title": "file"
357 },357 },
358 "file-roller": {358 "file-roller": {
359 "description": "",359 "description": "archive manager for GNOME",
360 "title": "File Roller"360 "title": "File Roller"
361 },361 },
362 "firebird2.5": {362 "firebird2.5": {
@@ -416,7 +416,7 @@
416 "title": "FreeType"416 "title": "FreeType"
417 },417 },
418 "freexl": {418 "freexl": {
419 "description": "",419 "description": "library for direct reading of Microsoft Excel spreadsheets",
420 "title": "FreeXL"420 "title": "FreeXL"
421 },421 },
422 "frr": {422 "frr": {
@@ -444,7 +444,7 @@
444 "title": "Ghostscript"444 "title": "Ghostscript"
445 },445 },
446 "gifsicle": {446 "gifsicle": {
447 "description": "",447 "description": "Tool for manipulating GIF images",
448 "title": "Gifsicle"448 "title": "Gifsicle"
449 },449 },
450 "git": {450 "git": {
@@ -581,7 +581,7 @@
581 },581 },
582 "gst-plugins-good1.0": {582 "gst-plugins-good1.0": {
583 "description": "GStreamer plugins",583 "description": "GStreamer plugins",
584 "title": ""584 "title": "gst-plugins-good1.0"
585 },585 },
586 "gtk+2.0": {586 "gtk+2.0": {
587 "description": "GTK+ graphical user interface library",587 "description": "GTK+ graphical user interface library",
@@ -596,7 +596,7 @@
596 "title": "gtk-vnc"596 "title": "gtk-vnc"
597 },597 },
598 "gummi": {598 "gummi": {
599 "description": "",599 "description": "simple LaTeX editor with live preview",
600 "title": "Gummi"600 "title": "Gummi"
601 },601 },
602 "gupnp": {602 "gupnp": {
@@ -652,7 +652,7 @@
652 "title": "HttpClient"652 "title": "HttpClient"
653 },653 },
654 "ibus": {654 "ibus": {
655 "description": "",655 "description": "Intelligent Input Bus - core",
656 "title": "IBus"656 "title": "IBus"
657 },657 },
658 "icedtea-web": {658 "icedtea-web": {
@@ -893,7 +893,7 @@
893 },893 },
894 "libjpeg6b": {894 "libjpeg6b": {
895 "description": "library for handling JPEG files",895 "description": "library for handling JPEG files",
896 "title": ""896 "title": "libjpeg6b"
897 },897 },
898 "libkdcraw": {898 "libkdcraw": {
899 "description": "RAW picture decoding library",899 "description": "RAW picture decoding library",
@@ -952,7 +952,7 @@
952 "title": "OpenMPT"952 "title": "OpenMPT"
953 },953 },
954 "libpam-krb5": {954 "libpam-krb5": {
955 "description": "",955 "description": "PAM module for MIT Kerberos",
956 "title": "pam-krb5"956 "title": "pam-krb5"
957 },957 },
958 "libpcap": {958 "libpcap": {
@@ -1057,7 +1057,7 @@
1057 },1057 },
1058 "libu2f-host": {1058 "libu2f-host": {
1059 "description": "Universal 2nd Factor (U2F) host communication C Library",1059 "description": "Universal 2nd Factor (U2F) host communication C Library",
1060 "title": ""1060 "title": "libu2f-host"
1061 },1061 },
1062 "libunity-webapps": {1062 "libunity-webapps": {
1063 "description": "UnityWebapps library",1063 "description": "UnityWebapps library",
@@ -1129,7 +1129,7 @@
1129 },1129 },
1130 "libxrandr": {1130 "libxrandr": {
1131 "description": "X11 RandR extension library",1131 "description": "X11 RandR extension library",
1132 "title": ""1132 "title": "libxrandr"
1133 },1133 },
1134 "libxrandr-lts-quantal": {1134 "libxrandr-lts-quantal": {
1135 "description": "X11 RandR extension library",1135 "description": "X11 RandR extension library",
@@ -1421,7 +1421,7 @@
1421 },1421 },
1422 "linux-linaro": {1422 "linux-linaro": {
1423 "description": "Linux kernel for ARM",1423 "description": "Linux kernel for ARM",
1424 "title": ""1424 "title": "linux-linaro"
1425 },1425 },
1426 "linux-lowlatency": {1426 "linux-lowlatency": {
1427 "description": "Linux low latency kernel",1427 "description": "Linux low latency kernel",
@@ -1553,7 +1553,7 @@
1553 },1553 },
1554 "linux-qcm-msm": {1554 "linux-qcm-msm": {
1555 "description": "Linux kernel for MSM",1555 "description": "Linux kernel for MSM",
1556 "title": ""1556 "title": "linux-qcm-msm"
1557 },1557 },
1558 "linux-raspi": {1558 "linux-raspi": {
1559 "description": "Linux kernel for Raspberry Pi systems",1559 "description": "Linux kernel for Raspberry Pi systems",
@@ -1697,7 +1697,7 @@
1697 },1697 },
1698 "mesa-lts-quantal": {1698 "mesa-lts-quantal": {
1699 "description": "free implementation of the EGL API",1699 "description": "free implementation of the EGL API",
1700 "title": ""1700 "title": "mesa-lts-quantal"
1701 },1701 },
1702 "mime-support": {1702 "mime-support": {
1703 "description": "MIME support programs",1703 "description": "MIME support programs",
@@ -1708,7 +1708,7 @@
1708 "title": "mini_httpd"1708 "title": "mini_httpd"
1709 },1709 },
1710 "minicom": {1710 "minicom": {
1711 "description": "",1711 "description": "Friendly menu driven serial communication program",
1712 "title": "Minicom"1712 "title": "Minicom"
1713 },1713 },
1714 "miniupnpc": {1714 "miniupnpc": {
@@ -1724,7 +1724,7 @@
1724 "title": "MongoDB"1724 "title": "MongoDB"
1725 },1725 },
1726 "monit": {1726 "monit": {
1727 "description": "",1727 "description": "utility for monitoring and managing daemons or similar programs",
1728 "title": "Monit"1728 "title": "Monit"
1729 },1729 },
1730 "mono": {1730 "mono": {
@@ -1748,7 +1748,7 @@
1748 "title": "MPlayer"1748 "title": "MPlayer"
1749 },1749 },
1750 "mumble": {1750 "mumble": {
1751 "description": "",1751 "description": "Low latency encrypted VoIP client",
1752 "title": "Mumble"1752 "title": "Mumble"
1753 },1753 },
1754 "munin": {1754 "munin": {
@@ -1756,12 +1756,12 @@
1756 "title": "Munin"1756 "title": "Munin"
1757 },1757 },
1758 "mutt": {1758 "mutt": {
1759 "description": "",1759 "description": "text-based mailreader supporting MIME, GPG, PGP and threading",
1760 "title": "Mutt"1760 "title": "Mutt"
1761 },1761 },
1762 "mysql-5.1": {1762 "mysql-5.1": {
1763 "description": "MySQL database",1763 "description": "MySQL database",
1764 "title": ""1764 "title": "mysql-5.1"
1765 },1765 },
1766 "mysql-5.5": {1766 "mysql-5.5": {
1767 "description": "MySQL database",1767 "description": "MySQL database",
@@ -1769,7 +1769,7 @@
1769 },1769 },
1770 "mysql-5.6": {1770 "mysql-5.6": {
1771 "description": "MySQL database",1771 "description": "MySQL database",
1772 "title": ""1772 "title": "mysql-5.6"
1773 },1773 },
1774 "mysql-5.7": {1774 "mysql-5.7": {
1775 "description": "MySQL database",1775 "description": "MySQL database",
@@ -1785,7 +1785,7 @@
1785 },1785 },
1786 "mysql-dfsg-5.1": {1786 "mysql-dfsg-5.1": {
1787 "description": "MySQL database",1787 "description": "MySQL database",
1788 "title": ""1788 "title": "mysql-dfsg-5.1"
1789 },1789 },
1790 "nas": {1790 "nas": {
1791 "description": "Network Audio System",1791 "description": "Network Audio System",
@@ -1804,7 +1804,7 @@
1804 "title": "Net-SNMP"1804 "title": "Net-SNMP"
1805 },1805 },
1806 "netatalk": {1806 "netatalk": {
1807 "description": "",1807 "description": "Apple Filing Protocol service",
1808 "title": "Netatalk"1808 "title": "Netatalk"
1809 },1809 },
1810 "netqmail": {1810 "netqmail": {
@@ -1852,7 +1852,7 @@
1852 "title": "NTFS-3G"1852 "title": "NTFS-3G"
1853 },1853 },
1854 "ntp": {1854 "ntp": {
1855 "description": "",1855 "description": "Network Time Protocol daemon/utilities (transitional package)",
1856 "title": "NTP"1856 "title": "NTP"
1857 },1857 },
1858 "numpy": {1858 "numpy": {
@@ -1865,7 +1865,7 @@
1865 },1865 },
1866 "nvidia-graphics-drivers": {1866 "nvidia-graphics-drivers": {
1867 "description": "NVIDIA binary X.Org driver",1867 "description": "NVIDIA binary X.Org driver",
1868 "title": ""1868 "title": "nvidia-graphics-drivers"
1869 },1869 },
1870 "nvidia-graphics-drivers-173": {1870 "nvidia-graphics-drivers-173": {
1871 "description": "NVIDIA binary X.Org driver",1871 "description": "NVIDIA binary X.Org driver",
@@ -1873,7 +1873,7 @@
1873 },1873 },
1874 "nvidia-graphics-drivers-173-updates": {1874 "nvidia-graphics-drivers-173-updates": {
1875 "description": "NVIDIA binary X.Org driver",1875 "description": "NVIDIA binary X.Org driver",
1876 "title": ""1876 "title": "nvidia-graphics-drivers-173-updates"
1877 },1877 },
1878 "nvidia-graphics-drivers-304": {1878 "nvidia-graphics-drivers-304": {
1879 "description": "NVIDIA binary X.Org driver",1879 "description": "NVIDIA binary X.Org driver",
@@ -1881,35 +1881,35 @@
1881 },1881 },
1882 "nvidia-graphics-drivers-304-updates": {1882 "nvidia-graphics-drivers-304-updates": {
1883 "description": "NVIDIA binary X.Org driver",1883 "description": "NVIDIA binary X.Org driver",
1884 "title": ""1884 "title": "nvidia-graphics-drivers-304-updates"
1885 },1885 },
1886 "nvidia-graphics-drivers-331": {1886 "nvidia-graphics-drivers-331": {
1887 "description": "NVIDIA binary X.Org driver",1887 "description": "NVIDIA binary X.Org driver",
1888 "title": ""1888 "title": "nvidia-graphics-drivers-331"
1889 },1889 },
1890 "nvidia-graphics-drivers-331-updates": {1890 "nvidia-graphics-drivers-331-updates": {
1891 "description": "NVIDIA binary X.Org driver",1891 "description": "NVIDIA binary X.Org driver",
1892 "title": ""1892 "title": "nvidia-graphics-drivers-331-updates"
1893 },1893 },
1894 "nvidia-graphics-drivers-340": {1894 "nvidia-graphics-drivers-340": {
1895 "description": "NVIDIA binary X.Org driver",1895 "description": "NVIDIA binary X.Org driver",
1896 "title": ""1896 "title": "nvidia-graphics-drivers-340"
1897 },1897 },
1898 "nvidia-graphics-drivers-340-updates": {1898 "nvidia-graphics-drivers-340-updates": {
1899 "description": "NVIDIA binary X.Org driver",1899 "description": "NVIDIA binary X.Org driver",
1900 "title": ""1900 "title": "nvidia-graphics-drivers-340-updates"
1901 },1901 },
1902 "nvidia-graphics-drivers-352": {1902 "nvidia-graphics-drivers-352": {
1903 "description": "NVIDIA binary X.Org driver",1903 "description": "NVIDIA binary X.Org driver",
1904 "title": ""1904 "title": "nvidia-graphics-drivers-352"
1905 },1905 },
1906 "nvidia-graphics-drivers-352-updates": {1906 "nvidia-graphics-drivers-352-updates": {
1907 "description": "NVIDIA binary X.Org driver",1907 "description": "NVIDIA binary X.Org driver",
1908 "title": ""1908 "title": "nvidia-graphics-drivers-352-updates"
1909 },1909 },
1910 "nvidia-graphics-drivers-367": {1910 "nvidia-graphics-drivers-367": {
1911 "description": "NVIDIA binary X.Org driver",1911 "description": "NVIDIA binary X.Org driver",
1912 "title": ""1912 "title": "nvidia-graphics-drivers-367"
1913 },1913 },
1914 "nvidia-graphics-drivers-375": {1914 "nvidia-graphics-drivers-375": {
1915 "description": "NVIDIA binary X.Org driver",1915 "description": "NVIDIA binary X.Org driver",
@@ -1977,11 +1977,11 @@
1977 },1977 },
1978 "nvidia-settings": {1978 "nvidia-settings": {
1979 "description": "Tool for configuring the NVIDIA graphics driver",1979 "description": "Tool for configuring the NVIDIA graphics driver",
1980 "title": ""1980 "title": "nvidia-settings"
1981 },1981 },
1982 "nvidia-settings-updates": {1982 "nvidia-settings-updates": {
1983 "description": "Tool for configuring the NVIDIA graphics driver",1983 "description": "Tool for configuring the NVIDIA graphics driver",
1984 "title": ""1984 "title": "nvidia-settings-updates"
1985 },1985 },
1986 "octavia": {1986 "octavia": {
1987 "description": "OpenStack Load Balancer Service",1987 "description": "OpenStack Load Balancer Service",
@@ -2060,7 +2060,7 @@
2060 "title": "OpenSLP"2060 "title": "OpenSLP"
2061 },2061 },
2062 "opensmtpd": {2062 "opensmtpd": {
2063 "description": "",2063 "description": "secure, reliable, lean, and easy-to configure SMTP server",
2064 "title": "OpenSMTPD"2064 "title": "OpenSMTPD"
2065 },2065 },
2066 "openssh": {2066 "openssh": {
@@ -2133,7 +2133,7 @@
2133 },2133 },
2134 "php-perl": {2134 "php-perl": {
2135 "description": "PHP Extension and Application Repository",2135 "description": "PHP Extension and Application Repository",
2136 "title": ""2136 "title": "php-perl"
2137 },2137 },
2138 "php5": {2138 "php5": {
2139 "description": "HTML-embedded scripting language interpreter",2139 "description": "HTML-embedded scripting language interpreter",
@@ -2145,7 +2145,7 @@
2145 },2145 },
2146 "php7.1": {2146 "php7.1": {
2147 "description": "HTML-embedded scripting language interpreter",2147 "description": "HTML-embedded scripting language interpreter",
2148 "title": ""2148 "title": "php7.1"
2149 },2149 },
2150 "php7.2": {2150 "php7.2": {
2151 "description": "HTML-embedded scripting language interpreter",2151 "description": "HTML-embedded scripting language interpreter",
@@ -2168,7 +2168,7 @@
2168 "title": "phpLDAPadmin"2168 "title": "phpLDAPadmin"
2169 },2169 },
2170 "phpmyadmin": {2170 "phpmyadmin": {
2171 "description": "",2171 "description": "MySQL web administration tool",
2172 "title": "phpMyAdmin"2172 "title": "phpMyAdmin"
2173 },2173 },
2174 "pillow": {2174 "pillow": {
@@ -2229,7 +2229,7 @@
2229 },2229 },
2230 "postgresql-9.4": {2230 "postgresql-9.4": {
2231 "description": "Object-relational SQL database",2231 "description": "Object-relational SQL database",
2232 "title": ""2232 "title": "postgresql-9.4"
2233 },2233 },
2234 "postgresql-9.5": {2234 "postgresql-9.5": {
2235 "description": "Object-relational SQL database",2235 "description": "Object-relational SQL database",
@@ -2304,7 +2304,7 @@
2304 "title": "Python Imaging Library"2304 "title": "Python Imaging Library"
2305 },2305 },
2306 "python-ldap": {2306 "python-ldap": {
2307 "description": "",2307 "description": "LDAP interface module for Python",
2308 "title": "Python LDAP"2308 "title": "Python LDAP"
2309 },2309 },
2310 "python-pip": {2310 "python-pip": {
@@ -2324,7 +2324,7 @@
2324 "title": "urllib3"2324 "title": "urllib3"
2325 },2325 },
2326 "python-werkzeug": {2326 "python-werkzeug": {
2327 "description": "",2327 "description": "collection of utilities for WSGI applications",
2328 "title": "Werkzeug"2328 "title": "Werkzeug"
2329 },2329 },
2330 "python2.6": {2330 "python2.6": {
@@ -2361,7 +2361,7 @@
2361 },2361 },
2362 "python3.6": {2362 "python3.6": {
2363 "description": "An interactive high-level object-oriented language",2363 "description": "An interactive high-level object-oriented language",
2364 "title": ""2364 "title": "python3.6"
2365 },2365 },
2366 "python3.7": {2366 "python3.7": {
2367 "description": "An interactive high-level object-oriented language",2367 "description": "An interactive high-level object-oriented language",
@@ -2481,11 +2481,11 @@
2481 },2481 },
2482 "ruby2.0": {2482 "ruby2.0": {
2483 "description": "Object-oriented scripting language",2483 "description": "Object-oriented scripting language",
2484 "title": ""2484 "title": "ruby2.0"
2485 },2485 },
2486 "ruby2.1": {2486 "ruby2.1": {
2487 "description": "Object-oriented scripting language",2487 "description": "Object-oriented scripting language",
2488 "title": ""2488 "title": "ruby2.1"
2489 },2489 },
2490 "ruby2.3": {2490 "ruby2.3": {
2491 "description": "Object-oriented scripting language",2491 "description": "Object-oriented scripting language",
@@ -2600,7 +2600,7 @@
2600 "title": "SSSD"2600 "title": "SSSD"
2601 },2601 },
2602 "ssvnc": {2602 "ssvnc": {
2603 "description": "",2603 "description": "Enhanced TightVNC viewer with SSL/SSH tunnel helper",
2604 "title": "SSVNC"2604 "title": "SSVNC"
2605 },2605 },
2606 "strongswan": {2606 "strongswan": {
@@ -2620,11 +2620,11 @@
2620 "title": "OpenStack Swift"2620 "title": "OpenStack Swift"
2621 },2621 },
2622 "sysstat": {2622 "sysstat": {
2623 "description": "",2623 "description": "system performance tools for Linux",
2624 "title": "Sysstat"2624 "title": "Sysstat"
2625 },2625 },
2626 "teeworlds": {2626 "teeworlds": {
2627 "description": "",2627 "description": "online multi-player platform 2D shooter",
2628 "title": "Teeworlds"2628 "title": "Teeworlds"
2629 },2629 },
2630 "thunderbird": {2630 "thunderbird": {
@@ -2712,15 +2712,15 @@
2712 "title": "UW IMAP"2712 "title": "UW IMAP"
2713 },2713 },
2714 "uwsgi": {2714 "uwsgi": {
2715 "description": "",2715 "description": "fast, self-healing application container server",
2716 "title": "uWSGI"2716 "title": "uWSGI"
2717 },2717 },
2718 "vcftools": {2718 "vcftools": {
2719 "description": "",2719 "description": "Collection of tools to work with VCF files",
2720 "title": "VCFtools"2720 "title": "VCFtools"
2721 },2721 },
2722 "vim": {2722 "vim": {
2723 "description": "",2723 "description": "Vi IMproved - enhanced vi editor",
2724 "title": "Vim"2724 "title": "Vim"
2725 },2725 },
2726 "vino": {2726 "vino": {
@@ -2740,11 +2740,11 @@
2740 "title": "vsftpd"2740 "title": "vsftpd"
2741 },2741 },
2742 "vtk": {2742 "vtk": {
2743 "description": "",2743 "description": "Visualization Toolkit - A high level 3D visualization library",
2744 "title": "VTK"2744 "title": "VTK"
2745 },2745 },
2746 "wavpack": {2746 "wavpack": {
2747 "description": "",2747 "description": "audio codec (lossy and lossless) - encoder and decoder",
2748 "title": "WavPack"2748 "title": "WavPack"
2749 },2749 },
2750 "wayland": {2750 "wayland": {
@@ -2813,23 +2813,23 @@
2813 },2813 },
2814 "xorg-server-lts-raring": {2814 "xorg-server-lts-raring": {
2815 "description": "X.Org X11 server",2815 "description": "X.Org X11 server",
2816 "title": ""2816 "title": "xorg-server-lts-raring"
2817 },2817 },
2818 "xorg-server-lts-trusty": {2818 "xorg-server-lts-trusty": {
2819 "description": "X.Org X11 server",2819 "description": "X.Org X11 server",
2820 "title": ""2820 "title": "xorg-server-lts-trusty"
2821 },2821 },
2822 "xorg-server-lts-utopic": {2822 "xorg-server-lts-utopic": {
2823 "description": "X.Org X11 server",2823 "description": "X.Org X11 server",
2824 "title": ""2824 "title": "xorg-server-lts-utopic"
2825 },2825 },
2826 "xorg-server-lts-vivid": {2826 "xorg-server-lts-vivid": {
2827 "description": "X.Org X11 server",2827 "description": "X.Org X11 server",
2828 "title": ""2828 "title": "xorg-server-lts-vivid"
2829 },2829 },
2830 "xorg-server-lts-xenial": {2830 "xorg-server-lts-xenial": {
2831 "description": "X.Org X11 server",2831 "description": "X.Org X11 server",
2832 "title": ""2832 "title": "xorg-server-lts-xenial"
2833 },2833 },
2834 "xulrunner-1.9.2": {2834 "xulrunner-1.9.2": {
2835 "description": "Mozilla Gecko runtime environment",2835 "description": "Mozilla Gecko runtime environment",
diff --git a/scripts/test_cve_lib.py b/scripts/test_cve_lib.py
index cdfa1aa..8bf4509 100755
--- a/scripts/test_cve_lib.py
+++ b/scripts/test_cve_lib.py
@@ -59,8 +59,14 @@ class TestPackageOverrideTests:
59 def test_get_desc_linux(self):59 def test_get_desc_linux(self):
60 assert cve_lib.lookup_package_override_description('linux') == 'Linux kernel'60 assert cve_lib.lookup_package_override_description('linux') == 'Linux kernel'
6161
62 # XXX add a test to validate that all the package description62 @pytest.mark.parametrize("pkg", cve_lib.package_info_overrides.keys())
63 # XXX override entries have both a non-empty title and description.63 def test_all_non_empty(self, pkg):
64 title = cve_lib.lookup_package_override_title(pkg)
65 desc = cve_lib.lookup_package_override_description(pkg)
66 assert title is not None
67 assert desc is not None
68 assert len(title) > 0
69 assert len(desc) > 0
6470
6571
66TEST_DATA_DIR = "test/"72TEST_DATA_DIR = "test/"

Subscribers

People subscribed via source and target branches