Skip to content

Commit 6395149

Browse files
ffontaineterriko
andauthored
fix: improve gimp checker (#2992)
Improve gimp checker to avoid a false positive with stellarium which embeds images created with GIMP 2.9.9 Signed-off-by: Fabrice Fontaine <[email protected]> Co-authored-by: Terri Oda <[email protected]>
1 parent 68527d5 commit 6395149

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

cve_bin_tool/checkers/gimp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
class GimpChecker(Checker):
1717
CONTAINS_PATTERNS: list[str] = []
1818
FILENAME_PATTERNS = [r"gimp"]
19-
VERSION_PATTERNS = [r"GIMP ([0-9]+\.[0-9]+\.[0-9]+)"]
19+
VERSION_PATTERNS = [r"image-uri\r?\nGIMP ([0-9]+\.[0-9]+\.[0-9]+)"]
2020
VENDOR_PRODUCT = [("gimp", "gimp")]

test/test_data/gimp.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
# SPDX-License-Identifier: GPL-3.0-or-later
33

44
mapping_test_data = [
5-
{"product": "gimp", "version": "2.6.10", "version_strings": ["GIMP 2.6.10"]}
5+
{
6+
"product": "gimp",
7+
"version": "2.6.10",
8+
"version_strings": ["image-uri\nGIMP 2.6.10"],
9+
}
610
]
711
package_test_data = [
812
{

test/test_data/stellarium.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"package_name": "stellarium-1.2-9.fc39.aarch64.rpm",
1111
"product": "stellarium",
1212
"version": "1.2",
13-
"other_products": ["gimp"],
1413
},
1514
{
1615
"url": "http://ftp.fr.debian.org/debian/pool/main/s/stellarium/",

0 commit comments

Comments
 (0)