forked from intel/cve-bin-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(checker): Add Lua Checker (intel#1257)
- Loading branch information
1 parent
117e325
commit 77e9021
Showing
5 changed files
with
59 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 |
---|---|---|
|
@@ -66,6 +66,7 @@ | |
"libxslt", | ||
"lighttpd", | ||
"logrotate", | ||
"lua", | ||
"mariadb", | ||
"memcached", | ||
"mysql", | ||
|
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,21 @@ | ||
# Copyright (C) 2021 Intel Corporation | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
|
||
""" | ||
CVE checker for lua | ||
https://www.cvedetails.com/product/28436/?q=LUA | ||
""" | ||
from cve_bin_tool.checkers import Checker | ||
|
||
|
||
class LuaChecker(Checker): | ||
CONTAINS_PATTERNS = [ | ||
r"PANIC: unprotected error in call to Lua API \(%s\)", | ||
r"-o name output to file `name' \(default is \"luac.out\"\)", | ||
] | ||
FILENAME_PATTERNS = [r"lua"] | ||
VERSION_PATTERNS = [r"Lua ([0-9]+\.[0-9]+\.[0-9]+)"] | ||
VENDOR_PRODUCT = [("lua", "lua")] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Copyright (C) 2021 Intel Corporation | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
mapping_test_data = [ | ||
{ | ||
"product": "lua", | ||
"version": "5.1.5", | ||
"version_strings": [ | ||
"Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio", | ||
"PANIC: unprotected error in call to Lua API (%s)", | ||
'-o name output to file `name\' (default is "luac.out")', | ||
], | ||
}, | ||
{ | ||
"product": "lua", | ||
"version": "5.0.3", | ||
"version_strings": [ | ||
"Lua 5.0.3 Copyright (C) 1994-2006 Tecgraf, PUC-Rio", | ||
"PANIC: unprotected error in call to Lua API (%s)", | ||
'-o name output to file `name\' (default is "luac.out")', | ||
], | ||
}, | ||
] | ||
package_test_data = [ | ||
{ | ||
"url": "https://ftp.lysator.liu.se/pub/opensuse/tumbleweed/repo/oss/x86_64/", | ||
"package_name": "lua51-5.1.5-15.11.x86_64.rpm", | ||
"product": "lua", | ||
"version": "5.1.5", | ||
}, | ||
{ | ||
"url": "http://ports.ubuntu.com/pool/universe/l/lua50/", | ||
"package_name": "lua50_5.0.3-8_arm64.deb", | ||
"product": "lua", | ||
"version": "5.0.3", | ||
}, | ||
] |