Skip to content

Commit 0e0aa3c

Browse files
authored
fix: update docker checker (#5005)
Drop moby pattern from docker checker as moby already has its own checker and the latest docker CVE is linked to version 20.10.05 Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 07495da commit 0e0aa3c

File tree

3 files changed

+11
-24
lines changed

3 files changed

+11
-24
lines changed

cve_bin_tool/checkers/docker.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,5 @@
1414
class DockerChecker(Checker):
1515
CONTAINS_PATTERNS: list[str] = []
1616
FILENAME_PATTERNS: list[str] = [r"docker"]
17-
VERSION_PATTERNS: list[str] = [
18-
r"docker-ce-([0-9]+\.[0-9]+\.[0-9]+)",
19-
r"moby-([0-9]+\.[0-9]+\.[0-9]+)",
20-
]
21-
VENDOR_PRODUCT: list[tuple[str, str]] = [
22-
("docker", "docker"),
23-
]
17+
VERSION_PATTERNS: list[str] = [r"docker-ce-([0-9]+\.[0-9]+\.[0-9]+)"]
18+
VENDOR_PRODUCT: list[tuple[str, str]] = [("docker", "docker")]

test/test_data/docker.py

+1-12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"product": "docker",
44
"version": "19.03.15",
5-
"version_strings": ["docker-ce-19.03.15", "moby-24.0.7"],
5+
"version_strings": ["docker-ce-19.03.15"],
66
},
77
]
88

@@ -14,15 +14,4 @@
1414
"package_name": "docker-19.03.15-1.mga8.armv7hl.rpm",
1515
"other_products": ["gcc", "go"],
1616
},
17-
{
18-
"url": "https://www.rpmfind.net/linux/openmandriva/cooker/repository/aarch64/main/release/",
19-
"product": "docker",
20-
"version": "24.0.7",
21-
"package_name": "docker-24.0.7-2-omv2390.aarch64.rpm",
22-
"other_products": [
23-
"gcc",
24-
"go",
25-
"moby",
26-
],
27-
},
2817
]

test/test_data/moby.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@
1212
"product": "moby",
1313
"version": "24.0.5",
1414
"package_name": "moby-engine-24.0.5-1.fc40.aarch64.rpm",
15-
"other_products": [
16-
"docker",
17-
"gcc",
18-
"go",
19-
],
15+
"other_products": ["gcc", "go"],
16+
},
17+
{
18+
"url": "https://www.rpmfind.net/linux/openmandriva/cooker/repository/aarch64/main/release/",
19+
"product": "moby",
20+
"version": "24.0.7",
21+
"package_name": "docker-24.0.7-2-omv2390.aarch64.rpm",
22+
"other_products": ["gcc", "go"],
2023
},
2124
]

0 commit comments

Comments
 (0)