Skip to content

Commit 691f4dd

Browse files
authored
feat(checker): add augeas checker (#5021)
Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 0e39831 commit 691f4dd

File tree

6 files changed

+47
-0
lines changed

6 files changed

+47
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"assimp",
3434
"asterisk",
3535
"atftp",
36+
"augeas",
3637
"avahi",
3738
"axel",
3839
"bash",

cve_bin_tool/checkers/augeas.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (C) 2025 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for augeas
7+
8+
https://www.cvedetails.com/product/26487/Augeas-Augeas.html?vendor_id=12963
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class AugeasChecker(Checker):
17+
CONTAINS_PATTERNS: list[str] = []
18+
FILENAME_PATTERNS: list[str] = []
19+
VERSION_PATTERNS = [r"([0-9]+\.[0-9]+\.[0-9]+)\r?\n/augeas"]
20+
VENDOR_PRODUCT = [("augeas", "augeas")]
Binary file not shown.
Binary file not shown.
Binary file not shown.

test/test_data/augeas.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (C) 2025 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{"product": "augeas", "version": "1.11.0", "version_strings": ["1.11.0\n/augeas"]}
6+
]
7+
package_test_data = [
8+
{
9+
"url": "http://ftp.debian.org/debian/pool/main/a/augeas/",
10+
"package_name": "libaugeas0_1.11.0-3_amd64.deb",
11+
"product": "augeas",
12+
"version": "1.11.0",
13+
},
14+
{
15+
"url": "https://downloads.openwrt.org/releases/21.02.0/packages/x86_64/packages/",
16+
"package_name": "augeas_1.12.0-3_x86_64.ipk",
17+
"product": "augeas",
18+
"version": "1.12.0",
19+
},
20+
{
21+
"url": "https://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/",
22+
"package_name": "augeas-libs-1.11.0-r1.apk",
23+
"product": "augeas",
24+
"version": "1.11.0",
25+
},
26+
]

0 commit comments

Comments
 (0)