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

Commit f6b2f33

Browse files
[client] Prevent setting default first_seen and last_seen for sightings (#359)
1 parent 6ab5cd1 commit f6b2f33

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pycti/utils/opencti_stix2.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,6 @@ def import_sighting(
11631163
"To ref of the sighting not found, doing nothing..."
11641164
)
11651165
return None
1166-
date = datetime.datetime.today().strftime("%Y-%m-%dT%H:%M:%SZ")
11671166
if (
11681167
"x_opencti_negative" not in stix_sighting
11691168
and self.opencti.get_attribute_in_extension("negative", stix_sighting)
@@ -1181,10 +1180,10 @@ def import_sighting(
11811180
else None,
11821181
first_seen=stix_sighting["first_seen"]
11831182
if "first_seen" in stix_sighting
1184-
else date,
1183+
else None,
11851184
last_seen=stix_sighting["last_seen"]
11861185
if "last_seen" in stix_sighting
1187-
else date,
1186+
else None,
11881187
count=stix_sighting["count"] if "count" in stix_sighting else 1,
11891188
x_opencti_negative=stix_sighting["x_opencti_negative"]
11901189
if "x_opencti_negative" in stix_sighting

0 commit comments

Comments
 (0)