All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Calendar Versioninghtml).
Add import_policy
API call #496
21.5.1 - 2021-06-01
- For SSH Connections: Reject unknown hosts, ask user if he wants to connect to unknown remote host and ask user if he wants to add the host to
known_hosts
#486
- Export
HelpFormat
andget_help_format_from_string()
#495
21.5.0 - 2021-05-25
Dropped support for GMP v7, v8 and v9!
- Introduced new explicit API calls for SecInfo:
get_nvt()
,get_nvt_list()
,get_cpe()
,get_cpe_list()
,get_cve()
,get_cve_list()
,get_cert_bund_advisory()
,get_cert_bund_advisory_list()
,get_dnf_cert_advisory()
,get_dnf_cert_advisory_list()
,get_oval_definition()
,get_oval_definition_list()
. #456
- Splitted up
get_preference(s)
intoget_nvt_preference(s)
andget_scan_config_preference(s)
. #473 - Improved and changed
help()
: IntroducedHelpFormat
Enum, changedformat
parameter tohelp_format
usingHelpFormat
, changedhelp_type
tobrief
and bool, as it only has two options (default and brief). #473 - Changed
filter
tofilter_string
in getter functions. #470 #471 #473 - API changes:
get_setting(s)
->get_user_setting(s)
,modify_setting
->modify_user_setting
. #472 - Changed all API calls for
_config
to_scan_config
to match other Greenbone components. #465 - Split up
get_asset(s)
intoget_host(s)
andget_operating_system(s)
. #459 - Split up
delete_asset
intodelete_host
anddelete_operating_system
. #459 - Split up
modify_asset
intomodify_host
andmodify_operating_system
. #459 - Deleted
AssetType
. It is not required anymore. #459 - Changed the API calls
get_nvt()
andget_nvts()
toget_scan_config_nvt()
andget_scan_config_nvts()
. #456 - Splitted up the GmpMonolith class:
- Detached the SystemReports API calls from the GMP class into a new
SystemReportsMixin
. #473 - Detached the Help API calls from the GMP class into a new
HelpMixin
. #473 - Detached the Trashcan API calls from the GMP class into a new
TrashcanMixin
. #472 - Detached the Authentication API calls from the GMP class into a new
AuthenticationMixin
. #472 - Detached the Version API calls from the GMP class into a new
VersionMixin
. #472 - Detached the Preferences API calls from the GMP class into a new
PreferencesMixin
. #471 - Detached the Settings API calls from the GMP class into a new
UserSettingsMixin
. #471 - Detached the Groups API calls from the GMP class into a new
GroupsMixin
. #471 - Detached the Vulnerabilities API calls from the GMP class into a new
VulnerabilitiesMixin
. #471 - Detached the ReportFormats API calls from the GMP class into a new
ReportFormatsMixin
. #470 - Detached the Roles API calls from the GMP class into a new
RolesMixin
. #470 - Detached the Tickets API calls from the GMP class into a new
TicketsMixin
. #470 - Detached the HostsOrdering Type from the GMP types class. #469
- Detached the TicketStatus Type from the GMP types class. #469
- Detached the Schedules API calls from the GMP class into a new
SchedulesMixin
. #469 - Detached the Filters API calls from the GMP class into a new
FiltersMixin
. #469 - Detached the Tags API calls from the GMP class into a new
TagsMixin
. #468 - Detached the Feeds API calls from the GMP class into a new
FeedMixin
. #468 #472 - Detached the Aggregates API calls from the GMP class into a new
AggregatesMixin
. #468 - Detached the EntityType from the GMP types class into a new
entites
file. #467 - Detached the Users API calls from the GMP class into a new
UsersMixin
. #467 - Detached the Permissions API calls from the GMP class into a new
PermissionsMixin
. #467 - Detached the Scanner API calls from the GMP class into a new
ScannersMixin
. #466 - Detached the Credential API calls from the GMP class into a new
CredentialsMixin
. #466 - Detached Config and Policy calls from GMP class into new
ScanConfigsMixin
andPoliciesMixin
. #465 - Detached the Audit API calls from the GMP class into a new
AuditsMixin
. #464 - Detached TLS-Certificates and assets into
TLSCertificatesMixin
,HostsMixin
andOperatingSystemsMixin
. #459 - Detached the Alerts API calls from the GMP class into a new
AlertsMixin
. #458 - Detached the Notes and Overrides API calls from the GMP class into a new
NotesMixin
andOverridesMixin
. #457 - Detached the
InfoType
from the GMP types class. #456 - Detached the SecInfo (CPE, CVE, NVT, CERT-BUND, DNF-CERT, OVAL Definitions) calls from GMP class into new
SecInfoMixin
. #456 - Detached the PortList and PortRange API calls from the GMP class into a new
PortListMixin
. #446 - Detached the Target API calls from the GMP class into a new
TargetsMixin
. #446 - Detached the
AliveTest
from the GMP types class. #446 - Detached the
PortListType
from the GMP types class. #446 - Detached the ReportFormatType from the GMP types class. #445
- Detached the Report API calls from the GMP class into a new
ReportMixin
. #445 - Detached the Task API calls from the GMP class into a new
TasksMixin
. #443
- Detached the SystemReports API calls from the GMP class into a new
- Moved helper functions from gmp to utils. The response XML will not be recovered by the parser anymore! #442
- Removed
sync_feed
,sync_scap
, andsync_cert
calls. #472 - Removed
TimeUnit
. It was used for schedules before iCal and is not required anymore. #469 - Removed
Gmpv214Mixin
. #467 - Remove support of delete host/operating system by a report . #459
- Remove deprecated
make_unique
parameter fromTargets
. #446 - Removed deprecated
Agents
completely. #441 - Dropped support for GMP v7, v8 and v9! The oldest usable GMP version is 20.8 #436 #437 #438 #439 #444
21.4.0 - 2021-04-26
get_feed
can also be requested withGVMD_DATA
for 20.08 and newer, addedGVMD_DATA
to the FeedType and updated API call #434
21.1.3 - 2021-01-27
- Added protocol version "next" and GMP 21.04 doc #384
- Add missing ReportFormatType to GMP 21.04 #385
21.1.2 - 2021-01-27
- Added allow_simultaneous_ips param for targets #380
- dropped the GMP Scanner (4) from
ScannerTypes
for v21.4 #383
- removing
timeout
fromget_nvt()
#376 - Add
ReportFormatType
andget_report_format_id_from_string
tolatest.py
, so it is usable withimport gvm.protcols.latest
#381 - Fixing
import_report()
for v9 and v20.8 and newer, removed thetask_name
andtask_comment
parameters, that do not work anymore #377
21.1.1 - 2021-01-05
- Fixed release issues, through rerelease.
21.1.0 - 2021-01-05
- CI tests Python 3.9 now. #367
- Dropped Python 3.5 and Python 3.6 support. Python 3.7+ is required now. #367
- Add missing types and functions to "latest" GMP #369
20.12.1 - 2020-12-16
- Added AUDIT and POLICY to EntityType enum #353
- Support "all" argument in modify_scan_config_set_family_selection #368
- added the
audits
parameter toget_policy
#345 - Update get_aggregates params in GMP 9.0 and newer #359
- added
get_info_list
to v20.08, so it works as expected with newInfoType
#362
20.11.3 - 2020-11-26
- Adding parameters to
get_nvt command
, so it requests all details #348 - Improved the
modify_user
function for gmpv7 and gmpv214. Added ability to change comment, groups and authentication method of user. Meaning of name parameter got changed for gmpv214 only. It is not intended for identifying a user anymore but for specifying the new name of the user #347 - Adding
resume_audit
,start_audit
,stop_audit
to gmpv9 #349
- Implement tuple for
family
argument formodify_config_set_family_selection
#354
- Added the
delete_tls_certificate
function #335 [20.11.2]: https://github.com/greenbone/python-gvm/compare/v20.11.1...HEAD
20.11.1 - 2020-11-16
- Added the
modify_audit
function #332 - Added the
modify_policy_set_nvt_preference
function #332 - Added the
modify_policy_set_name
function #332 - Added the
modify_policy_set_comment
function #332 - Added the
modify_policy_set_scanner_preference
function #332 - Added the
modify_policy_set_nvt_selection
function #332 - Added the
modify_policy_set_family_selection
function #332
- Moved tests for
SeverityLevel
Enum andget_severity_level_from_string()
#327 - In
get_report()
thedetails
parameter isTrue
on default now. #333
20.11.0 - 2020-11-03
- Added
clone_report_format()
andimport_report_format()
#309 - Added the
get_x_from_string()
functions tolatest
#308 - Added the
ReportFormatType
that can be used instead of a report_format_id #311 - Added tests for constructor of SSHConnection, TLSConnection, UnixSocketConnection and GvmConnection #321
- Corrected
seconds_active
parameter todays_active
for notes and overrides. #307 - Fixed SSHConnection throws TypeError if port is None #321
- Fixed GvmConnection timeout set to None if None is passed #321
- Fixed TLSConnection values set to None instead of default values when None is passed for these values #321
- Fixed UnixSocketConnection values set to None instead of default when None is passed for these values #321
20.9.1 - 2020-09-25
- Added
modify_config_set_name
. #295 - Added logic to accept the new AlertEvents
TICKET_RECEIVED
,ASSIGNED_TICKET_CHANGED
andOWNED_TICKET_CHANGED
and the new ConditionSEVERITY_CHANGED
. #297 - Added
create_config_from_osp_scanner
. #298
- Added the
details
parameter toget_tls_certificate
andget_tls_certificates
. #293 - Added the
comment
parameter tocreate_config
. #294
- Fix ScannerType check for newer protocols. #300
20.9.0 - 2020-09-17
- Added the
tasks
parameter toget_config()
. #289 - Renamed
no_details
todetails
inget_reports()
so it is uniform with all the other calls. #290
- Force garbage clean up when disconnect. #286
20.8.1 - 2020-09-01
- Added
AlertMethods
: Alemba vFire, Tippingpoint SMS #275 - Added
AlertConditions
: Error, SeverityChanged #275 - Added
AlertEvents
: Assigned ticket changed, Owned ticket changed, Ticket received #275
pretty_print()
has a new argument that can optionally handle a file. The output is redirected to this file. default issys.stdout
, as it is for build-inprint()
#277
ARP_PING
is now a field ofAliveTypes
, the oldAPR_PING
name is still available. #281modify_task
adds<alert id="0"/>
if alert_ids array is empty. #285
20.8.0 - 2020-08-19
- Added support for GMP 20.08 #254
- Refactored Gmp classes into mixins #254
- Require method and condition arguments for modify_alert with an event #267
- Add SEVERITY_AT_LEAST to get_alert_condition_from_string #268
1.6.0 - 2020-06-10
- Extend AliveTest and ScannerType enums. #235
- Fix python-gvm v8/v9 type checks. #244
1.5.0 - 2020-05-12
- Add full support for audits and policies. Add
get_policy
,get_policies
,clone_policy
,delete_policy
,get_audit
,get_audits
,clone_audit
anddelete_audit
methods to GMPv9 class. Also do not return policies for config requests and audits for task requests #223
- If it isn't possible to connect to a Unix Domain Socket a GvmError is raised now #207
- Dropped version handling code from python-gvm and replaced it with using pontos.version #213
- Added an API and CLI utilities for the version handling in python-gvm #198
- Replaced
pipenv
withpoetry
for dependency management.poetry install
works a bit different thenpipenv install
. It installs dev packages by default and also python-gvm in editable mode. This means after runningpoetry install
gvm will directly be importable in the virtual python environment. #197 - Update error classes to always have meaningful
__str__
and__repr__
method. This allows for easier error printing #199
- Added
GvmServerError
,GvmClientError
,GvmResponseError
andInvalidArgumentType
error type classes #192
- Refactored the
InvalidArgument
andRequiredArgument
errors in the gmp classes #192 - Refactored the status response errors in case of a failure in the communication with the server in
transform.py
#192
- Added DEFAULT_SSH_PORT and DEFAULT_HOSTNAME constants to
gmp.connection
#185 - Added
determine_remote_gmp_version
anddetermine_supported_gmp
methods togmp.protocols.gmp
module #186
- Added a workaround that fixes the
exclude_hosts
-bug in the methodmodify_target
. See #187 for more details #188 - Fixed value of
EntityType.AGENT
enum #190
1.1.0 - 2019-11-22
- Added ignore_pagination and details arguments for get_report #163
- Introduced Gmpv9 for GMP 9 support #157, #165, #166
- Added new
create_audit
method, to create a task with theusage_type
audit
#157 - Added new
create_policy
method, to create a config with theusage_type
policy
#157 - Added the new methods
create_tls_certificate
,modify_tls_certificate
andclone_tls_certificate
to create, modify and copy TLS certificates #157 - Added the new method
get_tls_certificates
, to request TLS certificates from the server #157 - Added the new method
get_tls_certificate
, to request a single TLS certificate from the server #166
- Use Gmpv9 in gvm.protocols.latest module #165
- Added type
TLS_CERTIFICATE
toEntityType
andFilterType
#157 - Changed the
DEFAULT_UNIX_SOCKET_PATH
#119 - ospv1.py: Don't half shutdown the TLS socket. #180
- Mark make_unique argument of create_target Gmpv8 as deprecated and ignore it. It is already ignored by gvmd with GMP 8 #156
1.0.0 - 2019-09-18
- Return version tuple from get_protocol_version methods #154
- Fixed
create_tag
andmodify_tag
resource_type
argument to expect an EntityType inGmp8
#150 - Re-added
SMB
as an allowedAlertMethod
for SecInfo events #145
1.0.0.beta3 - 2019-07-30
- Added preferences argument to
create_task
method #89 - Added validation of alive_tests argument to
create_target
method #88 - Added ssh_credential_port argument to
modify_target
#88 - Split getting a single preference by name from
get_preferences
method intoget_preference
#85 - Added resource_type argument to
get_aggregates
method #107 - Added an explicit
create_container_task
method #108 - Added Gmpv8 version of create_tag with resource_filter parameter and plural resource_ids parameter #115
- Added Gmpv8 version of modify_tag with resource_action parameter, resource_filter parameter, plural resource_ids parameter #115
- Added no_details argument to
get_reports
method #129 - Added
get_vulnerabilities
method #132 - Added
get_ticket
,get_tickets
,create_ticket
,clone_ticket
,modify_ticket
anddelete_ticket
APIs to GMPv8 #132 - Added filter types for
host
,operating system
,ticket
andvulnerability
#133 - Added a
password only
credential type #133 - Added type hints for Gmpv8 #136
- Added dynamic selection of the Gmp class depending on the GMP version supported by the remote manager daemon #141
- Added all types as types property to the Gmp classes (e.g gmp.types.EntityType.TASK) #143
- Renamed
create_asset
method tocreate_host
and dropped asset_type argument. It is only possible to create host assets. #77 - Require either setting_id or name for
modify_setting
not both arguments #87 - Allow empty string as value argument for
modify_setting
#87 - Require either user_id or name for
modify_user
not both arguments #87 - Updated argument types for
create_note
,create_override
,modify_note
andmodify_override
#87 - The arguments threat (and new_threat) for
create_note
,modify_note
,create_override
andmodify_override
must be one of 'High', 'Medium', 'Low', 'Alarm', 'Log' or 'Debug' now #87 - Allow to pass either user_id or name to
delete_user
#88 - Don't require inheritor_id or inheritor_name for
delete_user
- Don't require ca_pub for
create_scanner
#88 - Change port argument for
create_scanner
to be an integer #88 - Refactor
modify_scanner
method: Adjust argument types corresponding tocreate_scanner
and only require scanner_id #88 - Updated and improved validation of
create_schedule
andmodify_schedule
arguments #89 - Refactor
modify_task
to use same arguments ascreate_task
#89 - Aligned ALIVE_TESTS declaration with list from GSA #93
- Address DeprecationWarning regarding
collections
module #99 - Forbid '0' as target_id value for
create_task
method and move creating a container task into an own method #108 - Refresh the dependencies specified via the Pipfile.lock file to their latest versions #113, #131
- Make resource_id optional when creating tags (Gmpv7) #124
- Allow creating tags without resource (Gmpv8) #125
- Adapt modify_tag validation to actual implementation (Gmpv8) #127
- Use Gmpv8 as latest Gmp version #132
- Dropped the
make_unique
arguments fromcreate_filter
andcreate_target
methods in Gmpv8 #133 - Introduced Enum classes for authentication and privacy algorithms of SNMP credentials #133
- Extended
InvalidArgument
andRequiredArgument
errors to allow passing argument and function name as keyword parameter #134 - Renamed
modify_target
andcreate_target
argumentalive_tests
toalive_test
#139 - Use enum AliveTests for
alive_test
arguments #136 #139 - Use new
AlertCondition
,AlertEvent
andAlertMethod
enums forcreate_alert
andmodify_alert
methods #139 - Use new
AssetType
enum forget_asset
andget_assets
method #139 - Use new
CredentialFormat
enum forget_credential
method #139 - Use new
CredentialType
enum forcreate_credential
andmodify_credential
methods #132 #139 - Use new
EntityType
enum forcreate_permission
,create_tag
,get_aggregates
,modify_permission
andmodify_tag
methods #139 - Use new
FeedType
enum forget_feed
method #139 - Use new
FilterType
enum forcreate_filter
andmodify_filter
method #133 #139 - Use new
HostsOrdering
enum forcreate_task
andmodify_task
method #139 - Use new
InfoType
enum forget_info
andget_info_list
methods #139 - Use new
PermissionSubjectType
enum forcreate_permission
andmodify_permission
methods #139 - Use new
PortRangeType
enum forcreate_port_range
method #139 - Use new
ScannerType
enum forcreate_scanner
andmodify_scanner
methods #139 - Use new
SnmpAuthAlgorithm
andSnmpPrivacyAlgorithm
enums forcreate_credential
andmodify_credential
methods #139 - Use new
SeverityLevel
enum forcreate_note
,create_override
,modify_note
andmodify_override
methods #139 - Use new
TimeUnit
enum forcreate_schedule
andmodify_schedule
methods #139 - Update
create_schedule
andmodify_schedule
inGmpv8
to use iCalendar based data for schedules #140
- Removed the format parameter from
get_credentials
method #85 - Removed the task_id and nvt_oid parameters from
get_notes
andget_overrides
methods #85 - Removed sources argument from
modify_user
method #87 - Removed
modify_report
method #87 - Removed unused comment argument from
create_note
andcreate_override
#87 - Removed hosts_ordering argument from
modify_target
#88 - Excluded tests from installation #119
- Removed
credential_type
argument frommodify_credential
#139
- Fixed generating XML for
get_credentials
command #74 - Fixed generating XML for
get_settings
command #80 - Fixed generating XML for
get_nvts
command #84 - Fixed wrong order of key and value for condition_data, event_data and
method_data dict parameters of
modify_alert
method #85 - Fixed sending resource id in
modify_tag
#88 - Ensure
modify_setting
value is send as Base64-encoded #98
modify_config
is marked as deprecated and will be removed in future. One of the more specificmodify_config_set_
method should be used instead #87
1.0.0.beta2 - 2018-12-04
- Added new
trigger_alert
method for triggering an alert method on a specific report. - Added
import_config
method to import a scan config from xml. - Added helper function to validate xml input
gvm.xml.validate_xml_string
- Add
finish_send
method to connections. The method allows to indicate to the server sending data is finished and no additional data has to be received.
help
methodtype
argument got renamed tohelp_type
help
methodhelp_type
argument will be checked for invalid valuescreate_credential
requires a credential_type argument now.- Optional arguments are required to be passed as keyword arguments.
get_report
methodformat_id
argument got renamed toreport_format_id
- Check if scanner_type is one of '1' (OSP Scanner) or '2' (OpenVAS Scanner) in
create_scanner
method. pretty_print
accepts a xml string as input too- Optional arguments for connection class constructors must be passed as keyword arguments.
- It's possible to wait indefinitely by deactivating the timeouts via passing None as timeout argument to the connection class constructors now.
- Fix: Don't close the connection after each send/read command sequence automatically. This fixes sending more then one privileged gmp command after authentication.
- Fixed generating XML for help command
- Fixed wrong order of key and value for condition_data, event_data and
method_data dict parameters of
create_alert
method. - Fixed
get_reports
sending the wrong protocol command - Fixed
create_permission
method - Fixed
get_config
sending the correct protocol command. - Don't crash if huge content is returned in a xml response. This fixes e.g.
get_reports
for bigger report data.
- Removed
format_id
argument from get_reports - Removed
alert_id
argument fromget_reports
- Removed unused
read_timeout
argument fromUnixSocketConnection
1.0.0.beta1 - 2018-11-13
python-gvm was a part of gvm-tools prior gvm-tools version 2.0. It got extracted from gvm-tools and completely overhauled.
Some notable changes are:
- The package name changed from gmp to gvm.
- The type of connection is passed to a more generic Gmp class instead of having to select the connection when creating the gmp object.
- Support for different protocols and versions has been added. Currently supported protocols are OSP v1 and GMP v7.
- Full API documentation is available at https://python-gvm.readthedocs.io/en/latest/.
- Possible arguments to protocol methods are documented.
- Arguments should be passed as keywords
create_report
has been renamed toimport_report
.- Requesting single entities has been extracted from the list commands e.g.
get_task(task_id)
instead ofget_tasks(task_id=task_id)
. get_info
requests a single info entity.get_info_list
requests a list of info entities.filt_id
argument is calledfilter_id
at all Gmp methods.report_filter
argument forget_reports
got renamed tofilter
.report_filt_id
isfilter_id
now.create_schedule
start_time
andend_time
arguments got split into several parameters.- Plural arguments like
hosts
,users
, ... always require a list now. create_alert
event
,condition
andmethod
arguments got revised and split.- Boolean parameters expect True and False and not 1, 0, '1' or '0' now.
get_assets
type parameter got renamed toasset_type
- Copying an entity via the
copy
argument has been removed and extracted to ownclone
methods e.g.clone_task
.