Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve sudo checker #2527

Merged
merged 1 commit into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cve_bin_tool/checkers/sudo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
CVE checker for sudo
References:
https://www.sudo.ws/
https://www.cvedetails.com/product/200/Todd-Miller-Sudo.html?vendor_id=118
https://www.cvedetails.com/vulnerability-list/vendor_id-15714/product_id-32625/Sudo-Project-Sudo.html
https://www.cvedetails.com/product/75901/Sudo-Sudo.html?vendor_id=22354
"""
from cve_bin_tool.checkers import Checker

Expand All @@ -26,7 +28,11 @@ class SudoChecker(Checker):
r"Sudo Audit Server ([0-9]+\.[0-9]+\.[0-9]+(p[0-9]+)?)",
r"Sudo Sendlog ([0-9]+\.[0-9]+\.[0-9]+(p[0-9]+)?)",
r"sudoers ([0-9]+\.[0-9]+\.[0-9]+(p[0-9]+)?)",
r"([0-9]+\.[0-9]+\.[0-9]+(p[0-9]+)?)\r?\nSudo version %s",
r"Sudo version %s\r?\n([0-9]+\.[0-9]+\.[0-9]+(p[0-9]+)?)",
]
VENDOR_PRODUCT = [
("sudo", "sudo"),
("sudo_project", "sudo"),
("todd_miller", "sudo"),
]
Binary file not shown.
Binary file not shown.
14 changes: 14 additions & 0 deletions test/test_data/sudo.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,18 @@
"version": "1.9.5p2",
"other_products": [],
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/s/sudo/",
"package_name": "sudo_1.8.10p3-1+deb8u5_amd64.deb",
"product": "sudo",
"version": "1.8.10p3",
"other_products": [],
},
{
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/",
"package_name": "sudo_1.8.28p1-2_x86_64.ipk",
"product": "sudo",
"version": "1.8.28p1",
"other_products": [],
},
]