Skip to content

Commit

Permalink
fix: improve gimp checker (#2992)
Browse files Browse the repository at this point in the history
Improve gimp checker to avoid a false positive with stellarium which
embeds images created with GIMP 2.9.9

Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
Co-authored-by: Terri Oda <terri.oda@intel.com>
  • Loading branch information
ffontaine and terriko authored Jun 20, 2023
1 parent 68527d5 commit 6395149
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cve_bin_tool/checkers/gimp.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
class GimpChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS = [r"gimp"]
VERSION_PATTERNS = [r"GIMP ([0-9]+\.[0-9]+\.[0-9]+)"]
VERSION_PATTERNS = [r"image-uri\r?\nGIMP ([0-9]+\.[0-9]+\.[0-9]+)"]
VENDOR_PRODUCT = [("gimp", "gimp")]
6 changes: 5 additions & 1 deletion test/test_data/gimp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{"product": "gimp", "version": "2.6.10", "version_strings": ["GIMP 2.6.10"]}
{
"product": "gimp",
"version": "2.6.10",
"version_strings": ["image-uri\nGIMP 2.6.10"],
}
]
package_test_data = [
{
Expand Down
1 change: 0 additions & 1 deletion test/test_data/stellarium.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"package_name": "stellarium-1.2-9.fc39.aarch64.rpm",
"product": "stellarium",
"version": "1.2",
"other_products": ["gimp"],
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/s/stellarium/",
Expand Down

0 comments on commit 6395149

Please sign in to comment.