File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed
Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " vulners"
3- version = " 3.1.3 "
3+ version = " 3.1.4 "
44description = " Python library and command-line utility for Vulners (https://vulners.com)"
55readme = " README.md"
66authors = [" Vulners Team" ]
Original file line number Diff line number Diff line change 77from .misc import MiscApi
88from .report import ReportApi
99from .search import SearchApi
10+ from .stix import StixApi
1011from .subscription import SubscriptionApi
1112from .subscription_v4 import SubscriptionV4Api
1213from .webhook import WebhookApi
@@ -17,6 +18,10 @@ class VulnersApi(VulnersApiBase):
1718 def search (self ) -> SearchApi :
1819 return SearchApi (self )
1920
21+ @cached_property
22+ def stix (self ) -> StixApi :
23+ return StixApi (self )
24+
2025 @deprecated (
2126 "VulnersApi.find() is deprecated and will be removed in future releases.\n "
2227 "Use VulnersApi.search.search_bulletins() instead."
Original file line number Diff line number Diff line change 1+ from typing import Annotated
2+
3+ from pydantic import Field
4+
5+ from ..base import Unset , VulnersApiProxy , endpoint
6+
7+
8+ class StixApi (VulnersApiProxy ):
9+ make_bundle_by_id = endpoint (
10+ "StixApi.bundle" ,
11+ description = "Make bundle of STIX objects for the given bulletin ID" ,
12+ method = "GET" ,
13+ url = "/api/v4/stix/bundle" ,
14+ params = {
15+ "id" : Annotated [str , Field (description = "Bulletin ID" )],
16+ "opencti_id" : Annotated [
17+ str | None ,
18+ Field (default = None , description = "Existing OpenCTI object ID" ),
19+ ],
20+ },
21+ response_handler = lambda resp : resp ["result" ],
22+ )
You can’t perform that action at this time.
0 commit comments