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 debianutils (intel#3390)
* feat(checker): extended BindChecker * feat(checker): added test names and additional version pattern * feat(checker): add debianutils
- Loading branch information
1 parent
30cc302
commit a4612c8
Showing
4 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 |
---|---|---|
|
@@ -58,6 +58,7 @@ | |
"dav1d", | ||
"davfs2", | ||
"dbus", | ||
"debianutils", | ||
"dhclient", | ||
"dhcpcd", | ||
"dhcpd", | ||
|
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,36 @@ | ||
# Copyright (C) 2023 SCHUTZWERK GmbH | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
|
||
""" | ||
CVE checker for debianutils | ||
References: | ||
https://salsa.debian.org/debian/debianutils | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
from cve_bin_tool.checkers import Checker | ||
|
||
|
||
class DebianutilsChecker(Checker): | ||
CONTAINS_PATTERNS: list[str] = [] | ||
FILENAME_PATTERNS = [ | ||
r"run-parts", | ||
r"tempfile", | ||
r"ischroot", | ||
r"installkernel", | ||
r"savelog", | ||
r"which.debianutils", | ||
r"add-shell", | ||
r"remove-shell", | ||
r"update-shells", | ||
] | ||
VERSION_PATTERNS = [ | ||
r"\r?\nDebian run-parts program, version\s([0-9]+\.[0-9]+)", | ||
r"\r?\ntempfile\s([0-9]+\.[0-9]+)", | ||
r"\r?\nDebian ischroot, version\s([0-9]+\.[0-9]+)", | ||
] | ||
VENDOR_PRODUCT = [("debian", "debianutils")] |
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,22 @@ | ||
# Copyright (C) 2023 SCHUTZWERK GmbH | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
mapping_test_data = [ | ||
{ | ||
"product": "debianutils", | ||
"version": "5.13", | ||
"version_strings": [ | ||
"Debian run-parts program, version 5.13", | ||
"tempfile 5.13", | ||
"Debian ischroot, version 5.13", | ||
], | ||
} | ||
] | ||
package_test_data = [ | ||
{ | ||
"url": "http://ftp.us.debian.org/debian/pool/main/d/debianutils/", | ||
"package_name": "debianutils_5.7-0.4_amd64.deb", | ||
"product": "debianutils", | ||
"version": "5.7", | ||
} | ||
] |