diff --git a/pycti/entities/opencti_identity.py b/pycti/entities/opencti_identity.py index c73d46d45..12f7ae6d0 100644 --- a/pycti/entities/opencti_identity.py +++ b/pycti/entities/opencti_identity.py @@ -51,6 +51,7 @@ def __init__(self, opencti): } ... on Organization { x_opencti_organization_type + x_opencti_score } ... on Individual { x_opencti_firstname @@ -110,6 +111,7 @@ def __init__(self, opencti): } ... on Organization { x_opencti_organization_type + x_opencti_score } """ self.properties_with_files = """ @@ -152,6 +154,7 @@ def __init__(self, opencti): } ... on Organization { x_opencti_organization_type + x_opencti_score } ... on Individual { x_opencti_firstname @@ -224,6 +227,7 @@ def __init__(self, opencti): } ... on Organization { x_opencti_organization_type + x_opencti_score } importFiles { edges { @@ -412,6 +416,7 @@ def create(self, **kwargs): x_opencti_aliases = kwargs.get("x_opencti_aliases", None) x_opencti_organization_type = kwargs.get("x_opencti_organization_type", None) x_opencti_reliability = kwargs.get("x_opencti_reliability", None) + x_opencti_score = kwargs.get("x_opencti_score", None) x_opencti_firstname = kwargs.get("x_opencti_firstname", None) x_opencti_lastname = kwargs.get("x_opencti_lastname", None) x_opencti_stix_ids = kwargs.get("x_opencti_stix_ids", None) @@ -456,6 +461,7 @@ def create(self, **kwargs): x_opencti_organization_type ) input_variables["x_opencti_reliability"] = x_opencti_reliability + input_variables["x_opencti_score"] = x_opencti_score result_data_field = "organizationAdd" elif type == IdentityTypes.INDIVIDUAL.value: query = """ @@ -552,6 +558,10 @@ def import_from_stix2(self, **kwargs): stix_object["x_opencti_reliability"] = ( self.opencti.get_attribute_in_extension("reliability", stix_object) ) + if "x_opencti_score" not in stix_object: + stix_object["x_opencti_score"] = ( + self.opencti.get_attribute_in_extension("score", stix_object) + ) if "x_opencti_organization_type" not in stix_object: stix_object["x_opencti_organization_type"] = ( self.opencti.get_attribute_in_extension( @@ -630,6 +640,11 @@ def import_from_stix2(self, **kwargs): if "x_opencti_reliability" in stix_object else None ), + x_opencti_score=( + stix_object["x_opencti_score"] + if "x_opencti_score" in stix_object + else None + ), x_opencti_firstname=( stix_object["x_opencti_firstname"] if "x_opencti_firstname" in stix_object