diff --git a/cve_bin_tool/checkers/__init__.py b/cve_bin_tool/checkers/__init__.py index 549f52ce93..cceacf43f5 100644 --- a/cve_bin_tool/checkers/__init__.py +++ b/cve_bin_tool/checkers/__init__.py @@ -116,6 +116,7 @@ "harfbuzz", "haserl", "hdf5", + "heimdal", "hostapd", "hunspell", "hwloc", diff --git a/cve_bin_tool/checkers/heimdal.py b/cve_bin_tool/checkers/heimdal.py new file mode 100644 index 0000000000..6638819678 --- /dev/null +++ b/cve_bin_tool/checkers/heimdal.py @@ -0,0 +1,20 @@ +# Copyright (C) 2023 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + + +""" +CVE checker for heimdal + +https://www.cvedetails.com/product/42095/Heimdal-Project-Heimdal.html?vendor_id=17317 + +""" +from __future__ import annotations + +from cve_bin_tool.checkers import Checker + + +class HeimdalChecker(Checker): + CONTAINS_PATTERNS: list[str] = [] + FILENAME_PATTERNS: list[str] = [] + VERSION_PATTERNS = [r"Heimdal ([0-9]+\.[0-9]+\.[0-9]+)"] + VENDOR_PRODUCT = [("heimdal_project", "heimdal")] diff --git a/test/condensed-downloads/heimdal-7.7.0-r0.apk.tar.gz b/test/condensed-downloads/heimdal-7.7.0-r0.apk.tar.gz new file mode 100644 index 0000000000..e694ad6693 Binary files /dev/null and b/test/condensed-downloads/heimdal-7.7.0-r0.apk.tar.gz differ diff --git a/test/condensed-downloads/libheimdal-7.7.0-bp154.1.43.aarch64.rpm.tar.gz b/test/condensed-downloads/libheimdal-7.7.0-bp154.1.43.aarch64.rpm.tar.gz new file mode 100644 index 0000000000..b0e16313d5 Binary files /dev/null and b/test/condensed-downloads/libheimdal-7.7.0-bp154.1.43.aarch64.rpm.tar.gz differ diff --git a/test/condensed-downloads/libkrb5-26-heimdal_7.5.0+dfsg-3_amd64.deb.tar.gz b/test/condensed-downloads/libkrb5-26-heimdal_7.5.0+dfsg-3_amd64.deb.tar.gz new file mode 100644 index 0000000000..5cc311969b Binary files /dev/null and b/test/condensed-downloads/libkrb5-26-heimdal_7.5.0+dfsg-3_amd64.deb.tar.gz differ diff --git a/test/test_data/heimdal.py b/test/test_data/heimdal.py new file mode 100644 index 0000000000..936089f05c --- /dev/null +++ b/test/test_data/heimdal.py @@ -0,0 +1,26 @@ +# Copyright (C) 2023 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + +mapping_test_data = [ + {"product": "heimdal", "version": "7.5.0", "version_strings": ["Heimdal 7.5.0"]} +] +package_test_data = [ + { + "url": "http://rpmfind.net/linux/opensuse/distribution/leap/15.4/repo/oss/aarch64/", + "package_name": "libheimdal-7.7.0-bp154.1.43.aarch64.rpm", + "product": "heimdal", + "version": "7.7.0", + }, + { + "url": "http://ftp.fr.debian.org/debian/pool/main/h/heimdal/", + "package_name": "libkrb5-26-heimdal_7.5.0+dfsg-3_amd64.deb", + "product": "heimdal", + "version": "7.5.0", + }, + { + "url": "https://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/", + "package_name": "heimdal-7.7.0-r0.apk", + "product": "heimdal", + "version": "7.7.0", + }, +]