Skip to content

Commit

Permalink
fix: improve util-linux checker
Browse files Browse the repository at this point in the history
Update pattern to detect util-linux in 'exotic' libraries

Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
  • Loading branch information
ffontaine committed Mar 3, 2023
1 parent f60d1c6 commit 380a596
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cve_bin_tool/checkers/util_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class UtilLinuxChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [r"util-linux ([0-9]+\.[0-9]+\.[0-9]+)"]
VERSION_PATTERNS = [r"util-linux[ -]([0-9]+\.[0-9]+\.[0-9]+)"]
VENDOR_PRODUCT = [
("andries_brouwer", "util-linux"),
("kernel", "util-linux"),
Expand Down
7 changes: 6 additions & 1 deletion test/test_data/util_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
"product": "util-linux",
"version": "2.38.1",
"version_strings": ["util-linux 2.38.1"],
}
},
{
"product": "util-linux",
"version": "2.26.2",
"version_strings": ["util-linux-2.26.2"],
},
]
package_test_data = [
{
Expand Down

0 comments on commit 380a596

Please sign in to comment.