runzero.types._wrapped
¶
Wrapped types are subclassed, method-free pydantic data types that expose additional fields or replace existing fields to occlude API detail.
These types may be declared here, and not in modules that expose functionality, when there is no constructor, method, or additional decision code on or related to the class. Every type is to be a pure Pydantic data classes with validations.
Each class should have a non-docstring comment in it describing why the REST type was insufficient.
Module Contents¶
Classes¶
|
|
CustomIntegration represents a custom asset data source for custom integrations use |
|
Hostname the dns name the asset is assigned or reachable at. |
|
Represents a custom asset to be created or merged after import. |
|
Represents the Network Interface of an asset to be imported. |
|
Options which can be set to create or modify a scan. |
|
A scan template object |
|
Options which can be set to create or modify a scan template. |
|
A service running on an asset. |
|
ServiceProtocolData represents the attributes associated with a given service protocol |
|
Represents a piece of installed software on a particular asset. |
|
Tag is an arbitrary string classifier applied to the asset. |
|
Represents a vulnerability present on a particular asset. |
- class runzero.types._wrapped.CustomAttribute(attr: str)[source]¶
Bases:
__CustomAttribute
- DEPRECATION NOTICE:
This class is deprecated and will be removed in the 1.0 release of the SDK. You can now use a Dict[str, str] directly when setting the custom_attributes property. This class is replaced by simply using a string.
CustomAttribute is a string key / value pair from an external custom asset data source.
- class Config¶
Config for pydantic model
- class runzero.types._wrapped.CustomIntegration[source]¶
Bases:
runzero.types._data_models_gen.CustomIntegration
CustomIntegration represents a custom asset data source for custom integrations use
- created_at: datetime.datetime¶
A timestamp indicating creation time of the object
- destroyed_at: datetime.datetime | None¶
A timestamp indicating deletion time of the object
- updated_at: datetime.datetime¶
A timestamp indicating last modified time of the object
- class runzero.types._wrapped.Hostname(hostname: str)[source]¶
Bases:
runzero.types._data_models_gen.Hostname
Hostname the dns name the asset is assigned or reachable at.
This can be a fully-qualified hostname with the domain name, or a short hostname.
- class runzero.types._wrapped.ImportAsset[source]¶
Bases:
runzero.types._data_models_gen.ImportAsset
Represents a custom asset to be created or merged after import.
- custom_attributes: Dict[str, str] | None¶
Flat map of arbitrary string key/value pairs representing custom attribute data not described in properties above. Note the maximum number of keys and length of values. Additionally, property names may only be 256 characters long.
- domain: str | None¶
Represents a single domain name which could be applied to all non-fqdns in the hostnames field.
- first_seen_ts: datetime.datetime | None¶
Represents the earliest time the asset was seen by the custom integration reporting it, using a date string as defined by RFC 3339, section 5.6.
- hostnames: List[Hostname] | None¶
Represents hostnames the asset is assigned or reachable at. These can be fully-qualified hostnames with the domain name, or a short hostname.
- manufacturer: str | None¶
The manufacturer of the operating system of the asset. It is advisable to keep the data clean by normalizing to existing values when possible.
- model: str | None¶
The hardware model of the asset. It is advisable to keep the data clean by normalizing to existing values when possible.
- network_interfaces: List[NetworkInterface] | None¶
The asset’s networking configuration.
- os: str | None¶
The name of the asset’s operating system. It is advisable to keep the data clean by normalizing to existing values when possible.
- os_version: str | None¶
The version of the asset’s operating system. It is advisable to keep the data clean by normalizing to existing values when possible.
- vulnerabilities: List[Vulnerability] | None¶
The vulnerabilities associated with an asset.
- class runzero.types._wrapped.NetworkInterface[source]¶
Bases:
runzero.types._data_models_gen.NetworkInterface
Represents the Network Interface of an asset to be imported.
- ipv4_addresses: List[ipaddress.IPv4Address] | None¶
Represents IPV4 addresses. Addresses are ordered from most to least likely to uniquely identify the asset.
- ipv6_addresses: List[ipaddress.IPv6Address] | None¶
Represents the IPV6 addresses. Addresses are ordered from most to least likely to uniquely identify the asset.
- class runzero.types._wrapped.ScanOptions[source]¶
Bases:
runzero.types._data_models_gen.ScanOptions
Options which can be set to create or modify a scan.
- host_ping_probes: str | None¶
Optional host ping probe list as comma separated strings. The example shows possibilities.
- hosted_zone_id: str | None¶
The string ‘auto’ will use any available hosted zone. Otherwise, provide the string name (hostedzone1) or UUID (e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8) of a hosted zone.
- hosted_zone_name: str | None¶
The string ‘auto’ will use any available hosted zone. Otherwise, provide the string name (hostedzone1) of the hosted zone.
- scan_frequency: ScanFrequency | None¶
A string time duration value representing execution frequency, if scheduled to repeat.
- class runzero.types._wrapped.ScanTemplate[source]¶
Bases:
runzero.types._data_models_gen.ScanTemplate
A scan template object
- acl: Dict[str, Any]¶
A map of IDs to strings which describe how the template may be accessed. Currently there is no authoritative list of in-use values. See existing templates for examples.
- custom_integration_id: uuid.UUID | None¶
The ID of the custom integration source, if the last task executed with this template was an import of Asset Data.
- grace_period: str | None¶
Additional time beyond hard expiration deadline by which the task may still be allowed to execute.
A flag indicating whether the item is hidden from common view.
- hosted_zone_id: uuid.UUID | None¶
The ID of the hosted zone that ran the last task the template was used with.
- params: Dict[str, str] | None¶
A number of task parameter values. Currently there is no authoritative list of in-use values. See existing templates for examples.
- recur_frequency: str | None¶
A string time duration value representing execution frequency, if scheduled to repeat. You may use values including as once, hourly, daily, weekly, monthly, continuous
- size_site: int | None¶
The size in assets of the site the last task the template was executed against.
- source_id: str | None¶
The numeric ID of the data source, if the task executed with this template is a runZero scan or third party data connection import.
- class runzero.types._wrapped.ScanTemplateOptions[source]¶
Bases:
runzero.types._data_models_gen.ScanTemplateOptions
Options which can be set to create or modify a scan template.
- acl: Dict[str, Any]¶
A map of IDs to strings which describe how the template may be accessed. Currently there is no authoritative list of acceptable values. See existing templates for examples.
- class runzero.types._wrapped.Service(**kwargs: Any)[source]¶
Bases:
runzero.types._data_models_gen.Service
A service running on an asset.
- address: ipaddress.IPv4Address | ipaddress.IPv6Address¶
Represents the IPAddress (v4 or v6) that the service is available at.
- class runzero.types._wrapped.ServiceProtocolData(**kwargs: Any)[source]¶
Bases:
runzero.types._data_models_gen.ServiceProtocolData
ServiceProtocolData represents the attributes associated with a given service protocol
- class runzero.types._wrapped.Software(**kwargs: Any)[source]¶
Bases:
runzero.types._data_models_gen.Software
Represents a piece of installed software on a particular asset.
- custom_attributes: Dict[str, str] | None¶
Flat map of arbitrary string key/value pairs representing custom attribute data not described in properties above. Note the maximum number of keys and length of values. Additionally, property names may only be 256 characters long.
- installed_at: datetime.datetime | None¶
The timestamp at which the software was installed on the asset, using a date string as defined by RFC 3339, section 5.6.
- other: str | None¶
Any other general descriptive or identifying information which is vendor- or product-specific and which does not logically fit in any other attribute value of a CPE.
- product: str | None¶
Describes or identifies the most common and recognizable title or name of the product.
- service_address: ipaddress.IPv4Address | ipaddress.IPv6Address | None¶
Represents the IPAddress (v4 or v6) that the software is available at.
- software_edition: str | None¶
How the product is tailored to a particular market or class of end users.
- target_software: str | None¶
A characterization of the software computing environment within which the product operates.
- class runzero.types._wrapped.Tag(tag: str)[source]¶
Bases:
runzero.types._data_models_gen.Tag
Tag is an arbitrary string classifier applied to the asset.
- class runzero.types._wrapped.Vulnerability[source]¶
Bases:
runzero.types._data_models_gen.Vulnerability
Represents a vulnerability present on a particular asset.
- custom_attributes: Dict[str, str] | None¶
Flat map of arbitrary string key/value pairs representing custom attribute data not described in properties above. Note the maximum number of keys and length of values. Additionally, property names may only be 256 characters long.
- cve: str | None¶
CVE represents the common vulnerability ID as assigned by an authority such as NIST and should be in the format of ‘CVE-YYYY-NNNNN’ where YYYY represents the year of the entry and NNNNN is the vulns unique number.
- cvss2_base_score: float | None¶
The exploit-ability score of the vulnerability as assigned by the CVSS2 system.
- cvss2_temporal_score: float | None¶
The current exploit-ability score (modified by ease of patching/impact of vuln/etc) of the vuln as assigned by the CVSS2 system.
- cvss3_base_score: float | None¶
The exploit-ability score of the vulnerability as assigned by the CVSS3 system.
- cvss3_temporal_score: float | None¶
The current exploit-ability score (modified by ease of patching/impact of vuln/etc) of the vuln as assigned by the CVSS3 system.
- first_detected_ts: datetime.datetime | None¶
Represents the Timestamp at which the vulnerability was first detected on the asset, using a date string as defined by RFC 3339, section 5.6.
- last_detected_ts: datetime.datetime | None¶
Represents the Timestamp at which the vulnerability was last detected on the asset, using a date string as defined by RFC 3339, section 5.6.
- published_ts: datetime.datetime | None¶
Represents the Timestamp at which the CVE was officially published, using a date string as defined by RFC 3339, section 5.6.
- risk_rank: int | None¶
An integer representation of the risk of vuln exploitation where 0=NONE, 1=LOW, 2=MEDIUM, 3=HIGH, and 4=CRITICAL.
- service_address: ipaddress.IPv4Address | ipaddress.IPv6Address | None¶
The IPAddress (v4 or v6) that the vulnerable service is available at.
- severity_rank: int | None¶
An integer representation of the vuln severity where 0=NONE, 1=LOW, 2=MEDIUM, 3=HIGH, and 4=CRITICAL