-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(checker): New checker request - GNU emacs (#2941)
* feat(checker): New checker request - GNU emacs * feat(checker): New checker request - GNU emacs * closes #2921 Signed-off-by: Bartlomiej Cieszkowski <bartlomiej.cieszkowski@intel.com> Signed-off-by: Przemyslaw Romaniak <przemyslaw.romaniak@intel.com> * feat(checker): update test/test_data/emacs.py workaround for false detection Co-authored-by: Terri Oda <terri.oda@intel.com> Signed-off-by: Bartlomiej Cieszkowski <bartlomiej.cieszkowski@intel.com> * fix: remove libtiff, pango as checkers have been improved. --------- Signed-off-by: Bartlomiej Cieszkowski <bartlomiej.cieszkowski@intel.com> Signed-off-by: Przemyslaw Romaniak <przemyslaw.romaniak@intel.com> Co-authored-by: Terri Oda <terri.oda@intel.com>
- Loading branch information
Showing
6 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,6 +64,7 @@ | |
"e2fsprogs", | ||
"elfutils", | ||
"enscript", | ||
"emacs", | ||
"exim", | ||
"exiv2", | ||
"expat", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright (C) 2023 Intel Corporation | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
|
||
""" | ||
CVE checker for emacs | ||
https://www.cvedetails.com/vulnerability-list/vendor_id-72/product_id-741/GNU-Emacs.html | ||
""" | ||
from cve_bin_tool.checkers import Checker | ||
|
||
|
||
class EmacsChecker(Checker): | ||
CONTAINS_PATTERNS = [ | ||
r"Bare Emacs (standard Lisp code not loaded)", | ||
r"Run M-x info RET m emacs RET m emacs invocation RET inside Emacs to", | ||
# Alternate optional contains patterns, | ||
# see https://github.com/intel/cve-bin-tool/tree/main/cve_bin_tool/checkers#helper-script for more details | ||
# r"Run Emacs, the extensible, customizable, self-documenting real-time", | ||
] | ||
FILENAME_PATTERNS = [r"emacs"] | ||
VERSION_PATTERNS = [ | ||
r"Id: GNU Emacs ([0-9]+\.[0-9]+)" | ||
] # this version string is extracted from "$Id: GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.14) of 2020-03-26, modified by Debian $" | ||
|
||
VENDOR_PRODUCT = [("gnu", "emacs")] |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright (C) 2023 Intel Corporation | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
mapping_test_data = [ | ||
{ | ||
"product": "emacs", | ||
"version": "28.2", | ||
"version_strings": [r"$Id: GNU Emacs 28.2"], | ||
}, | ||
{ | ||
"product": "emacs", | ||
"version": "25.2", | ||
"version_strings": [r"$Id: GNU Emacs 25.2"], | ||
}, | ||
{ | ||
"product": "emacs", | ||
"version": "26.1", | ||
"version_strings": [r"$Id: GNU Emacs 26.1"], | ||
}, | ||
] | ||
package_test_data = [ | ||
{ | ||
"url": "http://ports.ubuntu.com/pool/main/e/emacs25/", | ||
"package_name": "emacs25_25.2+1-6_arm64.deb", | ||
"product": "emacs", | ||
"version": "25.2", | ||
}, | ||
{ | ||
"url": "http://rpmfind.net/linux/centos/8-stream/AppStream/x86_64/os/Packages/", | ||
"package_name": "emacs-26.1-7.el8.x86_64.rpm", | ||
"product": "emacs", | ||
"version": "26.1", | ||
}, | ||
] |