Skip to content

Commit f7830d8

Browse files
feat(checker): Added Mozilla Thunderbird checker (#2429)
1 parent 639fd49 commit f7830d8

File tree

5 files changed

+48
-0
lines changed

5 files changed

+48
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@
232232
"tcpdump",
233233
"thrift",
234234
"thttpd",
235+
"thunderbird",
235236
"timescaledb",
236237
"tinyproxy",
237238
"tor",

cve_bin_tool/checkers/thunderbird.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (C) 2022 Intel Corporation
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for thunderbird
7+
8+
https://www.cvedetails.com/product/3678/Mozilla-Thunderbird.html?vendor_id=452
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class ThunderbirdChecker(Checker):
17+
CONTAINS_PATTERNS: list[str] = []
18+
FILENAME_PATTERNS: list[str] = [r"thunderbird"]
19+
VERSION_PATTERNS = [
20+
r"thunderbird-([0-9]+.[0-9]+(.[0-9]+)?)",
21+
r'"name":"thunderbird","version":"([0-9]+.[0-9]+(.[0-9]+)?)',
22+
]
23+
VENDOR_PRODUCT = [("mozilla", "thunderbird")]
Binary file not shown.
Binary file not shown.

test/test_data/thunderbird.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (C) 2022 Intel Corporation
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{
6+
"product": "thunderbird",
7+
"version": "102.5.1",
8+
"version_strings": [r'"name":"thunderbird","version":"102.5.1'],
9+
},
10+
]
11+
package_test_data = [
12+
{
13+
"url": "https://www.rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/t/",
14+
"package_name": "thunderbird-102.5.1-1.fc38.aarch64.rpm",
15+
"product": "thunderbird",
16+
"version": "102.5.1",
17+
},
18+
{
19+
"url": "http://ftp.fr.debian.org/debian/pool/main/t/thunderbird/",
20+
"package_name": "thunderbird_52.8.0-1~deb8u1_amd64.deb",
21+
"product": "thunderbird",
22+
"version": "52.8.0",
23+
},
24+
]

0 commit comments

Comments
 (0)