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

Commit 980f05f

Browse files
committed
[client] Implement workflow ID at report creation (#534)
1 parent 14e99a6 commit 980f05f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pycti/entities/opencti_report.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,7 @@ def create(self, **kwargs):
691691
x_opencti_reliability = kwargs.get("x_opencti_reliability", None)
692692
x_opencti_stix_ids = kwargs.get("x_opencti_stix_ids", None)
693693
granted_refs = kwargs.get("objectOrganization", None)
694+
x_opencti_workflow_id = kwargs.get("x_opencti_workflow_id", None)
694695
update = kwargs.get("update", False)
695696

696697
if name is not None and published is not None:
@@ -728,6 +729,7 @@ def create(self, **kwargs):
728729
"published": published,
729730
"x_opencti_reliability": x_opencti_reliability,
730731
"x_opencti_stix_ids": x_opencti_stix_ids,
732+
"x_opencti_workflow_id": x_opencti_workflow_id,
731733
"update": update,
732734
}
733735
},
@@ -852,6 +854,12 @@ def import_from_stix2(self, **kwargs):
852854
stix_object[
853855
"x_opencti_granted_refs"
854856
] = self.opencti.get_attribute_in_extension("granted_refs", stix_object)
857+
if "x_opencti_workflow_id" not in stix_object:
858+
stix_object[
859+
"x_opencti_workflow_id"
860+
] = self.opencti.get_attribute_in_extension(
861+
"x_opencti_workflow_id", stix_object
862+
)
855863
if "x_opencti_reliability" not in stix_object:
856864
stix_object[
857865
"x_opencti_reliability"
@@ -903,6 +911,9 @@ def import_from_stix2(self, **kwargs):
903911
objectOrganization=stix_object["x_opencti_granted_refs"]
904912
if "x_opencti_granted_refs" in stix_object
905913
else None,
914+
x_opencti_workflow_id=stix_object["x_opencti_workflow_id"]
915+
if "x_opencti_workflow_id" in stix_object
916+
else None,
906917
update=update,
907918
)
908919
else:

0 commit comments

Comments
 (0)