diff --git a/cve_bin_tool/checkers/nghttp2.py b/cve_bin_tool/checkers/nghttp2.py index fb0a69fe93..e56d2cf2c7 100644 --- a/cve_bin_tool/checkers/nghttp2.py +++ b/cve_bin_tool/checkers/nghttp2.py @@ -19,5 +19,8 @@ class Nghttp2Checker(Checker): VERSION_PATTERNS = [ r"nghttp2/([0-9]+\.[0-9]+\.[0-9]+)", r"([0-9]+\.[0-9]+\.[0-9]+)\r?\nnghttp2[-_]", + r"nghttp2_[a-z_]+\r?\n([0-9]+\.[0-9]+\.[0-9]+)\r?\n", + r"([0-9]+\.[0-9]+\.[0-9]+)\r?\n:authority", + r"([0-9]+\.[0-9]+\.[0-9]+)\r?\n:metho", ] VENDOR_PRODUCT = [("nghttp2", "nghttp2")] diff --git a/test/condensed-downloads/libnghttp2-1.64.0-1-x86_64.pkg.tar.zst.tar.gz b/test/condensed-downloads/libnghttp2-1.64.0-1-x86_64.pkg.tar.zst.tar.gz new file mode 100644 index 0000000000..f0ed3dad1e Binary files /dev/null and b/test/condensed-downloads/libnghttp2-1.64.0-1-x86_64.pkg.tar.zst.tar.gz differ diff --git a/test/condensed-downloads/libnghttp2-14_1.59.0-1ubuntu0.1_amd64.deb.tar.gz b/test/condensed-downloads/libnghttp2-14_1.59.0-1ubuntu0.1_amd64.deb.tar.gz new file mode 100644 index 0000000000..1b5ababea8 Binary files /dev/null and b/test/condensed-downloads/libnghttp2-14_1.59.0-1ubuntu0.1_amd64.deb.tar.gz differ diff --git a/test/test_data/nghttp2.py b/test/test_data/nghttp2.py index 6dea3000d1..0800070121 100644 --- a/test/test_data/nghttp2.py +++ b/test/test_data/nghttp2.py @@ -8,6 +8,16 @@ "version": "1.18.1", "version_strings": ["1.18.1\nnghttp2-"], }, + { + "product": "nghttp2", + "version": "1.64.0", + "version_strings": ["1.64.0\n:metho"], + }, + { + "product": "nghttp2", + "version": "1.59.0", + "version_strings": ["1.59.0\n:authority"], + }, ] package_test_data = [ { @@ -40,4 +50,17 @@ "product": "nghttp2", "version": "1.41.0", }, + { + "url": "https://mirror.msys2.org/msys/x86_64/", + "package_name": "libnghttp2-1.64.0-1-x86_64.pkg.tar.zst", + "product": "nghttp2", + "version": "1.64.0", + "other_products": ["gcc"], + }, + { + "url": "http://security.ubuntu.com/ubuntu/pool/main/n/nghttp2/", + "package_name": "libnghttp2-14_1.59.0-1ubuntu0.1_amd64.deb", + "product": "nghttp2", + "version": "1.59.0", + }, ]