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

Commit fecbfc4

Browse files
committed
[client] Indicator pattern_type is mandatory
1 parent 31289d2 commit fecbfc4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

pycti/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
__version__ = "5.5.6"
2+
__version__ = "5.6.0"
33

44
from .api.opencti_api_client import OpenCTIApiClient
55
from .api.opencti_api_connector import OpenCTIApiConnector

pycti/entities/opencti_indicator.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ def create(self, **kwargs):
357357
if (
358358
name is not None
359359
and pattern is not None
360+
and pattern_type is not None
360361
and x_opencti_main_observable_type is not None
361362
):
362363
if x_opencti_main_observable_type == "File":
@@ -381,8 +382,6 @@ def create(self, **kwargs):
381382
}
382383
}
383384
"""
384-
if pattern_type is None:
385-
pattern_type = "stix2"
386385
result = self.opencti.query(
387386
query,
388387
{
@@ -421,7 +420,7 @@ def create(self, **kwargs):
421420
else:
422421
LOGGER.error(
423422
"[opencti_indicator] Missing parameters: "
424-
"name or pattern or x_opencti_main_observable_type"
423+
"name or pattern or pattern_type or x_opencti_main_observable_type"
425424
)
426425

427426
def add_stix_cyber_observable(self, **kwargs):

0 commit comments

Comments
 (0)