Skip to content

Commit

Permalink
fix: rename expat checker
Browse files Browse the repository at this point in the history
Rename expat checker to libexpat to make it more clear that the checker
extracts libexpat version

Fix intel#1694

Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
  • Loading branch information
ffontaine committed Aug 15, 2023
1 parent e0fe54a commit 2be8a42
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions cve_bin_tool/checkers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ $ sqlite3 ~/.cache/cve-bin-tool/cve.db \
VPkg: apple, mac_os_x
VPkg: canonical, ubuntu_linux
VPkg: debian, debian_linux
VPkg: libexpat, expat
VPkg: libexpat_project, libexpat
VPkg: mozilla, firefox
VPkg: opensuse, leap
VPkg: suse, linux_enterprise_debuginfo
Expand All @@ -351,8 +351,8 @@ VPkg: suse, linux_enterprise_debuginfo
`VENDOR_PRODUCT` attribute should have list of tuples of vendor product pair
found in the listings. Some of the listings will be with regards to products
that include this product. For our example all listings except
`libexpat, expat` merely include the target product (`expat` for the
example SQL query).
`libexpat_project, libexpat` merely include the target product (`libexpat` for
the example SQL query).

## Helper-Script

Expand Down
2 changes: 1 addition & 1 deletion cve_bin_tool/checkers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
"emacs",
"exim",
"exiv2",
"expat",
"f2fs_tools",
"faad2",
"fastd",
Expand Down Expand Up @@ -140,6 +139,7 @@
"libcurl",
"libdb",
"libebml",
"libexpat",
"libgcrypt",
"libgd",
"libgit2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@
from cve_bin_tool.checkers import Checker


class ExpatChecker(Checker):
# FIXME: fix contains pattern
class LibexpatChecker(Checker):
CONTAINS_PATTERNS = [
r"reserved prefix (xml) must not be undeclared or bound to another namespace name",
r"cannot change setting once parsing has begun",
"requested feature requires XML_DTD support in Expat",
]
FILENAME_PATTERNS = [r"expat"]
FILENAME_PATTERNS = [r"libexpat.so"]
VERSION_PATTERNS = [r"expat_([012]+\.[0-9]+\.[0-9]+)"]
VENDOR_PRODUCT = [("libexpat_project", "libexpat")]
4 changes: 2 additions & 2 deletions cve_bin_tool/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

"""
This tool scans for a number of common, vulnerable open source components
(openssl, libpng, libxml2, expat and a few others) to let you know if your
(openssl, libpng, libxml2, libexpat and a few others) to let you know if your
system includes common libraries with known vulnerabilities. It emits a list
of CVE numbers that may be relevant to your binary based on the versions.
There is a flag to enable information about backported fixes for specific
Expand Down Expand Up @@ -103,7 +103,7 @@ def main(argv=None):
description=textwrap.dedent(
"""
The CVE Binary Tool scans for a number of common, vulnerable open source
components (openssl, libpng, libxml2, expat and a few others) to let you know
components (openssl, libpng, libxml2, libexpat and a few others) to let you know
if a given directory or binary file includes common libraries with known
vulnerabilities.
"""
Expand Down
File renamed without changes.

0 comments on commit 2be8a42

Please sign in to comment.