python-gvm 27.4.0__py3-none-any.whl → 27.6.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.4.0"
5
+ __version__ = "27.6.0"
@@ -16,6 +16,7 @@ from .requests.next import (
16
16
  AgentInstallerInstructions,
17
17
  Agents,
18
18
  AliveTest,
19
+ AuditReport,
19
20
  Credentials,
20
21
  CredentialStoreCredentialType,
21
22
  CredentialStores,
@@ -30,12 +31,14 @@ from .requests.next import (
30
31
  ReportPorts,
31
32
  ReportTlsCertificates,
32
33
  ReportVulnerabilities,
34
+ ScanReports,
33
35
  Targets,
34
36
  Tasks,
35
37
  WebApplicationTargets,
36
38
  )
37
39
  from .requests.v224 import AliveTest as AliveTestV224
38
40
  from .requests.v224 import HostsOrdering
41
+ from .requests.v226 import ReportFormatType
39
42
 
40
43
 
41
44
  class GMPNext(GMPv227[T]):
@@ -306,6 +309,29 @@ class GMPNext(GMPv227[T]):
306
309
  """Trigger agents synchronization from all agent controllers."""
307
310
  return self._send_request_and_transform_response(Agents.sync_agents())
308
311
 
312
+ def get_agent_support_bundle(
313
+ self,
314
+ agent_id: EntityID,
315
+ days: int = 0,
316
+ ) -> T:
317
+ """Request a support bundle for an agent.
318
+
319
+ Args:
320
+ agent_id: ID of the agent to get the support bundle for.
321
+ days: Number of days of logs to include. If None, zero is sent so the
322
+ Agent Controller uses its configured default.
323
+
324
+ Raises:
325
+ RequiredArgument: If agent_id is missing.
326
+ ValueError: If days is negative.
327
+ """
328
+ return self._send_request_and_transform_response(
329
+ Agents.get_agent_support_bundle(
330
+ agent_id,
331
+ days=days,
332
+ )
333
+ )
334
+
309
335
  def create_credential_store_credential(
310
336
  self,
311
337
  name: str,
@@ -1066,6 +1092,36 @@ class GMPNext(GMPv227[T]):
1066
1092
  )
1067
1093
  )
1068
1094
 
1095
+ def get_audit_report_hosts(
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 hosts of a single audit 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 host information details.
1113
+ Defaults to True.
1114
+ """
1115
+ return self._send_request_and_transform_response(
1116
+ ReportHosts.get_audit_report_hosts(
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
+
1069
1125
  def get_report_operating_systems(
1070
1126
  self,
1071
1127
  report_id: EntityID,
@@ -1619,3 +1675,86 @@ class GMPNext(GMPv227[T]):
1619
1675
  tasks=tasks,
1620
1676
  )
1621
1677
  )
1678
+
1679
+ def get_scan_report(
1680
+ self,
1681
+ scan_report_id: EntityID,
1682
+ *,
1683
+ filter_string: str | None = None,
1684
+ filter_id: str | None = None,
1685
+ ) -> T:
1686
+ """ "Request a structured summary of a single scan report.
1687
+
1688
+ Args:
1689
+ scan_report_id: UUID of an existing scan report.
1690
+ filter_string: Filter term to apply to the report results.
1691
+ filter_id: UUID of a saved filter to apply to the report results.
1692
+
1693
+ Returns:
1694
+ A request for the get_scan_report GMP command.
1695
+
1696
+ Raises:
1697
+ RequiredArgument: If scan_report_id is not provided.
1698
+ """
1699
+ return self._send_request_and_transform_response(
1700
+ ScanReports.get_scan_report(
1701
+ scan_report_id=scan_report_id,
1702
+ filter_string=filter_string,
1703
+ filter_id=filter_id,
1704
+ )
1705
+ )
1706
+
1707
+ def get_audit_report( # type: ignore[override]
1708
+ self,
1709
+ audit_report_id: EntityID,
1710
+ *,
1711
+ filter_string: str | None = None,
1712
+ filter_id: str | None = None,
1713
+ ) -> T:
1714
+ """Request a structured summary of a single audit report.
1715
+
1716
+ Args:
1717
+ audit_report_id: UUID of an existing audit report.
1718
+ filter_string: Filter term to apply to the report results.
1719
+ filter_id: UUID of a saved filter to apply to the report results.
1720
+
1721
+ Returns:
1722
+ A request for the get_audit_report GMP command.
1723
+
1724
+ Raises:
1725
+ RequiredArgument: If audit_report_id is not provided.
1726
+ """
1727
+ return self._send_request_and_transform_response(
1728
+ AuditReport.get_audit_report(
1729
+ audit_report_id=audit_report_id,
1730
+ filter_string=filter_string,
1731
+ filter_id=filter_id,
1732
+ )
1733
+ )
1734
+
1735
+ def get_audit_report_legacy(
1736
+ self,
1737
+ report_id: EntityID,
1738
+ *,
1739
+ filter_string: str | None = None,
1740
+ filter_id: str | None = None,
1741
+ delta_report_id: EntityID | None = None,
1742
+ report_format_id: str | ReportFormatType | None = None,
1743
+ ignore_pagination: bool | None = None,
1744
+ details: bool | None = True,
1745
+ ) -> T:
1746
+ """Request an audit report using the legacy command.
1747
+
1748
+ Deprecated:
1749
+ Use ``get_audit_report`` instead. This method will be removed
1750
+ in the next major release.
1751
+ """
1752
+ return super().get_audit_report(
1753
+ report_id,
1754
+ filter_string=filter_string,
1755
+ filter_id=filter_id,
1756
+ delta_report_id=delta_report_id,
1757
+ report_format_id=report_format_id,
1758
+ ignore_pagination=ignore_pagination,
1759
+ details=details,
1760
+ )
@@ -8,6 +8,7 @@ from gvm.protocols.gmp.requests.next._agent_installer_instructions import (
8
8
  AgentInstallerInstructions,
9
9
  )
10
10
  from gvm.protocols.gmp.requests.next._agents import Agents
11
+ from gvm.protocols.gmp.requests.next._audit_report import AuditReport
11
12
  from gvm.protocols.gmp.requests.next._credential_stores import CredentialStores
12
13
  from gvm.protocols.gmp.requests.next._credentials import (
13
14
  Credentials,
@@ -44,6 +45,7 @@ from gvm.protocols.gmp.requests.next._report_tls_certificates import (
44
45
  from gvm.protocols.gmp.requests.next._report_vulnerabilities import (
45
46
  ReportVulnerabilities,
46
47
  )
48
+ from gvm.protocols.gmp.requests.next._scan_report import ScanReports
47
49
  from gvm.protocols.gmp.requests.next._targets import AliveTest, Targets
48
50
  from gvm.protocols.gmp.requests.next._tasks import Tasks
49
51
  from gvm.protocols.gmp.requests.next._web_application_targets import (
@@ -130,6 +132,7 @@ __all__ = (
130
132
  "AlertMethod",
131
133
  "Alerts",
132
134
  "AliveTest",
135
+ "AuditReport",
133
136
  "AuditReports",
134
137
  "Audits",
135
138
  "Authentication",
@@ -184,6 +187,7 @@ __all__ = (
184
187
  "Results",
185
188
  "Roles",
186
189
  "ScanConfigs",
190
+ "ScanReports",
187
191
  "ScannerType",
188
192
  "Scanners",
189
193
  "Schedules",
@@ -431,3 +431,36 @@ class Agents:
431
431
  def sync_agents(cls) -> Request:
432
432
  """Trigger agents synchronization from all agent controllers."""
433
433
  return XmlCommand("sync_agents")
434
+
435
+ @classmethod
436
+ def get_agent_support_bundle(
437
+ cls,
438
+ agent_id: EntityID,
439
+ *,
440
+ days: int = 0,
441
+ ) -> Request:
442
+ """Request a support bundle for an agent.
443
+
444
+ Args:
445
+ agent_id: ID of the agent to get the support bundle for.
446
+ days: Number of days of logs to include. If None, zero is sent so the
447
+ Agent Controller uses its configured default.
448
+
449
+ Raises:
450
+ RequiredArgument: If agent_id is missing.
451
+ ValueError: If days is negative.
452
+ """
453
+ if not agent_id:
454
+ raise RequiredArgument(
455
+ function=cls.get_agent_support_bundle.__name__,
456
+ argument="agent_id",
457
+ )
458
+
459
+ if days < 0:
460
+ raise ValueError("days must be greater than or equal to zero")
461
+
462
+ cmd = XmlCommand("get_agent_support_bundle")
463
+ cmd.set_attribute("agent_uuid", str(agent_id))
464
+ cmd.set_attribute("days", str(days))
465
+
466
+ return cmd
@@ -0,0 +1,39 @@
1
+ from gvm.errors import RequiredArgument
2
+ from gvm.protocols.core import Request
3
+ from gvm.protocols.gmp.requests import EntityID
4
+ from gvm.xml import XmlCommand
5
+
6
+
7
+ class AuditReport:
8
+ @classmethod
9
+ def get_audit_report(
10
+ cls,
11
+ audit_report_id: EntityID,
12
+ *,
13
+ filter_string: str | None = None,
14
+ filter_id: str | None = None,
15
+ ) -> Request:
16
+ """Request a structured summary of a single audit report.
17
+
18
+ Args:
19
+ audit_report_id: UUID of an existing audit report.
20
+ filter_string: Filter term to apply to the report results.
21
+ filter_id: UUID of a saved filter to apply to the report results.
22
+
23
+ Returns:
24
+ A request for the get_audit_report GMP command.
25
+
26
+ Raises:
27
+ RequiredArgument: If audit_report_id is not provided.
28
+ """
29
+ if not audit_report_id:
30
+ raise RequiredArgument(
31
+ function=cls.get_audit_report.__name__,
32
+ argument="audit_report_id",
33
+ )
34
+
35
+ cmd = XmlCommand("get_audit_report")
36
+ cmd.set_attribute("audit_report_id", str(audit_report_id))
37
+ cmd.add_filter(filter_string, filter_id)
38
+
39
+ return cmd
@@ -44,3 +44,42 @@ class ReportHosts:
44
44
  cmd.set_attribute("details", to_bool(details))
45
45
 
46
46
  return cmd
47
+
48
+ @classmethod
49
+ def get_audit_report_hosts(
50
+ cls,
51
+ report_id: EntityID,
52
+ *,
53
+ filter_string: str | None = None,
54
+ filter_id: str | None = None,
55
+ ignore_pagination: bool | None = None,
56
+ details: bool | None = True,
57
+ ) -> Request:
58
+ """Request hosts of a single audit report.
59
+
60
+ Args:
61
+ report_id: UUID of an existing report.
62
+ filter_string: Filter term to use to filter results in the report
63
+ filter_id: UUID of filter to use to filter results in the report
64
+ ignore_pagination: Whether to ignore the filter terms "first" and
65
+ "rows".
66
+ details: Request additional report host information details.
67
+ Defaults to True.
68
+ """
69
+ cmd = XmlCommand("get_audit_report_hosts")
70
+
71
+ if not report_id:
72
+ raise RequiredArgument(
73
+ function=cls.get_report_hosts.__name__, argument="report_id"
74
+ )
75
+
76
+ cmd.set_attribute("report_id", str(report_id))
77
+
78
+ cmd.add_filter(filter_string, filter_id)
79
+
80
+ if ignore_pagination is not None:
81
+ cmd.set_attribute("ignore_pagination", to_bool(ignore_pagination))
82
+
83
+ cmd.set_attribute("details", to_bool(details))
84
+
85
+ return cmd
@@ -0,0 +1,39 @@
1
+ from gvm.errors import RequiredArgument
2
+ from gvm.protocols.core import Request
3
+ from gvm.protocols.gmp.requests import EntityID
4
+ from gvm.xml import XmlCommand
5
+
6
+
7
+ class ScanReports:
8
+ @classmethod
9
+ def get_scan_report(
10
+ cls,
11
+ scan_report_id: EntityID,
12
+ *,
13
+ filter_string: str | None = None,
14
+ filter_id: str | None = None,
15
+ ) -> Request:
16
+ """Request a structured summary of a single scan report.
17
+
18
+ Args:
19
+ scan_report_id: UUID of an existing scan report.
20
+ filter_string: Filter term to apply to the report results.
21
+ filter_id: UUID of a saved filter to apply to the report results.
22
+
23
+ Returns:
24
+ A request for the get_scan_report GMP command.
25
+
26
+ Raises:
27
+ RequiredArgument: If scan_report_id is not provided.
28
+ """
29
+ if not scan_report_id:
30
+ raise RequiredArgument(
31
+ function=cls.get_scan_report.__name__,
32
+ argument="scan_report_id",
33
+ )
34
+
35
+ cmd = XmlCommand("get_scan_report")
36
+ cmd.set_attribute("scan_report_id", str(scan_report_id))
37
+ cmd.add_filter(filter_string, filter_id)
38
+
39
+ return cmd
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-gvm
3
- Version: 27.4.0
3
+ Version: 27.6.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/
@@ -25,7 +25,7 @@ Requires-Dist: lxml>=4.5.0
25
25
  Requires-Dist: paramiko>=2.7.1
26
26
  Description-Content-Type: text/markdown
27
27
 
28
- ![Greenbone Logo](https://www.greenbone.net/wp-content/uploads/gb_new-logo_horizontal_rgb_small.png)
28
+ ![Greenbone Logo](https://www.greenbone.net/wp-content/uploads/greenbone-logo-2025.png)
29
29
 
30
30
  # Greenbone Vulnerability Management Python Library <!-- omit in toc -->
31
31
 
@@ -1,5 +1,5 @@
1
1
  gvm/__init__.py,sha256=Eu3a8hRdlixDFn34Q-BwPXVN65KHpgFk_i0CYUdbfF8,412
2
- gvm/__version__.py,sha256=VZj5wzvpAt0792r36uKsG9me961dIWp4WNe2d3IHyF4,103
2
+ gvm/__version__.py,sha256=zkjBBcTOU9y-yAfS_zLUFOIEAx1x2CfkLUnZBfV1ByQ,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,14 +27,15 @@ 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=wIbgFQoFa9SxftUVTPK8BUziw_1qSGaF3M51HeWgd5o,57945
30
+ gvm/protocols/gmp/_gmpnext.py,sha256=0_-sE2uyu6ctUQPneyMPoaMZ5jPgZJxChbZVQN4dpTw,62532
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=KXolfKC-eX2DyPvSEYgLT6FSXtrkUyx5v_zAs7gFMBs,4645
34
+ gvm/protocols/gmp/requests/next/__init__.py,sha256=o_LZf7Rd4kY5OMwIo39S4btQfi8Z9rN39L09QXnVfG0,4822
35
35
  gvm/protocols/gmp/requests/next/_agent_groups.py,sha256=Dqa77vY2U82lG6wkLZfGMIUOHfZW9yCXkFvT3M8bFfo,6275
36
36
  gvm/protocols/gmp/requests/next/_agent_installer_instructions.py,sha256=wh4LBJVEE3t_Og9uf5Ek_y8MxjtnTcBa2IT4u4JVXg0,1798
37
- gvm/protocols/gmp/requests/next/_agents.py,sha256=6LIr3xG1YHsQeQucg01nmjm3JguvObluIkn0t_KNnAU,14591
37
+ gvm/protocols/gmp/requests/next/_agents.py,sha256=j4UNQmfeH8ToFfA8T4JiPKb4ZGpQy71DL--sbaVXttM,15589
38
+ gvm/protocols/gmp/requests/next/_audit_report.py,sha256=ssCzIQXSRFFjLAYGtlJoMDZSPAF9q_JLJs1IBsxHZ2c,1209
38
39
  gvm/protocols/gmp/requests/next/_credential_stores.py,sha256=wgixeHhls_Nvd7lYPE3mra_2vtWFZscm8HCwy4UgUNg,5691
39
40
  gvm/protocols/gmp/requests/next/_credentials.py,sha256=9iI2F4rp6TtQdM-OXS9IKN09SZRRLxYeBMcZs-Heo1Q,6107
40
41
  gvm/protocols/gmp/requests/next/_integration_configs.py,sha256=j9RospMEU9ErjUzRNHv9tvv0_yRSwMfJdOKNUmJC4rk,3715
@@ -43,11 +44,12 @@ gvm/protocols/gmp/requests/next/_report_applications.py,sha256=EVqMMb1u-uQatywFu
43
44
  gvm/protocols/gmp/requests/next/_report_closed_cves.py,sha256=2j2ZFScgQughuGmbW5eaagdgPlOnYr38JnQ3ruEpLUQ,1244
44
45
  gvm/protocols/gmp/requests/next/_report_cves.py,sha256=VZa25Tkiabg19tNkxVsxz1_oDz2ERGyL5LCQwuHtY_Y,1471
45
46
  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_hosts.py,sha256=qYyPwr4QBuC8CYt_COaZYDNIFyT74rPX9Ik6DjG-Owg,2764
47
48
  gvm/protocols/gmp/requests/next/_report_operating_systems.py,sha256=qN6-94OYKXGQQZ4q7RuRLtoaBduT500ocYb_-mIW5E0,1566
48
49
  gvm/protocols/gmp/requests/next/_report_ports.py,sha256=xTzdBFKqYHv1ulH1BduWEE-wO3SzuMu0yU7pnB5jx5E,1477
49
50
  gvm/protocols/gmp/requests/next/_report_tls_certificates.py,sha256=-h1d3OVn873DLEHHvjeLVpOpvErJo5C3u5tyxIrXUI8,1559
50
51
  gvm/protocols/gmp/requests/next/_report_vulnerabilities.py,sha256=8TOQm-CyaHtTOL1dXDUrFYEzuohdeSs_TeonCeVJJzg,1543
52
+ gvm/protocols/gmp/requests/next/_scan_report.py,sha256=V31NDmrHusVgGCN3OJ7rVUvb8T5l4PUTBd9VQoJDzSE,1196
51
53
  gvm/protocols/gmp/requests/next/_targets.py,sha256=EIiYyPNrzflxjr3pmY0ZT25KSHn-ISERD3IfrzVauZI,12707
52
54
  gvm/protocols/gmp/requests/next/_tasks.py,sha256=4faG2a3wey9-fj-el4TiAwBUbu4H8M7EZ9WyO3SJ0QM,27016
53
55
  gvm/protocols/gmp/requests/next/_web_application_targets.py,sha256=03EYFVXKmVf0ZS_CTaXGsD-ALclSu9Hc2hm6p0LLV8o,6563
@@ -113,7 +115,7 @@ gvm/protocols/http/openvasd/_notus.py,sha256=FwX5fFsx-FWXf4Rl_5seequkQ6XVS8jZ0NW
113
115
  gvm/protocols/http/openvasd/_openvasd1.py,sha256=YhV-OJULO4XJJQTsvAyH1ZVc5r1mRmGk2VMotvOoIxg,3896
114
116
  gvm/protocols/http/openvasd/_scans.py,sha256=U8aYmHudMQFtVzl9khjNsRRewY0sf8G376zTYZN6HQQ,16667
115
117
  gvm/protocols/http/openvasd/_vts.py,sha256=_T4j4SdXe0DthBA7pCehx4FXKYbQyhzpq72YNO4fKt4,2136
116
- python_gvm-27.4.0.dist-info/METADATA,sha256=41bGzS_8lKwjTXcrkTeUvtEIIsIn3Gfkq6h50AaZbkI,5709
117
- python_gvm-27.4.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
118
- python_gvm-27.4.0.dist-info/licenses/LICENSE,sha256=WJ7YI-moTFb-uVrFjnzzhGJrnL9P2iqQe8NuED3hutI,35141
119
- python_gvm-27.4.0.dist-info/RECORD,,
118
+ python_gvm-27.6.0.dist-info/METADATA,sha256=s0Ez3Ltf4WZGKtH7SyYGaP9_cbXibtM9a_F2xLTWiXY,5696
119
+ python_gvm-27.6.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
120
+ python_gvm-27.6.0.dist-info/licenses/LICENSE,sha256=WJ7YI-moTFb-uVrFjnzzhGJrnL9P2iqQe8NuED3hutI,35141
121
+ python_gvm-27.6.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.30.1
2
+ Generator: hatchling 1.31.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any