python-gvm 27.1.0__py3-none-any.whl → 27.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
gvm/__version__.py CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  # THIS IS AN AUTOGENERATED FILE. DO NOT TOUCH!
4
4
 
5
- __version__ = "27.1.0"
5
+ __version__ = "27.2.0"
@@ -27,6 +27,7 @@ from .requests.next import (
27
27
  ReportOperatingSystems,
28
28
  ReportPorts,
29
29
  ReportTlsCertificates,
30
+ ReportVulnerabilities,
30
31
  Tasks,
31
32
  )
32
33
  from .requests.v224 import HostsOrdering
@@ -1234,3 +1235,33 @@ class GMPNext(GMPv227[T]):
1234
1235
  details=details,
1235
1236
  )
1236
1237
  )
1238
+
1239
+ def get_report_vulnerabilities(
1240
+ self,
1241
+ report_id: EntityID,
1242
+ *,
1243
+ filter_string: str | None = None,
1244
+ filter_id: str | None = None,
1245
+ ignore_pagination: bool | None = None,
1246
+ details: bool | None = True,
1247
+ ) -> T:
1248
+ """Request vulnerabilities of a single report.
1249
+
1250
+ Args:
1251
+ report_id: UUID of an existing report.
1252
+ filter_string: Filter term to use to filter results in the report
1253
+ filter_id: UUID of filter to use to filter results in the report
1254
+ ignore_pagination: Whether to ignore the filter terms "first" and
1255
+ "rows".
1256
+ details: Request additional report vulnerability information details.
1257
+ Defaults to True.
1258
+ """
1259
+ return self._send_request_and_transform_response(
1260
+ ReportVulnerabilities.get_report_vulnerabilities(
1261
+ report_id=report_id,
1262
+ filter_string=filter_string,
1263
+ filter_id=filter_id,
1264
+ ignore_pagination=ignore_pagination,
1265
+ details=details,
1266
+ )
1267
+ )
@@ -38,6 +38,9 @@ from gvm.protocols.gmp.requests.next._report_ports import (
38
38
  from gvm.protocols.gmp.requests.next._report_tls_certificates import (
39
39
  ReportTlsCertificates,
40
40
  )
41
+ from gvm.protocols.gmp.requests.next._report_vulnerabilities import (
42
+ ReportVulnerabilities,
43
+ )
41
44
  from gvm.protocols.gmp.requests.next._tasks import Tasks
42
45
 
43
46
  from .._entity_id import EntityID
@@ -168,6 +171,7 @@ __all__ = (
168
171
  "ReportOperatingSystems",
169
172
  "ReportPorts",
170
173
  "ReportTlsCertificates",
174
+ "ReportVulnerabilities",
171
175
  "Reports",
172
176
  "ResourceNames",
173
177
  "ResourceType",
@@ -0,0 +1,47 @@
1
+ from gvm.errors import RequiredArgument
2
+ from gvm.protocols.core import Request
3
+ from gvm.protocols.gmp.requests import EntityID
4
+ from gvm.utils import to_bool
5
+ from gvm.xml import XmlCommand
6
+
7
+
8
+ class ReportVulnerabilities:
9
+ @classmethod
10
+ def get_report_vulnerabilities(
11
+ cls,
12
+ report_id: EntityID,
13
+ *,
14
+ filter_string: str | None = None,
15
+ filter_id: str | None = None,
16
+ ignore_pagination: bool | None = None,
17
+ details: bool | None = True,
18
+ ) -> Request:
19
+ """Request vulnerabilities of a single report.
20
+
21
+ Args:
22
+ report_id: UUID of an existing report.
23
+ filter_string: Filter term to use to filter results in the report
24
+ filter_id: UUID of filter to use to filter results in the report
25
+ ignore_pagination: Whether to ignore the filter terms "first" and
26
+ "rows".
27
+ details: Request additional report vulnerability information details.
28
+ Defaults to True.
29
+ """
30
+ cmd = XmlCommand("get_report_vulns")
31
+
32
+ if not report_id:
33
+ raise RequiredArgument(
34
+ function=cls.get_report_vulnerabilities.__name__,
35
+ argument="report_id",
36
+ )
37
+
38
+ cmd.set_attribute("report_id", str(report_id))
39
+
40
+ cmd.add_filter(filter_string, filter_id)
41
+
42
+ if ignore_pagination is not None:
43
+ cmd.set_attribute("ignore_pagination", to_bool(ignore_pagination))
44
+
45
+ cmd.set_attribute("details", to_bool(details))
46
+
47
+ return cmd
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-gvm
3
- Version: 27.1.0
3
+ Version: 27.2.0
4
4
  Summary: Library to communicate with remote servers over GMP or OSP
5
5
  Project-URL: Homepage, https://github.com/greenbone/python-gvm/
6
6
  Project-URL: Repository, https://github.com/greenbone/python-gvm/
@@ -1,5 +1,5 @@
1
1
  gvm/__init__.py,sha256=Eu3a8hRdlixDFn34Q-BwPXVN65KHpgFk_i0CYUdbfF8,412
2
- gvm/__version__.py,sha256=HYbdSrU0bHMZaWk0LItse6vaE0DuhIJ9y-oQfuunC8U,103
2
+ gvm/__version__.py,sha256=kHHqZbSVgipHUeAV6SSETYyNVYISS4BZinD7v1hNlww,103
3
3
  gvm/_enum.py,sha256=n--ztwQQW2MU4M9E_4qJrw-32IGc4Laj6auZ8glMw_0,1168
4
4
  gvm/errors.py,sha256=FnZoe3ROKlAm8LMJ25uKRaG9cp-SG8hYIVtDMwwp0l0,5263
5
5
  gvm/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -27,11 +27,11 @@ gvm/protocols/gmp/_gmp224.py,sha256=NO-ufzkGW1RNzMHrIjlFm7r8QzSH0uRZK5xc9mWLRVI,
27
27
  gvm/protocols/gmp/_gmp225.py,sha256=3lz_AHTIQdBEr4DIYJ5o9D0Eke-Df3jUb0IZytITRdo,2227
28
28
  gvm/protocols/gmp/_gmp226.py,sha256=YqQ7CJIbUtM7s8wQPYX5BgePdhX-tUjCemanW0_DZtE,14543
29
29
  gvm/protocols/gmp/_gmp227.py,sha256=-q4Aci1I4FRtLle21qTwtkchE2ixWn1-Kug58X4dU5I,5713
30
- gvm/protocols/gmp/_gmpnext.py,sha256=jE_NLLQHNw8mtDfYGLzXvUrhJ7bgSHk1ZQA6x6hFpUs,43062
30
+ gvm/protocols/gmp/_gmpnext.py,sha256=6PL5_uhhRnuPAfJbCEqOTjkI4di12dvox4hymoEhrVQ,44211
31
31
  gvm/protocols/gmp/requests/__init__.py,sha256=XH1zSifyz9Rx4FqY2lJ1mwurnUepHk7REZ-fSMC_Wx0,200
32
32
  gvm/protocols/gmp/requests/_entity_id.py,sha256=V96VhTg7_CF2AduaAHRYrGgTaOVA8_mG1lFiCl8-CMA,136
33
33
  gvm/protocols/gmp/requests/_version.py,sha256=GdHQnEVzJ6PbxoU4pxP36Oze1XvK5llWqB9bkC16Pf8,393
34
- gvm/protocols/gmp/requests/next/__init__.py,sha256=SIriDMFD3FLn075D_-30wIgG3cn-daq8NP5WKriU348,4213
34
+ gvm/protocols/gmp/requests/next/__init__.py,sha256=K3h9B1m335CqV6VBV51-bfkpFsGTdwnO5t41l0RdYqY,4341
35
35
  gvm/protocols/gmp/requests/next/_agent_groups.py,sha256=eaG4AxT7-0444tJfsWp2KLVC87HcsntxCEWKisVZ_24,5520
36
36
  gvm/protocols/gmp/requests/next/_agent_installers.py,sha256=jCwcbct5SP5chqD9KW9vcyhsYN2a1_RM7Q4NOYIWGfo,2509
37
37
  gvm/protocols/gmp/requests/next/_agents.py,sha256=6LIr3xG1YHsQeQucg01nmjm3JguvObluIkn0t_KNnAU,14591
@@ -47,6 +47,7 @@ gvm/protocols/gmp/requests/next/_report_hosts.py,sha256=uAt9MvfLZoIqZ0VWKpWSOrsQ
47
47
  gvm/protocols/gmp/requests/next/_report_operating_systems.py,sha256=qN6-94OYKXGQQZ4q7RuRLtoaBduT500ocYb_-mIW5E0,1566
48
48
  gvm/protocols/gmp/requests/next/_report_ports.py,sha256=xTzdBFKqYHv1ulH1BduWEE-wO3SzuMu0yU7pnB5jx5E,1477
49
49
  gvm/protocols/gmp/requests/next/_report_tls_certificates.py,sha256=-h1d3OVn873DLEHHvjeLVpOpvErJo5C3u5tyxIrXUI8,1559
50
+ gvm/protocols/gmp/requests/next/_report_vulnerabilities.py,sha256=8TOQm-CyaHtTOL1dXDUrFYEzuohdeSs_TeonCeVJJzg,1543
50
51
  gvm/protocols/gmp/requests/next/_tasks.py,sha256=pVCIWtQ3n15Dt8zdfKbxPxfAnzgefTsb1WHKYzMmLgI,22439
51
52
  gvm/protocols/gmp/requests/v224/__init__.py,sha256=BX8_kYVADzgpmMfl4ABMtb8JAPUaCtREj7kQebGgSvY,3094
52
53
  gvm/protocols/gmp/requests/v224/_aggregates.py,sha256=G5zO5h6ca7dHIyKp91yZyV6WYK4Lv6W8HJm7myrz_kM,7702
@@ -110,7 +111,7 @@ gvm/protocols/http/openvasd/_notus.py,sha256=FwX5fFsx-FWXf4Rl_5seequkQ6XVS8jZ0NW
110
111
  gvm/protocols/http/openvasd/_openvasd1.py,sha256=YhV-OJULO4XJJQTsvAyH1ZVc5r1mRmGk2VMotvOoIxg,3896
111
112
  gvm/protocols/http/openvasd/_scans.py,sha256=U8aYmHudMQFtVzl9khjNsRRewY0sf8G376zTYZN6HQQ,16667
112
113
  gvm/protocols/http/openvasd/_vts.py,sha256=_T4j4SdXe0DthBA7pCehx4FXKYbQyhzpq72YNO4fKt4,2136
113
- python_gvm-27.1.0.dist-info/METADATA,sha256=h3f2TB2G83ndDQ8Fm76j6AiKO6zy2xIIj31WacebqCU,5709
114
- python_gvm-27.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
115
- python_gvm-27.1.0.dist-info/licenses/LICENSE,sha256=WJ7YI-moTFb-uVrFjnzzhGJrnL9P2iqQe8NuED3hutI,35141
116
- python_gvm-27.1.0.dist-info/RECORD,,
114
+ python_gvm-27.2.0.dist-info/METADATA,sha256=Yc_PQefAzvd-9fYXnEIvizTN-jw74PYc6VzS4cl9NTQ,5709
115
+ python_gvm-27.2.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
116
+ python_gvm-27.2.0.dist-info/licenses/LICENSE,sha256=WJ7YI-moTFb-uVrFjnzzhGJrnL9P2iqQe8NuED3hutI,35141
117
+ python_gvm-27.2.0.dist-info/RECORD,,