Skip to content

Commit 0677113

Browse files
authored
feat(checker): Add gpgme Checker (#1222)
1 parent f17e679 commit 0677113

File tree

6 files changed

+58
-0
lines changed

6 files changed

+58
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"gnupg",
3535
"gnutls",
3636
"glibc",
37+
"gpgme",
3738
"gstreamer",
3839
"haproxy",
3940
"hostapd",

cve_bin_tool/checkers/gpgme.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (C) 2021 Intel Corporation
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
"""
5+
CVE checker for gpgme
6+
7+
https://www.cvedetails.com/product/94121/?q=Gpgme
8+
https://www.cvedetails.com/product/10513/GNU-Gpgme.html?vendor_id=72
9+
10+
"""
11+
from cve_bin_tool.checkers import Checker
12+
13+
14+
class GpgmeChecker(Checker):
15+
CONTAINS_PATTERNS = []
16+
FILENAME_PATTERNS = [r"gpgme"]
17+
VERSION_PATTERNS = [
18+
r"This is GPGME ([0-9]+\.[0-9]+\.[0-9]+) \- The GnuPG Made Easy library",
19+
r"GPGME-Tool ([0-9]+\.[0-9]+\.[0-9]+) ready",
20+
]
21+
VENDOR_PRODUCT = [("gnupg", "gpgme"), ("gnu", "gpgme")]
10.2 KB
Binary file not shown.
32.4 KB
Binary file not shown.

test/test_data/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"glibc",
2626
"gnupg",
2727
"gnutls",
28+
"gpgme",
2829
"gstreamer",
2930
"haproxy",
3031
"hostapd",

test/test_data/gpgme.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright (C) 2021 Intel Corporation
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{
6+
"product": "gpgme",
7+
"version": "1.16.0",
8+
"version_strings": [
9+
"GPGME-Tool 1.16.0 ready",
10+
"This is GPGME 1.16.0 - The GnuPG Made Easy library",
11+
],
12+
},
13+
{
14+
"product": "gpgme",
15+
"version": "1.13.1",
16+
"version_strings": [
17+
"GPGME-Tool 1.13.1 ready",
18+
"This is GPGME 1.13.1 - The GnuPG Made Easy library",
19+
],
20+
},
21+
]
22+
package_test_data = [
23+
{
24+
"url": "https://eu.mirror.archlinuxarm.org/aarch64/core/",
25+
"package_name": "gpgme-1.16.0-1-aarch64.pkg.tar.xz",
26+
"product": "gpgme",
27+
"version": "1.16.0",
28+
},
29+
{
30+
"url": "https://ftp.lysator.liu.se/pub/opensuse/ports/aarch64/distribution/leap/15.2/repo/oss/aarch64/",
31+
"package_name": "gpgme-1.13.1-lp152.2.1.aarch64.rpm",
32+
"product": "gpgme",
33+
"version": "1.13.1",
34+
},
35+
]

0 commit comments

Comments
 (0)