Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
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
17 changes: 17 additions & 0 deletions pycti/entities/opencti_stix_cyber_observable.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,18 @@ def create(self, **kwargs):
),
}
elif type == "Software":
if (
"x_opencti_product" not in observable_data
and self.opencti.get_attribute_in_extension(
"x_opencti_product", observable_data
)
is not None
):
observable_data["x_opencti_product"] = (
self.opencti.get_attribute_in_extension(
"x_opencti_product", observable_data
)
)
input_variables["Software"] = {
"name": (
observable_data["name"] if "name" in observable_data else None
Expand All @@ -832,6 +844,11 @@ def create(self, **kwargs):
if "version" in observable_data
else None
),
"x_opencti_product": (
observable_data["x_opencti_product"]
if "x_opencti_product" in observable_data
else None
),
}
elif type == "Url":
input_variables["Url"] = {
Expand Down
14 changes: 14 additions & 0 deletions pycti/entities/opencti_vulnerability.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def __init__(self, opencti):
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
Expand Down Expand Up @@ -452,6 +453,7 @@ def create(self, **kwargs):
x_opencti_epss_score = kwargs.get("x_opencti_epss_score", None)
x_opencti_epss_percentile = kwargs.get("x_opencti_epss_percentile", None)
x_opencti_score = kwargs.get("x_opencti_score", None)
x_opencti_first_seen_active = kwargs.get("x_opencti_first_seen_active", None)
x_opencti_stix_ids = kwargs.get("x_opencti_stix_ids", None)
granted_refs = kwargs.get("objectOrganization", None)
x_opencti_workflow_id = kwargs.get("x_opencti_workflow_id", None)
Expand Down Expand Up @@ -538,6 +540,7 @@ def create(self, **kwargs):
"x_opencti_epss_score": x_opencti_epss_score,
"x_opencti_epss_percentile": x_opencti_epss_percentile,
"x_opencti_score": x_opencti_score,
"x_opencti_first_seen_active": x_opencti_first_seen_active,
"x_opencti_stix_ids": x_opencti_stix_ids,
"x_opencti_workflow_id": x_opencti_workflow_id,
"update": update,
Expand Down Expand Up @@ -867,6 +870,12 @@ def import_from_stix2(self, **kwargs):
stix_object["x_opencti_score"] = (
self.opencti.get_attribute_in_extension("score", stix_object)
)
if "x_opencti_first_seen_active" not in stix_object:
stix_object["x_opencti_first_seen_active"] = (
self.opencti.get_attribute_in_extension(
"first_seen_active", stix_object
)
)

return self.create(
stix_id=stix_object["id"],
Expand Down Expand Up @@ -1158,6 +1167,11 @@ def import_from_stix2(self, **kwargs):
if "x_opencti_score" in stix_object
else None
),
x_opencti_first_seen_active=(
stix_object["x_opencti_first_seen_active"]
if "x_opencti_first_seen_active" in stix_object
else None
),
update=update,
)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
languages
vendor
version
x_opencti_product
}
... on Url {
value
Expand Down Expand Up @@ -519,6 +520,7 @@
languages
vendor
version
x_opencti_product
}
... on Url {
value
Expand Down
Loading