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

Commit c476b0d

Browse files
committed
Merge branch 'master' into release/6.6.0
# Conflicts: # pycti/connector/opencti_connector_helper.py
2 parents f8f43a9 + f2d44b5 commit c476b0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+362
-199
lines changed

.circleci/config.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
version: 2.1
33
orbs:
44
slack: circleci/[email protected]
5-
ms-teams: cloudradar-monitoring/[email protected]
65
jobs:
76
ensure_formatting:
87
docker:
@@ -29,9 +28,6 @@ jobs:
2928
branch_pattern: master
3029
event: fail
3130
template: basic_fail_1
32-
- ms-teams/report:
33-
only_on_fail: true
34-
webhook_url: $MS_TEAMS_WEBHOOK_URL
3531
linter:
3632
docker:
3733
- image: alpine/flake8
@@ -45,9 +41,6 @@ jobs:
4541
branch_pattern: master
4642
event: fail
4743
template: basic_fail_1
48-
- ms-teams/report:
49-
only_on_fail: true
50-
webhook_url: $MS_TEAMS_WEBHOOK_URL
5144
build:
5245
working_directory: ~/opencti-client
5346
docker:
@@ -75,9 +68,6 @@ jobs:
7568
branch_pattern: master
7669
event: fail
7770
template: basic_fail_1
78-
- ms-teams/report:
79-
only_on_fail: true
80-
webhook_url: $MS_TEAMS_WEBHOOK_URL
8171
- persist_to_workspace:
8272
root: ~/opencti-client
8373
paths:
@@ -108,29 +98,20 @@ jobs:
10898
branch_pattern: master
10999
event: fail
110100
template: basic_fail_1
111-
- ms-teams/report:
112-
only_on_fail: true
113-
webhook_url: $MS_TEAMS_WEBHOOK_URL
114101
notify_rolling:
115102
docker:
116103
- image: "cimg/base:stable"
117104
steps:
118105
- slack/notify:
119106
event: pass
120107
template: basic_success_1
121-
- ms-teams/report:
122-
only_on_fail: false
123-
webhook_url: $MS_TEAMS_WEBHOOK_URL
124108
notify:
125109
docker:
126110
- image: "cimg/base:stable"
127111
steps:
128112
- slack/notify:
129113
event: pass
130114
template: basic_success_1
131-
- ms-teams/report:
132-
only_on_fail: false
133-
webhook_url: $MS_TEAMS_WEBHOOK_URL
134115

135116
workflows:
136117
version: 2

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
autoapi==2.0.1
2-
sphinx==8.1.3
2+
sphinx==8.2.3
33
sphinx-autodoc-typehints==2.5.0
44
sphinx_rtd_theme==3.0.2

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__ = "6.5.2"
2+
__version__ = "6.5.10"
33

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

pycti/api/opencti_api_client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def query(self, query, variables=None):
293293
if is_multiple_files:
294294
# [(var_name + "." + i)] if is_multiple_files else
295295
for _ in file_var_item["file"]:
296-
file_vars[str(map_index)] = [(var_name + "." + str(map_index))]
296+
file_vars[str(map_index)] = [var_name + "." + str(map_index)]
297297
map_index += 1
298298
else:
299299
file_vars[str(map_index)] = [var_name]
@@ -801,20 +801,21 @@ def send_bundle_to_api(self, **kwargs):
801801
"""
802802

803803
connector_id = kwargs.get("connector_id", None)
804+
work_id = kwargs.get("work_id", None)
804805
bundle = kwargs.get("bundle", None)
805806

806807
if connector_id is not None and bundle is not None:
807808
self.app_logger.info(
808809
"Pushing a bundle to queue through API", {connector_id}
809810
)
810811
mutation = """
811-
mutation StixBundlePush($connectorId: String!, $bundle: String!) {
812-
stixBundlePush(connectorId: $connectorId, bundle: $bundle)
812+
mutation StixBundlePush($connectorId: String!, $bundle: String!, $work_id: String) {
813+
stixBundlePush(connectorId: $connectorId, bundle: $bundle, work_id: $work_id)
813814
}
814815
"""
815816
return self.query(
816817
mutation,
817-
{"connectorId": connector_id, "bundle": bundle},
818+
{"connectorId": connector_id, "bundle": bundle, "work_id": work_id},
818819
)
819820
else:
820821
self.app_logger.error(

pycti/api/opencti_api_connector.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ def list(self) -> Dict:
6161
connectorsForWorker {
6262
id
6363
name
64+
connector_user {
65+
api_token
66+
}
6467
config {
6568
connection {
6669
host
@@ -72,6 +75,7 @@ def list(self) -> Dict:
7275
}
7376
listen
7477
listen_exchange
78+
listen_callback_uri
7579
push
7680
push_exchange
7781
push_routing

pycti/connector/opencti_connector.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def __init__(
4343
auto: bool,
4444
only_contextual: bool,
4545
playbook_compatible: bool,
46+
listen_callback_uri=None,
4647
):
4748
self.id = connector_id
4849
self.name = connector_name
@@ -56,6 +57,7 @@ def __init__(
5657
self.auto = auto
5758
self.only_contextual = only_contextual
5859
self.playbook_compatible = playbook_compatible
60+
self.listen_callback_uri = listen_callback_uri
5961

6062
def to_input(self) -> dict:
6163
"""connector input to use in API query
@@ -72,5 +74,6 @@ def to_input(self) -> dict:
7274
"auto": self.auto,
7375
"only_contextual": self.only_contextual,
7476
"playbook_compatible": self.playbook_compatible,
77+
"listen_callback_uri": self.listen_callback_uri,
7578
}
7679
}

0 commit comments

Comments
 (0)