Skip to content

Commit b202c97

Browse files
author
Boris Antonov
committed
Added search-cpe method
1 parent 0251cc0 commit b202c97

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "vulners"
3-
version = "2.3.3"
3+
version = "2.3.4"
44
description = "Python library and command-line utility for Vulners (https://vulners.com)"
55
readme = "README.md"
66
authors = ["Vulners Team"]

vulners/base.py

-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ def validate(self, param, value):
261261
return _param.validate(param, value)
262262
except ParamError as e:
263263
errs.append(e)
264-
pass
265264

266265
raise ParamError(
267266
"Expect %s but got '%s'",

vulners/vulners.py

+9
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,15 @@ def get_cpe_vulnerabilities(
327327
only_ids,
328328
)
329329

330+
search_cpe = Endpoint(
331+
method="get",
332+
url="/api/v4/search/cpe/",
333+
params=[
334+
("product", String(required=True, description="Product string to search CPE for")),
335+
("vendor", String(required=False, description="Optional vendor to include in CPE")),
336+
],
337+
)
338+
330339
get_multiple_bulletins = Endpoint(
331340
method="post",
332341
url="/api/v3/search/id/",

0 commit comments

Comments
 (0)