python-gvm 27.0.2__py3-none-any.whl → 27.1.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.
Potentially problematic release.
This version of python-gvm might be problematic. Click here for more details.
- gvm/__version__.py +1 -1
- gvm/protocols/gmp/_gmpnext.py +242 -0
- gvm/protocols/gmp/requests/next/__init__.py +32 -0
- gvm/protocols/gmp/requests/next/_report_applications.py +47 -0
- gvm/protocols/gmp/requests/next/_report_closed_cves.py +41 -0
- gvm/protocols/gmp/requests/next/_report_cves.py +46 -0
- gvm/protocols/gmp/requests/next/_report_errors.py +46 -0
- gvm/protocols/gmp/requests/next/_report_hosts.py +46 -0
- gvm/protocols/gmp/requests/next/_report_operating_systems.py +47 -0
- gvm/protocols/gmp/requests/next/_report_ports.py +46 -0
- gvm/protocols/gmp/requests/next/_report_tls_certificates.py +47 -0
- {python_gvm-27.0.2.dist-info → python_gvm-27.1.0.dist-info}/METADATA +1 -1
- {python_gvm-27.0.2.dist-info → python_gvm-27.1.0.dist-info}/RECORD +15 -7
- {python_gvm-27.0.2.dist-info → python_gvm-27.1.0.dist-info}/WHEEL +0 -0
- {python_gvm-27.0.2.dist-info → python_gvm-27.1.0.dist-info}/licenses/LICENSE +0 -0
gvm/__version__.py
CHANGED
gvm/protocols/gmp/_gmpnext.py
CHANGED
|
@@ -19,6 +19,14 @@ from .requests.next import (
|
|
|
19
19
|
CredentialStores,
|
|
20
20
|
IntegrationConfigs,
|
|
21
21
|
OCIImageTargets,
|
|
22
|
+
ReportApplications,
|
|
23
|
+
ReportClosedCVEs,
|
|
24
|
+
ReportCVEs,
|
|
25
|
+
ReportErrors,
|
|
26
|
+
ReportHosts,
|
|
27
|
+
ReportOperatingSystems,
|
|
28
|
+
ReportPorts,
|
|
29
|
+
ReportTlsCertificates,
|
|
22
30
|
Tasks,
|
|
23
31
|
)
|
|
24
32
|
from .requests.v224 import HostsOrdering
|
|
@@ -992,3 +1000,237 @@ class GMPNext(GMPv227[T]):
|
|
|
992
1000
|
oidc_provider_client_secret=oidc_provider_client_secret,
|
|
993
1001
|
)
|
|
994
1002
|
)
|
|
1003
|
+
|
|
1004
|
+
def get_report_hosts(
|
|
1005
|
+
self,
|
|
1006
|
+
report_id: EntityID,
|
|
1007
|
+
*,
|
|
1008
|
+
filter_string: str | None = None,
|
|
1009
|
+
filter_id: str | None = None,
|
|
1010
|
+
ignore_pagination: bool | None = None,
|
|
1011
|
+
details: bool | None = True,
|
|
1012
|
+
) -> T:
|
|
1013
|
+
"""Request hosts of a single report.
|
|
1014
|
+
|
|
1015
|
+
Args:
|
|
1016
|
+
report_id: UUID of an existing report.
|
|
1017
|
+
filter_string: Filter term to use to filter results in the report
|
|
1018
|
+
filter_id: UUID of filter to use to filter results in the report
|
|
1019
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
1020
|
+
"rows".
|
|
1021
|
+
details: Request additional report host information details.
|
|
1022
|
+
Defaults to True.
|
|
1023
|
+
"""
|
|
1024
|
+
return self._send_request_and_transform_response(
|
|
1025
|
+
ReportHosts.get_report_hosts(
|
|
1026
|
+
report_id=report_id,
|
|
1027
|
+
filter_string=filter_string,
|
|
1028
|
+
filter_id=filter_id,
|
|
1029
|
+
ignore_pagination=ignore_pagination,
|
|
1030
|
+
details=details,
|
|
1031
|
+
)
|
|
1032
|
+
)
|
|
1033
|
+
|
|
1034
|
+
def get_report_operating_systems(
|
|
1035
|
+
self,
|
|
1036
|
+
report_id: EntityID,
|
|
1037
|
+
*,
|
|
1038
|
+
filter_string: str | None = None,
|
|
1039
|
+
filter_id: str | None = None,
|
|
1040
|
+
ignore_pagination: bool | None = None,
|
|
1041
|
+
details: bool | None = True,
|
|
1042
|
+
) -> T:
|
|
1043
|
+
"""Request operating systems of a single report.
|
|
1044
|
+
|
|
1045
|
+
Args:
|
|
1046
|
+
report_id: UUID of an existing report.
|
|
1047
|
+
filter_string: Filter term to use to filter results in the report
|
|
1048
|
+
filter_id: UUID of filter to use to filter results in the report
|
|
1049
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
1050
|
+
"rows".
|
|
1051
|
+
details: Request additional report operating system information details.
|
|
1052
|
+
Defaults to True.
|
|
1053
|
+
"""
|
|
1054
|
+
return self._send_request_and_transform_response(
|
|
1055
|
+
ReportOperatingSystems.get_report_operating_systems(
|
|
1056
|
+
report_id=report_id,
|
|
1057
|
+
filter_string=filter_string,
|
|
1058
|
+
filter_id=filter_id,
|
|
1059
|
+
ignore_pagination=ignore_pagination,
|
|
1060
|
+
details=details,
|
|
1061
|
+
)
|
|
1062
|
+
)
|
|
1063
|
+
|
|
1064
|
+
def get_report_ports(
|
|
1065
|
+
self,
|
|
1066
|
+
report_id: EntityID,
|
|
1067
|
+
*,
|
|
1068
|
+
filter_string: str | None = None,
|
|
1069
|
+
filter_id: str | None = None,
|
|
1070
|
+
ignore_pagination: bool | None = None,
|
|
1071
|
+
details: bool | None = True,
|
|
1072
|
+
) -> T:
|
|
1073
|
+
"""Request ports of a single report.
|
|
1074
|
+
|
|
1075
|
+
Args:
|
|
1076
|
+
report_id: UUID of an existing report.
|
|
1077
|
+
filter_string: Filter term to use to filter results in the report
|
|
1078
|
+
filter_id: UUID of filter to use to filter results in the report
|
|
1079
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
1080
|
+
"rows".
|
|
1081
|
+
details: Request additional report port information details.
|
|
1082
|
+
Defaults to True.
|
|
1083
|
+
"""
|
|
1084
|
+
return self._send_request_and_transform_response(
|
|
1085
|
+
ReportPorts.get_report_ports(
|
|
1086
|
+
report_id=report_id,
|
|
1087
|
+
filter_string=filter_string,
|
|
1088
|
+
filter_id=filter_id,
|
|
1089
|
+
ignore_pagination=ignore_pagination,
|
|
1090
|
+
details=details,
|
|
1091
|
+
)
|
|
1092
|
+
)
|
|
1093
|
+
|
|
1094
|
+
def get_report_tls_certificates(
|
|
1095
|
+
self,
|
|
1096
|
+
report_id: EntityID,
|
|
1097
|
+
*,
|
|
1098
|
+
filter_string: str | None = None,
|
|
1099
|
+
filter_id: str | None = None,
|
|
1100
|
+
ignore_pagination: bool | None = None,
|
|
1101
|
+
details: bool | None = True,
|
|
1102
|
+
) -> T:
|
|
1103
|
+
"""Request TLS certificates of a single report.
|
|
1104
|
+
|
|
1105
|
+
Args:
|
|
1106
|
+
report_id: UUID of an existing report.
|
|
1107
|
+
filter_string: Filter term to use to filter results in the report
|
|
1108
|
+
filter_id: UUID of filter to use to filter results in the report
|
|
1109
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
1110
|
+
"rows".
|
|
1111
|
+
details: Request additional report TLS certificate information details.
|
|
1112
|
+
Defaults to True.
|
|
1113
|
+
"""
|
|
1114
|
+
return self._send_request_and_transform_response(
|
|
1115
|
+
ReportTlsCertificates.get_report_tls_certificates(
|
|
1116
|
+
report_id=report_id,
|
|
1117
|
+
filter_string=filter_string,
|
|
1118
|
+
filter_id=filter_id,
|
|
1119
|
+
ignore_pagination=ignore_pagination,
|
|
1120
|
+
details=details,
|
|
1121
|
+
)
|
|
1122
|
+
)
|
|
1123
|
+
|
|
1124
|
+
def get_report_applications(
|
|
1125
|
+
self,
|
|
1126
|
+
report_id: EntityID,
|
|
1127
|
+
*,
|
|
1128
|
+
filter_string: str | None = None,
|
|
1129
|
+
filter_id: str | None = None,
|
|
1130
|
+
ignore_pagination: bool | None = None,
|
|
1131
|
+
details: bool | None = True,
|
|
1132
|
+
) -> T:
|
|
1133
|
+
"""Request applications of a single report.
|
|
1134
|
+
|
|
1135
|
+
Args:
|
|
1136
|
+
report_id: UUID of an existing report.
|
|
1137
|
+
filter_string: Filter term to use to filter results in the report
|
|
1138
|
+
filter_id: UUID of filter to use to filter results in the report
|
|
1139
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
1140
|
+
"rows".
|
|
1141
|
+
details: Request additional report application information details.
|
|
1142
|
+
Defaults to True.
|
|
1143
|
+
"""
|
|
1144
|
+
return self._send_request_and_transform_response(
|
|
1145
|
+
ReportApplications.get_report_applications(
|
|
1146
|
+
report_id=report_id,
|
|
1147
|
+
filter_string=filter_string,
|
|
1148
|
+
filter_id=filter_id,
|
|
1149
|
+
ignore_pagination=ignore_pagination,
|
|
1150
|
+
details=details,
|
|
1151
|
+
)
|
|
1152
|
+
)
|
|
1153
|
+
|
|
1154
|
+
def get_report_cves(
|
|
1155
|
+
self,
|
|
1156
|
+
report_id: EntityID,
|
|
1157
|
+
*,
|
|
1158
|
+
filter_string: str | None = None,
|
|
1159
|
+
filter_id: str | None = None,
|
|
1160
|
+
ignore_pagination: bool | None = None,
|
|
1161
|
+
details: bool | None = True,
|
|
1162
|
+
) -> T:
|
|
1163
|
+
"""Request CVEs of a single report.
|
|
1164
|
+
|
|
1165
|
+
Args:
|
|
1166
|
+
report_id: UUID of an existing report.
|
|
1167
|
+
filter_string: Filter term to use to filter results in the report
|
|
1168
|
+
filter_id: UUID of filter to use to filter results in the report
|
|
1169
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
1170
|
+
"rows".
|
|
1171
|
+
details: Request additional report CVE information details.
|
|
1172
|
+
Defaults to True.
|
|
1173
|
+
"""
|
|
1174
|
+
return self._send_request_and_transform_response(
|
|
1175
|
+
ReportCVEs.get_report_cves(
|
|
1176
|
+
report_id=report_id,
|
|
1177
|
+
filter_string=filter_string,
|
|
1178
|
+
filter_id=filter_id,
|
|
1179
|
+
ignore_pagination=ignore_pagination,
|
|
1180
|
+
details=details,
|
|
1181
|
+
)
|
|
1182
|
+
)
|
|
1183
|
+
|
|
1184
|
+
def get_report_closed_cves(
|
|
1185
|
+
self,
|
|
1186
|
+
report_id: EntityID,
|
|
1187
|
+
*,
|
|
1188
|
+
ignore_pagination: bool | None = None,
|
|
1189
|
+
details: bool | None = True,
|
|
1190
|
+
) -> T:
|
|
1191
|
+
"""Request closed CVEs of a single report.
|
|
1192
|
+
|
|
1193
|
+
Args:
|
|
1194
|
+
report_id: UUID of an existing report.
|
|
1195
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
1196
|
+
"rows".
|
|
1197
|
+
details: Request additional report closed CVE information details.
|
|
1198
|
+
Defaults to True.
|
|
1199
|
+
"""
|
|
1200
|
+
return self._send_request_and_transform_response(
|
|
1201
|
+
ReportClosedCVEs.get_report_closed_cves(
|
|
1202
|
+
report_id=report_id,
|
|
1203
|
+
ignore_pagination=ignore_pagination,
|
|
1204
|
+
details=details,
|
|
1205
|
+
)
|
|
1206
|
+
)
|
|
1207
|
+
|
|
1208
|
+
def get_report_errors(
|
|
1209
|
+
self,
|
|
1210
|
+
report_id: EntityID,
|
|
1211
|
+
*,
|
|
1212
|
+
filter_string: str | None = None,
|
|
1213
|
+
filter_id: str | None = None,
|
|
1214
|
+
ignore_pagination: bool | None = None,
|
|
1215
|
+
details: bool | None = True,
|
|
1216
|
+
) -> T:
|
|
1217
|
+
"""Request errors of a single report.
|
|
1218
|
+
|
|
1219
|
+
Args:
|
|
1220
|
+
report_id: UUID of an existing report.
|
|
1221
|
+
filter_string: Filter term to use to filter results in the report
|
|
1222
|
+
filter_id: UUID of filter to use to filter results in the report
|
|
1223
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
1224
|
+
"rows".
|
|
1225
|
+
details: Request additional report error information details.
|
|
1226
|
+
Defaults to True.
|
|
1227
|
+
"""
|
|
1228
|
+
return self._send_request_and_transform_response(
|
|
1229
|
+
ReportErrors.get_report_errors(
|
|
1230
|
+
report_id=report_id,
|
|
1231
|
+
filter_string=filter_string,
|
|
1232
|
+
filter_id=filter_id,
|
|
1233
|
+
ignore_pagination=ignore_pagination,
|
|
1234
|
+
details=details,
|
|
1235
|
+
)
|
|
1236
|
+
)
|
|
@@ -14,6 +14,30 @@ from gvm.protocols.gmp.requests.next._integration_configs import (
|
|
|
14
14
|
IntegrationConfigs,
|
|
15
15
|
)
|
|
16
16
|
from gvm.protocols.gmp.requests.next._oci_image_targets import OCIImageTargets
|
|
17
|
+
from gvm.protocols.gmp.requests.next._report_applications import (
|
|
18
|
+
ReportApplications,
|
|
19
|
+
)
|
|
20
|
+
from gvm.protocols.gmp.requests.next._report_closed_cves import (
|
|
21
|
+
ReportClosedCVEs,
|
|
22
|
+
)
|
|
23
|
+
from gvm.protocols.gmp.requests.next._report_cves import (
|
|
24
|
+
ReportCVEs,
|
|
25
|
+
)
|
|
26
|
+
from gvm.protocols.gmp.requests.next._report_errors import (
|
|
27
|
+
ReportErrors,
|
|
28
|
+
)
|
|
29
|
+
from gvm.protocols.gmp.requests.next._report_hosts import (
|
|
30
|
+
ReportHosts,
|
|
31
|
+
)
|
|
32
|
+
from gvm.protocols.gmp.requests.next._report_operating_systems import (
|
|
33
|
+
ReportOperatingSystems,
|
|
34
|
+
)
|
|
35
|
+
from gvm.protocols.gmp.requests.next._report_ports import (
|
|
36
|
+
ReportPorts,
|
|
37
|
+
)
|
|
38
|
+
from gvm.protocols.gmp.requests.next._report_tls_certificates import (
|
|
39
|
+
ReportTlsCertificates,
|
|
40
|
+
)
|
|
17
41
|
from gvm.protocols.gmp.requests.next._tasks import Tasks
|
|
18
42
|
|
|
19
43
|
from .._entity_id import EntityID
|
|
@@ -132,10 +156,18 @@ __all__ = (
|
|
|
132
156
|
"Policies",
|
|
133
157
|
"PortLists",
|
|
134
158
|
"PortRangeType",
|
|
159
|
+
"ReportApplications",
|
|
160
|
+
"ReportCVEs",
|
|
161
|
+
"ReportClosedCVEs",
|
|
135
162
|
"ReportConfigParameter",
|
|
136
163
|
"ReportConfigs",
|
|
164
|
+
"ReportErrors",
|
|
137
165
|
"ReportFormatType",
|
|
138
166
|
"ReportFormats",
|
|
167
|
+
"ReportHosts",
|
|
168
|
+
"ReportOperatingSystems",
|
|
169
|
+
"ReportPorts",
|
|
170
|
+
"ReportTlsCertificates",
|
|
139
171
|
"Reports",
|
|
140
172
|
"ResourceNames",
|
|
141
173
|
"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 ReportApplications:
|
|
9
|
+
@classmethod
|
|
10
|
+
def get_report_applications(
|
|
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 applications 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 applications information details.
|
|
28
|
+
Defaults to True.
|
|
29
|
+
"""
|
|
30
|
+
cmd = XmlCommand("get_report_applications")
|
|
31
|
+
|
|
32
|
+
if not report_id:
|
|
33
|
+
raise RequiredArgument(
|
|
34
|
+
function=cls.get_report_applications.__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
|
|
@@ -0,0 +1,41 @@
|
|
|
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 ReportClosedCVEs:
|
|
9
|
+
@classmethod
|
|
10
|
+
def get_report_closed_cves(
|
|
11
|
+
cls,
|
|
12
|
+
report_id: EntityID,
|
|
13
|
+
*,
|
|
14
|
+
ignore_pagination: bool | None = None,
|
|
15
|
+
details: bool | None = True,
|
|
16
|
+
) -> Request:
|
|
17
|
+
"""Request closed CVEs of a single report.
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
report_id: UUID of an existing report.
|
|
21
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
22
|
+
"rows".
|
|
23
|
+
details: Request additional report closed CVE information details.
|
|
24
|
+
Defaults to True.
|
|
25
|
+
"""
|
|
26
|
+
cmd = XmlCommand("get_report_closed_cves")
|
|
27
|
+
|
|
28
|
+
if not report_id:
|
|
29
|
+
raise RequiredArgument(
|
|
30
|
+
function=cls.get_report_closed_cves.__name__,
|
|
31
|
+
argument="report_id",
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
cmd.set_attribute("report_id", str(report_id))
|
|
35
|
+
|
|
36
|
+
if ignore_pagination is not None:
|
|
37
|
+
cmd.set_attribute("ignore_pagination", to_bool(ignore_pagination))
|
|
38
|
+
|
|
39
|
+
cmd.set_attribute("details", to_bool(details))
|
|
40
|
+
|
|
41
|
+
return cmd
|
|
@@ -0,0 +1,46 @@
|
|
|
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 ReportCVEs:
|
|
9
|
+
@classmethod
|
|
10
|
+
def get_report_cves(
|
|
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 CVEs 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 CVE information details.
|
|
28
|
+
Defaults to True.
|
|
29
|
+
"""
|
|
30
|
+
cmd = XmlCommand("get_report_cves")
|
|
31
|
+
|
|
32
|
+
if not report_id:
|
|
33
|
+
raise RequiredArgument(
|
|
34
|
+
function=cls.get_report_cves.__name__, argument="report_id"
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
cmd.set_attribute("report_id", str(report_id))
|
|
38
|
+
|
|
39
|
+
cmd.add_filter(filter_string, filter_id)
|
|
40
|
+
|
|
41
|
+
if ignore_pagination is not None:
|
|
42
|
+
cmd.set_attribute("ignore_pagination", to_bool(ignore_pagination))
|
|
43
|
+
|
|
44
|
+
cmd.set_attribute("details", to_bool(details))
|
|
45
|
+
|
|
46
|
+
return cmd
|
|
@@ -0,0 +1,46 @@
|
|
|
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 ReportErrors:
|
|
9
|
+
@classmethod
|
|
10
|
+
def get_report_errors(
|
|
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 errors 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 error information details.
|
|
28
|
+
Defaults to True.
|
|
29
|
+
"""
|
|
30
|
+
cmd = XmlCommand("get_report_errors")
|
|
31
|
+
|
|
32
|
+
if not report_id:
|
|
33
|
+
raise RequiredArgument(
|
|
34
|
+
function=cls.get_report_errors.__name__, argument="report_id"
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
cmd.set_attribute("report_id", str(report_id))
|
|
38
|
+
|
|
39
|
+
cmd.add_filter(filter_string, filter_id)
|
|
40
|
+
|
|
41
|
+
if ignore_pagination is not None:
|
|
42
|
+
cmd.set_attribute("ignore_pagination", to_bool(ignore_pagination))
|
|
43
|
+
|
|
44
|
+
cmd.set_attribute("details", to_bool(details))
|
|
45
|
+
|
|
46
|
+
return cmd
|
|
@@ -0,0 +1,46 @@
|
|
|
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 ReportHosts:
|
|
9
|
+
@classmethod
|
|
10
|
+
def get_report_hosts(
|
|
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 hosts 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 host information details.
|
|
28
|
+
Defaults to True.
|
|
29
|
+
"""
|
|
30
|
+
cmd = XmlCommand("get_report_hosts")
|
|
31
|
+
|
|
32
|
+
if not report_id:
|
|
33
|
+
raise RequiredArgument(
|
|
34
|
+
function=cls.get_report_hosts.__name__, argument="report_id"
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
cmd.set_attribute("report_id", str(report_id))
|
|
38
|
+
|
|
39
|
+
cmd.add_filter(filter_string, filter_id)
|
|
40
|
+
|
|
41
|
+
if ignore_pagination is not None:
|
|
42
|
+
cmd.set_attribute("ignore_pagination", to_bool(ignore_pagination))
|
|
43
|
+
|
|
44
|
+
cmd.set_attribute("details", to_bool(details))
|
|
45
|
+
|
|
46
|
+
return cmd
|
|
@@ -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 ReportOperatingSystems:
|
|
9
|
+
@classmethod
|
|
10
|
+
def get_report_operating_systems(
|
|
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 operating systems 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 operating systems information details.
|
|
28
|
+
Defaults to True.
|
|
29
|
+
"""
|
|
30
|
+
cmd = XmlCommand("get_report_operating_systems")
|
|
31
|
+
|
|
32
|
+
if not report_id:
|
|
33
|
+
raise RequiredArgument(
|
|
34
|
+
function=cls.get_report_operating_systems.__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
|
|
@@ -0,0 +1,46 @@
|
|
|
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 ReportPorts:
|
|
9
|
+
@classmethod
|
|
10
|
+
def get_report_ports(
|
|
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 ports 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 port information details.
|
|
28
|
+
Defaults to True.
|
|
29
|
+
"""
|
|
30
|
+
cmd = XmlCommand("get_report_ports")
|
|
31
|
+
|
|
32
|
+
if not report_id:
|
|
33
|
+
raise RequiredArgument(
|
|
34
|
+
function=cls.get_report_ports.__name__, argument="report_id"
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
cmd.set_attribute("report_id", str(report_id))
|
|
38
|
+
|
|
39
|
+
cmd.add_filter(filter_string, filter_id)
|
|
40
|
+
|
|
41
|
+
if ignore_pagination is not None:
|
|
42
|
+
cmd.set_attribute("ignore_pagination", to_bool(ignore_pagination))
|
|
43
|
+
|
|
44
|
+
cmd.set_attribute("details", to_bool(details))
|
|
45
|
+
|
|
46
|
+
return cmd
|
|
@@ -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 ReportTlsCertificates:
|
|
9
|
+
@classmethod
|
|
10
|
+
def get_report_tls_certificates(
|
|
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 TLS certificates 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 TLS certificate information details.
|
|
28
|
+
Defaults to True.
|
|
29
|
+
"""
|
|
30
|
+
cmd = XmlCommand("get_report_tls_certificates")
|
|
31
|
+
|
|
32
|
+
if not report_id:
|
|
33
|
+
raise RequiredArgument(
|
|
34
|
+
function=cls.get_report_tls_certificates.__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.0
|
|
3
|
+
Version: 27.1.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=
|
|
2
|
+
gvm/__version__.py,sha256=HYbdSrU0bHMZaWk0LItse6vaE0DuhIJ9y-oQfuunC8U,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=
|
|
30
|
+
gvm/protocols/gmp/_gmpnext.py,sha256=jE_NLLQHNw8mtDfYGLzXvUrhJ7bgSHk1ZQA6x6hFpUs,43062
|
|
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=
|
|
34
|
+
gvm/protocols/gmp/requests/next/__init__.py,sha256=SIriDMFD3FLn075D_-30wIgG3cn-daq8NP5WKriU348,4213
|
|
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
|
|
@@ -39,6 +39,14 @@ gvm/protocols/gmp/requests/next/_credential_stores.py,sha256=wgixeHhls_Nvd7lYPE3
|
|
|
39
39
|
gvm/protocols/gmp/requests/next/_credentials.py,sha256=9iI2F4rp6TtQdM-OXS9IKN09SZRRLxYeBMcZs-Heo1Q,6107
|
|
40
40
|
gvm/protocols/gmp/requests/next/_integration_configs.py,sha256=j9RospMEU9ErjUzRNHv9tvv0_yRSwMfJdOKNUmJC4rk,3715
|
|
41
41
|
gvm/protocols/gmp/requests/next/_oci_image_targets.py,sha256=rN2kzbJloFDxZsWsfNz2eJDlCZs33kHktPRA9weNLWM,5830
|
|
42
|
+
gvm/protocols/gmp/requests/next/_report_applications.py,sha256=EVqMMb1u-uQatywFuXqux_kIOaxBTb5rh9dHl0jip0M,1537
|
|
43
|
+
gvm/protocols/gmp/requests/next/_report_closed_cves.py,sha256=2j2ZFScgQughuGmbW5eaagdgPlOnYr38JnQ3ruEpLUQ,1244
|
|
44
|
+
gvm/protocols/gmp/requests/next/_report_cves.py,sha256=VZa25Tkiabg19tNkxVsxz1_oDz2ERGyL5LCQwuHtY_Y,1471
|
|
45
|
+
gvm/protocols/gmp/requests/next/_report_errors.py,sha256=tB3zvDSaV0e3HjteK__oOFQwce5Tjbv5KQgM4eBEbJk,1483
|
|
46
|
+
gvm/protocols/gmp/requests/next/_report_hosts.py,sha256=uAt9MvfLZoIqZ0VWKpWSOrsQW2cxsKZkSYo7C_0JIU0,1477
|
|
47
|
+
gvm/protocols/gmp/requests/next/_report_operating_systems.py,sha256=qN6-94OYKXGQQZ4q7RuRLtoaBduT500ocYb_-mIW5E0,1566
|
|
48
|
+
gvm/protocols/gmp/requests/next/_report_ports.py,sha256=xTzdBFKqYHv1ulH1BduWEE-wO3SzuMu0yU7pnB5jx5E,1477
|
|
49
|
+
gvm/protocols/gmp/requests/next/_report_tls_certificates.py,sha256=-h1d3OVn873DLEHHvjeLVpOpvErJo5C3u5tyxIrXUI8,1559
|
|
42
50
|
gvm/protocols/gmp/requests/next/_tasks.py,sha256=pVCIWtQ3n15Dt8zdfKbxPxfAnzgefTsb1WHKYzMmLgI,22439
|
|
43
51
|
gvm/protocols/gmp/requests/v224/__init__.py,sha256=BX8_kYVADzgpmMfl4ABMtb8JAPUaCtREj7kQebGgSvY,3094
|
|
44
52
|
gvm/protocols/gmp/requests/v224/_aggregates.py,sha256=G5zO5h6ca7dHIyKp91yZyV6WYK4Lv6W8HJm7myrz_kM,7702
|
|
@@ -102,7 +110,7 @@ gvm/protocols/http/openvasd/_notus.py,sha256=FwX5fFsx-FWXf4Rl_5seequkQ6XVS8jZ0NW
|
|
|
102
110
|
gvm/protocols/http/openvasd/_openvasd1.py,sha256=YhV-OJULO4XJJQTsvAyH1ZVc5r1mRmGk2VMotvOoIxg,3896
|
|
103
111
|
gvm/protocols/http/openvasd/_scans.py,sha256=U8aYmHudMQFtVzl9khjNsRRewY0sf8G376zTYZN6HQQ,16667
|
|
104
112
|
gvm/protocols/http/openvasd/_vts.py,sha256=_T4j4SdXe0DthBA7pCehx4FXKYbQyhzpq72YNO4fKt4,2136
|
|
105
|
-
python_gvm-27.0.
|
|
106
|
-
python_gvm-27.0.
|
|
107
|
-
python_gvm-27.0.
|
|
108
|
-
python_gvm-27.0.
|
|
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,,
|
|
File without changes
|
|
File without changes
|