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

Commit 9b20ee6

Browse files
committed
[client] Add case in containers
1 parent 9b6f790 commit 9b20ee6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

pycti/utils/opencti_stix2.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from pycti.utils.constants import (
1717
IdentityTypes,
1818
LocationTypes,
19+
ContainerTypes,
1920
MultipleStixCyberObservableRelationship,
2021
StixCyberObservableTypes,
2122
)
@@ -1935,7 +1936,14 @@ def export_list(
19351936
filters = [{"key": "entity_type", "values": [entity_type]}]
19361937
entity_type = "Stix-Cyber-Observable"
19371938

1938-
if entity_type == "Analysis":
1939+
if ContainerTypes.has_value(entity_type):
1940+
if filters is not None:
1941+
filters.append({"key": "entity_type", "values": [entity_type]})
1942+
else:
1943+
filters = [{"key": "entity_type", "values": [entity_type]}]
1944+
entity_type = "Stix-Cyber-Observable"
1945+
1946+
if entity_type == "Container":
19391947
if filters is not None:
19401948
filters.append(
19411949
{
@@ -1946,6 +1954,7 @@ def export_list(
19461954
"Note",
19471955
"Observed-Data",
19481956
"Opinion",
1957+
"Case",
19491958
],
19501959
}
19511960
)
@@ -1959,6 +1968,7 @@ def export_list(
19591968
"Note",
19601969
"Observed-Data",
19611970
"Opinion",
1971+
"Case",
19621972
],
19631973
}
19641974
]

0 commit comments

Comments
 (0)