pycti 6.6.4__py3-none-any.whl → 6.6.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pycti might be problematic. Click here for more details.
- pycti/__init__.py +1 -1
- pycti/utils/opencti_stix2.py +15 -0
- {pycti-6.6.4.dist-info → pycti-6.6.5.dist-info}/METADATA +1 -1
- {pycti-6.6.4.dist-info → pycti-6.6.5.dist-info}/RECORD +7 -7
- {pycti-6.6.4.dist-info → pycti-6.6.5.dist-info}/WHEEL +0 -0
- {pycti-6.6.4.dist-info → pycti-6.6.5.dist-info}/licenses/LICENSE +0 -0
- {pycti-6.6.4.dist-info → pycti-6.6.5.dist-info}/top_level.txt +0 -0
pycti/__init__.py
CHANGED
pycti/utils/opencti_stix2.py
CHANGED
|
@@ -48,6 +48,7 @@ STIX_EXT_OCTI = "extension-definition--ea279b3e-5c71-4632-ac08-831c66a786ba"
|
|
|
48
48
|
STIX_EXT_OCTI_SCO = "extension-definition--f93e2c80-4231-4f9a-af8b-95c9bd566a82"
|
|
49
49
|
STIX_EXT_MITRE = "extension-definition--322b8f77-262a-4cb8-a915-1e441e00329b"
|
|
50
50
|
PROCESSING_COUNT: int = 4
|
|
51
|
+
MAX_PROCESSING_COUNT: int = 100
|
|
51
52
|
|
|
52
53
|
meter = metrics.get_meter(__name__)
|
|
53
54
|
bundles_timeout_error_counter = meter.create_counter(
|
|
@@ -2489,6 +2490,20 @@ class OpenCTIStix2:
|
|
|
2489
2490
|
work_id: str = None,
|
|
2490
2491
|
):
|
|
2491
2492
|
worker_logger = self.opencti.logger_class("worker")
|
|
2493
|
+
# Ultimate protection to avoid infinite retry
|
|
2494
|
+
if processing_count > MAX_PROCESSING_COUNT:
|
|
2495
|
+
if work_id is not None:
|
|
2496
|
+
item_str = json.dumps(item)
|
|
2497
|
+
self.opencti.work.report_expectation(
|
|
2498
|
+
work_id,
|
|
2499
|
+
{
|
|
2500
|
+
"error": "Max number of retries reached, please see error logs of workers for more details",
|
|
2501
|
+
"source": (
|
|
2502
|
+
item_str if len(item_str) < 50000 else "Bundle too large"
|
|
2503
|
+
),
|
|
2504
|
+
},
|
|
2505
|
+
)
|
|
2506
|
+
return False
|
|
2492
2507
|
try:
|
|
2493
2508
|
self.opencti.set_retry_number(processing_count)
|
|
2494
2509
|
opencti_operation = self.opencti.get_attribute_in_extension(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pycti/__init__.py,sha256=
|
|
1
|
+
pycti/__init__.py,sha256=uoss64G23ppgVfh_NMfwju_ya6HABMCHFJJD2UYt9pA,5538
|
|
2
2
|
pycti/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
pycti/api/opencti_api_client.py,sha256=MWswVagpg_0giX-XnhfmsTO06UGLIYfsDCAaRavPhds,34225
|
|
4
4
|
pycti/api/opencti_api_connector.py,sha256=8xwHuLINP3ZCImzE9_K_iCR9QEA3K6aHpK4bJhcZf20,5582
|
|
@@ -67,13 +67,13 @@ pycti/entities/stix_cyber_observable/opencti_stix_cyber_observable_properties.py
|
|
|
67
67
|
pycti/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
68
68
|
pycti/utils/constants.py,sha256=zlt4nPytB-PIVd91X0RGh3bY6qWcCOn3hnuM9TuDWEw,11829
|
|
69
69
|
pycti/utils/opencti_logger.py,sha256=BHNy9fJuTUTn_JEYSCmyvVwd6y-9ZJKxO40mY4iZ0bc,2226
|
|
70
|
-
pycti/utils/opencti_stix2.py,sha256=
|
|
70
|
+
pycti/utils/opencti_stix2.py,sha256=8rERb39pZEzE3mvhCfhrFetJ5OQtFPt-fFM0pWmO2DY,121248
|
|
71
71
|
pycti/utils/opencti_stix2_identifier.py,sha256=k8L1z4q1xdCBfxqUba4YS_kT-MmbJFxYh0RvfGOmrOs,837
|
|
72
72
|
pycti/utils/opencti_stix2_splitter.py,sha256=etnAWMDzNi2JCovSUJ5Td-XLVdzgKRdsV1XfpXOGols,11070
|
|
73
73
|
pycti/utils/opencti_stix2_update.py,sha256=CnMyqkeVA0jgyxEcgqna8sABU4YPMjkEJ228GVurIn4,14658
|
|
74
74
|
pycti/utils/opencti_stix2_utils.py,sha256=xgBZzm7HC76rLQYwTKkaUd_w9jJnVMoryHx7KDDIB_g,5065
|
|
75
|
-
pycti-6.6.
|
|
76
|
-
pycti-6.6.
|
|
77
|
-
pycti-6.6.
|
|
78
|
-
pycti-6.6.
|
|
79
|
-
pycti-6.6.
|
|
75
|
+
pycti-6.6.5.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
76
|
+
pycti-6.6.5.dist-info/METADATA,sha256=6_WD1jX7y6vLnk9l-Ld6WfR9IzNAZN-OWJX_O4lRe-0,5530
|
|
77
|
+
pycti-6.6.5.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
78
|
+
pycti-6.6.5.dist-info/top_level.txt,sha256=cqEpxitAhHP4VgSA6xmrak6Yk9MeBkwoMTB6k7d2ZnE,6
|
|
79
|
+
pycti-6.6.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|