pycti.entities.opencti_vulnerability ==================================== .. py:module:: pycti.entities.opencti_vulnerability Classes ------- .. autoapisummary:: pycti.entities.opencti_vulnerability.Vulnerability Module Contents --------------- .. py:class:: Vulnerability(opencti) Main Vulnerability class for OpenCTI Manages vulnerability information including CVE data in the OpenCTI platform. :param opencti: instance of :py:class:`~pycti.api.opencti_api_client.OpenCTIApiClient` :type opencti: OpenCTIApiClient Initialize the Vulnerability instance. :param opencti: OpenCTI API client instance :type opencti: OpenCTIApiClient .. py:attribute:: opencti .. py:attribute:: properties :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ id standard_id entity_type parent_types spec_version created_at updated_at status { id template { id name color } } createdBy { ... on Identity { id standard_id entity_type parent_types spec_version identity_class name description roles contact_information x_opencti_aliases created modified objectLabel { id value color } } ... on Organization { x_opencti_organization_type x_opencti_reliability } ... on Individual { x_opencti_firstname x_opencti_lastname } } objectOrganization { id standard_id name } objectMarking { id standard_id entity_type definition_type definition created modified x_opencti_order x_opencti_color } objectLabel { id value color } externalReferences { edges { node { id standard_id entity_type source_name description url hash external_id created modified importFiles { edges { node { id name size metaData { mimetype version } } } } } } } revoked confidence created modified name description x_opencti_aliases x_opencti_cvss_vector_string x_opencti_cvss_base_score x_opencti_cvss_base_severity x_opencti_cvss_attack_vector x_opencti_cvss_attack_complexity x_opencti_cvss_privileges_required x_opencti_cvss_user_interaction x_opencti_cvss_scope x_opencti_cvss_confidentiality_impact x_opencti_cvss_integrity_impact x_opencti_cvss_availability_impact x_opencti_cvss_exploit_code_maturity x_opencti_cvss_remediation_level x_opencti_cvss_report_confidence x_opencti_cvss_temporal_score x_opencti_cvss_v2_vector_string x_opencti_cvss_v2_base_score x_opencti_cvss_v2_access_vector x_opencti_cvss_v2_access_complexity x_opencti_cvss_v2_authentication x_opencti_cvss_v2_confidentiality_impact x_opencti_cvss_v2_integrity_impact x_opencti_cvss_v2_availability_impact x_opencti_cvss_v2_exploitability x_opencti_cvss_v2_remediation_level x_opencti_cvss_v2_report_confidence x_opencti_cvss_v2_temporal_score x_opencti_cvss_v4_vector_string x_opencti_cvss_v4_base_score x_opencti_cvss_v4_base_severity x_opencti_cvss_v4_attack_vector x_opencti_cvss_v4_attack_complexity x_opencti_cvss_v4_attack_requirements x_opencti_cvss_v4_privileges_required x_opencti_cvss_v4_user_interaction x_opencti_cvss_v4_confidentiality_impact_v x_opencti_cvss_v4_confidentiality_impact_s x_opencti_cvss_v4_integrity_impact_v x_opencti_cvss_v4_integrity_impact_s x_opencti_cvss_v4_availability_impact_v x_opencti_cvss_v4_availability_impact_s x_opencti_cvss_v4_exploit_maturity x_opencti_cwe x_opencti_first_seen_active x_opencti_cisa_kev x_opencti_epss_score x_opencti_epss_percentile x_opencti_score importFiles { edges { node { id name size metaData { mimetype version } objectMarking { id standard_id entity_type definition_type definition created modified x_opencti_order x_opencti_color } } } } """ .. raw:: html
.. py:method:: generate_id(name) :staticmethod: Generate a STIX ID for a Vulnerability. :param name: The name of the vulnerability (e.g., CVE ID) :type name: str :return: STIX ID for the vulnerability :rtype: str .. py:method:: generate_id_from_data(data) :staticmethod: Generate a STIX ID from vulnerability data. :param data: Dictionary containing 'name' key :type data: dict :return: STIX ID for the vulnerability :rtype: str .. py:method:: list(**kwargs) List Vulnerability objects. :param filters: the filters to apply :type filters: dict :param search: the search keyword :type search: str :param first: return the first n rows from the after ID (or the beginning if not set) :type first: int :param after: ID of the first row for pagination :type after: str :param orderBy: field to order results by :type orderBy: str :param orderMode: ordering mode (asc/desc) :type orderMode: str :param customAttributes: custom attributes to return :type customAttributes: str :param getAll: whether to retrieve all results :type getAll: bool :param withPagination: whether to include pagination info :type withPagination: bool :return: List of Vulnerability objects :rtype: list .. py:method:: read(**kwargs) Read a Vulnerability object. :param id: the id of the Vulnerability :type id: str :param filters: the filters to apply if no id provided :type filters: dict :param customAttributes: custom attributes to return :type customAttributes: str :return: Vulnerability object :rtype: dict or None .. py:method:: create(**kwargs) Create a Vulnerability object. :param name: the name of the Vulnerability (required) :type name: str :param stix_id: (optional) the STIX ID :type stix_id: str :param createdBy: (optional) the author ID :type createdBy: str :param objectMarking: (optional) list of marking definition IDs :type objectMarking: list :param objectLabel: (optional) list of label IDs :type objectLabel: list :param externalReferences: (optional) list of external reference IDs :type externalReferences: list :param revoked: (optional) whether the vulnerability is revoked :type revoked: bool :param confidence: (optional) confidence level (0-100) :type confidence: int :param lang: (optional) language :type lang: str :param created: (optional) creation date :type created: str :param modified: (optional) modification date :type modified: str :param description: (optional) description :type description: str :param x_opencti_aliases: (optional) list of aliases :type x_opencti_aliases: list :param x_opencti_cvss_vector_string: (optional) CVSS v3 vector string :type x_opencti_cvss_vector_string: str :param x_opencti_cvss_base_score: (optional) CVSS v3 base score :type x_opencti_cvss_base_score: float :param x_opencti_cvss_base_severity: (optional) CVSS v3 base severity :type x_opencti_cvss_base_severity: str :param x_opencti_cwe: (optional) CWE ID :type x_opencti_cwe: str :param x_opencti_cisa_kev: (optional) CISA KEV flag :type x_opencti_cisa_kev: bool :param x_opencti_epss_score: (optional) EPSS score :type x_opencti_epss_score: float :param x_opencti_epss_percentile: (optional) EPSS percentile :type x_opencti_epss_percentile: float :param x_opencti_score: (optional) OpenCTI score :type x_opencti_score: int :param x_opencti_first_seen_active: (optional) first seen active date :type x_opencti_first_seen_active: str :param x_opencti_stix_ids: (optional) list of additional STIX IDs :type x_opencti_stix_ids: list :param objectOrganization: (optional) list of organization IDs :type objectOrganization: list :param x_opencti_workflow_id: (optional) workflow ID :type x_opencti_workflow_id: str :param x_opencti_modified_at: (optional) custom modification date :type x_opencti_modified_at: str :param update: (optional) whether to update if exists (default: False) :type update: bool :param files: (optional) list of File objects to attach :type files: list :param filesMarkings: (optional) list of lists of marking definition IDs for each file :type filesMarkings: list :return: Vulnerability object :rtype: dict or None .. py:method:: import_from_stix2(**kwargs) Import a Vulnerability object from a STIX2 object. :param stixObject: the STIX2 Vulnerability object :type stixObject: dict :param extras: extra parameters including created_by_id, object_marking_ids, etc. :type extras: dict :param update: whether to update if the entity already exists :type update: bool :return: Vulnerability object :rtype: dict or None