Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pycti/entities/opencti_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def __init__(self, opencti):
}
... on Organization {
x_opencti_organization_type
x_opencti_score
}
... on Individual {
x_opencti_firstname
Expand Down Expand Up @@ -110,6 +111,7 @@ def __init__(self, opencti):
}
... on Organization {
x_opencti_organization_type
x_opencti_score
}
"""
self.properties_with_files = """
Expand Down Expand Up @@ -152,6 +154,7 @@ def __init__(self, opencti):
}
... on Organization {
x_opencti_organization_type
x_opencti_score
}
... on Individual {
x_opencti_firstname
Expand Down Expand Up @@ -224,6 +227,7 @@ def __init__(self, opencti):
}
... on Organization {
x_opencti_organization_type
x_opencti_score
}
importFiles {
edges {
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 = """
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down