python-gvm 27.0.2__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 +1 -1
- gvm/protocols/gmp/_gmpnext.py +273 -0
- gvm/protocols/gmp/requests/next/__init__.py +36 -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
- gvm/protocols/gmp/requests/next/_report_vulnerabilities.py +47 -0
- {python_gvm-27.0.2.dist-info → python_gvm-27.2.0.dist-info}/METADATA +1 -1
- {python_gvm-27.0.2.dist-info → python_gvm-27.2.0.dist-info}/RECORD +16 -7
- {python_gvm-27.0.2.dist-info → python_gvm-27.2.0.dist-info}/WHEEL +0 -0
- {python_gvm-27.0.2.dist-info → python_gvm-27.2.0.dist-info}/licenses/LICENSE +0 -0
gvm/__version__.py
CHANGED
gvm/protocols/gmp/_gmpnext.py
CHANGED
|
@@ -19,6 +19,15 @@ 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,
|
|
30
|
+
ReportVulnerabilities,
|
|
22
31
|
Tasks,
|
|
23
32
|
)
|
|
24
33
|
from .requests.v224 import HostsOrdering
|
|
@@ -992,3 +1001,267 @@ class GMPNext(GMPv227[T]):
|
|
|
992
1001
|
oidc_provider_client_secret=oidc_provider_client_secret,
|
|
993
1002
|
)
|
|
994
1003
|
)
|
|
1004
|
+
|
|
1005
|
+
def get_report_hosts(
|
|
1006
|
+
self,
|
|
1007
|
+
report_id: EntityID,
|
|
1008
|
+
*,
|
|
1009
|
+
filter_string: str | None = None,
|
|
1010
|
+
filter_id: str | None = None,
|
|
1011
|
+
ignore_pagination: bool | None = None,
|
|
1012
|
+
details: bool | None = True,
|
|
1013
|
+
) -> T:
|
|
1014
|
+
"""Request hosts of a single report.
|
|
1015
|
+
|
|
1016
|
+
Args:
|
|
1017
|
+
report_id: UUID of an existing report.
|
|
1018
|
+
filter_string: Filter term to use to filter results in the report
|
|
1019
|
+
filter_id: UUID of filter to use to filter results in the report
|
|
1020
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
1021
|
+
"rows".
|
|
1022
|
+
details: Request additional report host information details.
|
|
1023
|
+
Defaults to True.
|
|
1024
|
+
"""
|
|
1025
|
+
return self._send_request_and_transform_response(
|
|
1026
|
+
ReportHosts.get_report_hosts(
|
|
1027
|
+
report_id=report_id,
|
|
1028
|
+
filter_string=filter_string,
|
|
1029
|
+
filter_id=filter_id,
|
|
1030
|
+
ignore_pagination=ignore_pagination,
|
|
1031
|
+
details=details,
|
|
1032
|
+
)
|
|
1033
|
+
)
|
|
1034
|
+
|
|
1035
|
+
def get_report_operating_systems(
|
|
1036
|
+
self,
|
|
1037
|
+
report_id: EntityID,
|
|
1038
|
+
*,
|
|
1039
|
+
filter_string: str | None = None,
|
|
1040
|
+
filter_id: str | None = None,
|
|
1041
|
+
ignore_pagination: bool | None = None,
|
|
1042
|
+
details: bool | None = True,
|
|
1043
|
+
) -> T:
|
|
1044
|
+
"""Request operating systems of a single report.
|
|
1045
|
+
|
|
1046
|
+
Args:
|
|
1047
|
+
report_id: UUID of an existing report.
|
|
1048
|
+
filter_string: Filter term to use to filter results in the report
|
|
1049
|
+
filter_id: UUID of filter to use to filter results in the report
|
|
1050
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
1051
|
+
"rows".
|
|
1052
|
+
details: Request additional report operating system information details.
|
|
1053
|
+
Defaults to True.
|
|
1054
|
+
"""
|
|
1055
|
+
return self._send_request_and_transform_response(
|
|
1056
|
+
ReportOperatingSystems.get_report_operating_systems(
|
|
1057
|
+
report_id=report_id,
|
|
1058
|
+
filter_string=filter_string,
|
|
1059
|
+
filter_id=filter_id,
|
|
1060
|
+
ignore_pagination=ignore_pagination,
|
|
1061
|
+
details=details,
|
|
1062
|
+
)
|
|
1063
|
+
)
|
|
1064
|
+
|
|
1065
|
+
def get_report_ports(
|
|
1066
|
+
self,
|
|
1067
|
+
report_id: EntityID,
|
|
1068
|
+
*,
|
|
1069
|
+
filter_string: str | None = None,
|
|
1070
|
+
filter_id: str | None = None,
|
|
1071
|
+
ignore_pagination: bool | None = None,
|
|
1072
|
+
details: bool | None = True,
|
|
1073
|
+
) -> T:
|
|
1074
|
+
"""Request ports of a single report.
|
|
1075
|
+
|
|
1076
|
+
Args:
|
|
1077
|
+
report_id: UUID of an existing report.
|
|
1078
|
+
filter_string: Filter term to use to filter results in the report
|
|
1079
|
+
filter_id: UUID of filter to use to filter results in the report
|
|
1080
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
1081
|
+
"rows".
|
|
1082
|
+
details: Request additional report port information details.
|
|
1083
|
+
Defaults to True.
|
|
1084
|
+
"""
|
|
1085
|
+
return self._send_request_and_transform_response(
|
|
1086
|
+
ReportPorts.get_report_ports(
|
|
1087
|
+
report_id=report_id,
|
|
1088
|
+
filter_string=filter_string,
|
|
1089
|
+
filter_id=filter_id,
|
|
1090
|
+
ignore_pagination=ignore_pagination,
|
|
1091
|
+
details=details,
|
|
1092
|
+
)
|
|
1093
|
+
)
|
|
1094
|
+
|
|
1095
|
+
def get_report_tls_certificates(
|
|
1096
|
+
self,
|
|
1097
|
+
report_id: EntityID,
|
|
1098
|
+
*,
|
|
1099
|
+
filter_string: str | None = None,
|
|
1100
|
+
filter_id: str | None = None,
|
|
1101
|
+
ignore_pagination: bool | None = None,
|
|
1102
|
+
details: bool | None = True,
|
|
1103
|
+
) -> T:
|
|
1104
|
+
"""Request TLS certificates of a single report.
|
|
1105
|
+
|
|
1106
|
+
Args:
|
|
1107
|
+
report_id: UUID of an existing report.
|
|
1108
|
+
filter_string: Filter term to use to filter results in the report
|
|
1109
|
+
filter_id: UUID of filter to use to filter results in the report
|
|
1110
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
1111
|
+
"rows".
|
|
1112
|
+
details: Request additional report TLS certificate information details.
|
|
1113
|
+
Defaults to True.
|
|
1114
|
+
"""
|
|
1115
|
+
return self._send_request_and_transform_response(
|
|
1116
|
+
ReportTlsCertificates.get_report_tls_certificates(
|
|
1117
|
+
report_id=report_id,
|
|
1118
|
+
filter_string=filter_string,
|
|
1119
|
+
filter_id=filter_id,
|
|
1120
|
+
ignore_pagination=ignore_pagination,
|
|
1121
|
+
details=details,
|
|
1122
|
+
)
|
|
1123
|
+
)
|
|
1124
|
+
|
|
1125
|
+
def get_report_applications(
|
|
1126
|
+
self,
|
|
1127
|
+
report_id: EntityID,
|
|
1128
|
+
*,
|
|
1129
|
+
filter_string: str | None = None,
|
|
1130
|
+
filter_id: str | None = None,
|
|
1131
|
+
ignore_pagination: bool | None = None,
|
|
1132
|
+
details: bool | None = True,
|
|
1133
|
+
) -> T:
|
|
1134
|
+
"""Request applications of a single report.
|
|
1135
|
+
|
|
1136
|
+
Args:
|
|
1137
|
+
report_id: UUID of an existing report.
|
|
1138
|
+
filter_string: Filter term to use to filter results in the report
|
|
1139
|
+
filter_id: UUID of filter to use to filter results in the report
|
|
1140
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
1141
|
+
"rows".
|
|
1142
|
+
details: Request additional report application information details.
|
|
1143
|
+
Defaults to True.
|
|
1144
|
+
"""
|
|
1145
|
+
return self._send_request_and_transform_response(
|
|
1146
|
+
ReportApplications.get_report_applications(
|
|
1147
|
+
report_id=report_id,
|
|
1148
|
+
filter_string=filter_string,
|
|
1149
|
+
filter_id=filter_id,
|
|
1150
|
+
ignore_pagination=ignore_pagination,
|
|
1151
|
+
details=details,
|
|
1152
|
+
)
|
|
1153
|
+
)
|
|
1154
|
+
|
|
1155
|
+
def get_report_cves(
|
|
1156
|
+
self,
|
|
1157
|
+
report_id: EntityID,
|
|
1158
|
+
*,
|
|
1159
|
+
filter_string: str | None = None,
|
|
1160
|
+
filter_id: str | None = None,
|
|
1161
|
+
ignore_pagination: bool | None = None,
|
|
1162
|
+
details: bool | None = True,
|
|
1163
|
+
) -> T:
|
|
1164
|
+
"""Request CVEs of a single report.
|
|
1165
|
+
|
|
1166
|
+
Args:
|
|
1167
|
+
report_id: UUID of an existing report.
|
|
1168
|
+
filter_string: Filter term to use to filter results in the report
|
|
1169
|
+
filter_id: UUID of filter to use to filter results in the report
|
|
1170
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
1171
|
+
"rows".
|
|
1172
|
+
details: Request additional report CVE information details.
|
|
1173
|
+
Defaults to True.
|
|
1174
|
+
"""
|
|
1175
|
+
return self._send_request_and_transform_response(
|
|
1176
|
+
ReportCVEs.get_report_cves(
|
|
1177
|
+
report_id=report_id,
|
|
1178
|
+
filter_string=filter_string,
|
|
1179
|
+
filter_id=filter_id,
|
|
1180
|
+
ignore_pagination=ignore_pagination,
|
|
1181
|
+
details=details,
|
|
1182
|
+
)
|
|
1183
|
+
)
|
|
1184
|
+
|
|
1185
|
+
def get_report_closed_cves(
|
|
1186
|
+
self,
|
|
1187
|
+
report_id: EntityID,
|
|
1188
|
+
*,
|
|
1189
|
+
ignore_pagination: bool | None = None,
|
|
1190
|
+
details: bool | None = True,
|
|
1191
|
+
) -> T:
|
|
1192
|
+
"""Request closed CVEs of a single report.
|
|
1193
|
+
|
|
1194
|
+
Args:
|
|
1195
|
+
report_id: UUID of an existing report.
|
|
1196
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
1197
|
+
"rows".
|
|
1198
|
+
details: Request additional report closed CVE information details.
|
|
1199
|
+
Defaults to True.
|
|
1200
|
+
"""
|
|
1201
|
+
return self._send_request_and_transform_response(
|
|
1202
|
+
ReportClosedCVEs.get_report_closed_cves(
|
|
1203
|
+
report_id=report_id,
|
|
1204
|
+
ignore_pagination=ignore_pagination,
|
|
1205
|
+
details=details,
|
|
1206
|
+
)
|
|
1207
|
+
)
|
|
1208
|
+
|
|
1209
|
+
def get_report_errors(
|
|
1210
|
+
self,
|
|
1211
|
+
report_id: EntityID,
|
|
1212
|
+
*,
|
|
1213
|
+
filter_string: str | None = None,
|
|
1214
|
+
filter_id: str | None = None,
|
|
1215
|
+
ignore_pagination: bool | None = None,
|
|
1216
|
+
details: bool | None = True,
|
|
1217
|
+
) -> T:
|
|
1218
|
+
"""Request errors of a single report.
|
|
1219
|
+
|
|
1220
|
+
Args:
|
|
1221
|
+
report_id: UUID of an existing report.
|
|
1222
|
+
filter_string: Filter term to use to filter results in the report
|
|
1223
|
+
filter_id: UUID of filter to use to filter results in the report
|
|
1224
|
+
ignore_pagination: Whether to ignore the filter terms "first" and
|
|
1225
|
+
"rows".
|
|
1226
|
+
details: Request additional report error information details.
|
|
1227
|
+
Defaults to True.
|
|
1228
|
+
"""
|
|
1229
|
+
return self._send_request_and_transform_response(
|
|
1230
|
+
ReportErrors.get_report_errors(
|
|
1231
|
+
report_id=report_id,
|
|
1232
|
+
filter_string=filter_string,
|
|
1233
|
+
filter_id=filter_id,
|
|
1234
|
+
ignore_pagination=ignore_pagination,
|
|
1235
|
+
details=details,
|
|
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
|
+
)
|
|
@@ -14,6 +14,33 @@ 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
|
+
)
|
|
41
|
+
from gvm.protocols.gmp.requests.next._report_vulnerabilities import (
|
|
42
|
+
ReportVulnerabilities,
|
|
43
|
+
)
|
|
17
44
|
from gvm.protocols.gmp.requests.next._tasks import Tasks
|
|
18
45
|
|
|
19
46
|
from .._entity_id import EntityID
|
|
@@ -132,10 +159,19 @@ __all__ = (
|
|
|
132
159
|
"Policies",
|
|
133
160
|
"PortLists",
|
|
134
161
|
"PortRangeType",
|
|
162
|
+
"ReportApplications",
|
|
163
|
+
"ReportCVEs",
|
|
164
|
+
"ReportClosedCVEs",
|
|
135
165
|
"ReportConfigParameter",
|
|
136
166
|
"ReportConfigs",
|
|
167
|
+
"ReportErrors",
|
|
137
168
|
"ReportFormatType",
|
|
138
169
|
"ReportFormats",
|
|
170
|
+
"ReportHosts",
|
|
171
|
+
"ReportOperatingSystems",
|
|
172
|
+
"ReportPorts",
|
|
173
|
+
"ReportTlsCertificates",
|
|
174
|
+
"ReportVulnerabilities",
|
|
139
175
|
"Reports",
|
|
140
176
|
"ResourceNames",
|
|
141
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 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
|
|
@@ -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.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=
|
|
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=
|
|
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=
|
|
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
|
|
@@ -39,6 +39,15 @@ 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
|
|
50
|
+
gvm/protocols/gmp/requests/next/_report_vulnerabilities.py,sha256=8TOQm-CyaHtTOL1dXDUrFYEzuohdeSs_TeonCeVJJzg,1543
|
|
42
51
|
gvm/protocols/gmp/requests/next/_tasks.py,sha256=pVCIWtQ3n15Dt8zdfKbxPxfAnzgefTsb1WHKYzMmLgI,22439
|
|
43
52
|
gvm/protocols/gmp/requests/v224/__init__.py,sha256=BX8_kYVADzgpmMfl4ABMtb8JAPUaCtREj7kQebGgSvY,3094
|
|
44
53
|
gvm/protocols/gmp/requests/v224/_aggregates.py,sha256=G5zO5h6ca7dHIyKp91yZyV6WYK4Lv6W8HJm7myrz_kM,7702
|
|
@@ -102,7 +111,7 @@ gvm/protocols/http/openvasd/_notus.py,sha256=FwX5fFsx-FWXf4Rl_5seequkQ6XVS8jZ0NW
|
|
|
102
111
|
gvm/protocols/http/openvasd/_openvasd1.py,sha256=YhV-OJULO4XJJQTsvAyH1ZVc5r1mRmGk2VMotvOoIxg,3896
|
|
103
112
|
gvm/protocols/http/openvasd/_scans.py,sha256=U8aYmHudMQFtVzl9khjNsRRewY0sf8G376zTYZN6HQQ,16667
|
|
104
113
|
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.
|
|
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,,
|
|
File without changes
|
|
File without changes
|