Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 2d33e3c

Browse files
committed
[client] Handle custom sightings to observables
1 parent 0394940 commit 2d33e3c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pycti/utils/opencti_stix2.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,6 +2306,21 @@ def import_bundle(
23062306
for where_sighted_ref in item["where_sighted_refs"]:
23072307
to_ids.append(where_sighted_ref)
23082308
# Import sighting_of_ref
2309+
if "x_opencti_sighting_of_ref" in item:
2310+
from_id = item["x_opencti_sighting_of_ref"]
2311+
if len(to_ids) > 0:
2312+
for to_id in to_ids:
2313+
self.import_sighting(item, from_id, to_id, update)
2314+
if (
2315+
self.opencti.get_attribute_in_extension("sighting_of_ref", item)
2316+
is not None
2317+
):
2318+
from_id = self.opencti.get_attribute_in_extension(
2319+
"sighting_of_ref", item
2320+
)
2321+
if len(to_ids) > 0:
2322+
for to_id in to_ids:
2323+
self.import_sighting(item, from_id, to_id, update)
23092324
from_id = item["sighting_of_ref"]
23102325
if len(to_ids) > 0:
23112326
for to_id in to_ids:

0 commit comments

Comments
 (0)