pycti 6.5.1__tar.gz → 6.5.3__tar.gz
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-6.5.1 → pycti-6.5.3}/PKG-INFO +6 -6
- {pycti-6.5.1 → pycti-6.5.3}/pycti/__init__.py +1 -1
- {pycti-6.5.1 → pycti-6.5.3}/pycti/api/opencti_api_client.py +17 -12
- {pycti-6.5.1 → pycti-6.5.3}/pycti/connector/opencti_connector_helper.py +12 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_attack_pattern.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_campaign.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_case_incident.py +1 -3
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_case_rfi.py +3 -5
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_case_rft.py +3 -5
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_channel.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_course_of_action.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_data_component.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_data_source.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_event.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_external_reference.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_feedback.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_grouping.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_identity.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_incident.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_infrastructure.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_intrusion_set.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_kill_chain_phase.py +0 -3
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_label.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_language.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_location.py +0 -3
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_malware.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_malware_analysis.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_marking_definition.py +0 -3
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_narrative.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_note.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_observed_data.py +4 -7
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_opinion.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_report.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_stix_core_object.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_stix_core_relationship.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_stix_cyber_observable.py +0 -3
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_stix_domain_object.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_stix_nested_ref_relationship.py +4 -7
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_stix_sighting_relationship.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_task.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_threat_actor.py +0 -4
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_threat_actor_group.py +0 -4
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_threat_actor_individual.py +0 -4
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_tool.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_vulnerability.py +0 -2
- {pycti-6.5.1 → pycti-6.5.3}/pycti/utils/opencti_logger.py +3 -3
- {pycti-6.5.1 → pycti-6.5.3}/pycti.egg-info/PKG-INFO +6 -6
- {pycti-6.5.1 → pycti-6.5.3}/pycti.egg-info/requires.txt +5 -5
- {pycti-6.5.1 → pycti-6.5.3}/setup.cfg +5 -5
- {pycti-6.5.1 → pycti-6.5.3}/LICENSE +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/README.md +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/api/__init__.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/api/opencti_api_connector.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/api/opencti_api_playbook.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/api/opencti_api_work.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/connector/__init__.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/connector/opencti_connector.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/connector/opencti_metric_handler.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/__init__.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/indicator/__init__.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/indicator/opencti_indicator_properties.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_indicator.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_stix.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_stix_object_or_stix_relationship.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/opencti_vocabulary.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/stix_cyber_observable/__init__.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/stix_cyber_observable/opencti_stix_cyber_observable_deprecated.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/entities/stix_cyber_observable/opencti_stix_cyber_observable_properties.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/utils/__init__.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/utils/constants.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/utils/opencti_stix2.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/utils/opencti_stix2_identifier.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/utils/opencti_stix2_splitter.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/utils/opencti_stix2_update.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti/utils/opencti_stix2_utils.py +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti.egg-info/SOURCES.txt +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti.egg-info/dependency_links.txt +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pycti.egg-info/top_level.txt +0 -0
- {pycti-6.5.1 → pycti-6.5.3}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: pycti
|
|
3
|
-
Version: 6.5.
|
|
3
|
+
Version: 6.5.3
|
|
4
4
|
Summary: Python API client for OpenCTI.
|
|
5
5
|
Home-page: https://github.com/OpenCTI-Platform/client-python
|
|
6
6
|
Author: Filigran
|
|
@@ -23,7 +23,7 @@ Description-Content-Type: text/markdown
|
|
|
23
23
|
License-File: LICENSE
|
|
24
24
|
Requires-Dist: datefinder~=0.7.3
|
|
25
25
|
Requires-Dist: pika~=1.3.0
|
|
26
|
-
Requires-Dist: pydantic
|
|
26
|
+
Requires-Dist: pydantic<2.11.0,>=2.8.2
|
|
27
27
|
Requires-Dist: python-magic~=0.4.27; sys_platform == "linux" or sys_platform == "darwin"
|
|
28
28
|
Requires-Dist: python-magic-bin~=0.4.14; sys_platform == "win32"
|
|
29
29
|
Requires-Dist: python_json_logger~=2.0.4
|
|
@@ -32,16 +32,16 @@ Requires-Dist: requests~=2.32.2
|
|
|
32
32
|
Requires-Dist: setuptools~=71.1.0
|
|
33
33
|
Requires-Dist: cachetools~=5.5.0
|
|
34
34
|
Requires-Dist: prometheus-client~=0.21.1
|
|
35
|
-
Requires-Dist: opentelemetry-api
|
|
36
|
-
Requires-Dist: opentelemetry-sdk
|
|
35
|
+
Requires-Dist: opentelemetry-api<=1.30.0,>=1.22.0
|
|
36
|
+
Requires-Dist: opentelemetry-sdk<=1.30.0,>=1.22.0
|
|
37
37
|
Requires-Dist: deprecation~=2.1.0
|
|
38
38
|
Requires-Dist: filigran-sseclient>=1.0.2
|
|
39
39
|
Requires-Dist: stix2~=3.0.1
|
|
40
40
|
Provides-Extra: dev
|
|
41
41
|
Requires-Dist: black~=24.4.0; extra == "dev"
|
|
42
42
|
Requires-Dist: build~=1.2.1; extra == "dev"
|
|
43
|
-
Requires-Dist: isort~=
|
|
44
|
-
Requires-Dist: types-pytz~=
|
|
43
|
+
Requires-Dist: isort~=6.0.0; extra == "dev"
|
|
44
|
+
Requires-Dist: types-pytz~=2025.1.0.20250204; extra == "dev"
|
|
45
45
|
Requires-Dist: pre-commit~=3.8.0; extra == "dev"
|
|
46
46
|
Requires-Dist: pytest-cases~=3.8.0; extra == "dev"
|
|
47
47
|
Requires-Dist: pytest-cov~=5.0.0; extra == "dev"
|
|
@@ -3,7 +3,7 @@ import base64
|
|
|
3
3
|
import datetime
|
|
4
4
|
import io
|
|
5
5
|
import json
|
|
6
|
-
from typing import Union
|
|
6
|
+
from typing import Dict, Tuple, Union
|
|
7
7
|
|
|
8
8
|
import magic
|
|
9
9
|
import requests
|
|
@@ -83,13 +83,13 @@ class OpenCTIApiClient:
|
|
|
83
83
|
:param log_level: log level for the client
|
|
84
84
|
:type log_level: str, optional
|
|
85
85
|
:param ssl_verify: Requiring the requests to verify the TLS certificate at the server.
|
|
86
|
-
:type ssl_verify: bool, optional
|
|
86
|
+
:type ssl_verify: bool, str, optional
|
|
87
87
|
:param proxies:
|
|
88
88
|
:type proxies: dict, optional, The proxy configuration, would have `http` and `https` attributes. Defaults to {}
|
|
89
89
|
```
|
|
90
90
|
proxies: {
|
|
91
|
-
"http: "http://my_proxy:8080"
|
|
92
|
-
"https: "http://my_proxy:8080"
|
|
91
|
+
"http": "http://my_proxy:8080"
|
|
92
|
+
"https": "http://my_proxy:8080"
|
|
93
93
|
}
|
|
94
94
|
```
|
|
95
95
|
:param json_logging: format the logs as json if set to True
|
|
@@ -102,14 +102,14 @@ class OpenCTIApiClient:
|
|
|
102
102
|
|
|
103
103
|
def __init__(
|
|
104
104
|
self,
|
|
105
|
-
url,
|
|
106
|
-
token,
|
|
105
|
+
url: str,
|
|
106
|
+
token: str,
|
|
107
107
|
log_level="info",
|
|
108
|
-
ssl_verify=False,
|
|
109
|
-
proxies=None,
|
|
108
|
+
ssl_verify: Union[bool, str] = False,
|
|
109
|
+
proxies: Union[Dict[str, str], None] = None,
|
|
110
110
|
json_logging=False,
|
|
111
111
|
bundle_send_to_queue=True,
|
|
112
|
-
cert=None,
|
|
112
|
+
cert: Union[str, Tuple[str, str], None] = None,
|
|
113
113
|
auth=None,
|
|
114
114
|
perform_health_check=True,
|
|
115
115
|
):
|
|
@@ -712,12 +712,13 @@ class OpenCTIApiClient:
|
|
|
712
712
|
data = kwargs.get("data", None)
|
|
713
713
|
mime_type = kwargs.get("mime_type", "text/plain")
|
|
714
714
|
entity_id = kwargs.get("entity_id", None)
|
|
715
|
+
file_markings = kwargs.get("file_markings", [])
|
|
715
716
|
|
|
716
717
|
if file_name is not None:
|
|
717
718
|
self.app_logger.info("Uploading a file.")
|
|
718
719
|
query = """
|
|
719
|
-
mutation UploadPending($file: Upload!, $entityId: String) {
|
|
720
|
-
uploadPending(file: $file, entityId: $entityId) {
|
|
720
|
+
mutation UploadPending($file: Upload!, $entityId: String, $file_markings: [String!]) {
|
|
721
|
+
uploadPending(file: $file, entityId: $entityId, file_markings: $file_markings) {
|
|
721
722
|
id
|
|
722
723
|
name
|
|
723
724
|
}
|
|
@@ -731,7 +732,11 @@ class OpenCTIApiClient:
|
|
|
731
732
|
mime_type = magic.from_file(file_name, mime=True)
|
|
732
733
|
return self.query(
|
|
733
734
|
query,
|
|
734
|
-
{
|
|
735
|
+
{
|
|
736
|
+
"file": (File(file_name, data, mime_type)),
|
|
737
|
+
"entityId": entity_id,
|
|
738
|
+
"file_markings": file_markings,
|
|
739
|
+
},
|
|
735
740
|
)
|
|
736
741
|
else:
|
|
737
742
|
self.app_logger.error("[upload] Missing parameter: file_name")
|
|
@@ -769,6 +769,9 @@ class OpenCTIConnectorHelper: # pylint: disable=too-many-public-methods
|
|
|
769
769
|
def __init__(self, config: Dict, playbook_compatible=False) -> None:
|
|
770
770
|
sys.excepthook = killProgramHook
|
|
771
771
|
|
|
772
|
+
# Cache
|
|
773
|
+
self.stream_collections = {}
|
|
774
|
+
|
|
772
775
|
# Load API config
|
|
773
776
|
self.config = config
|
|
774
777
|
self.opencti_url = get_config_variable(
|
|
@@ -1063,6 +1066,9 @@ class OpenCTIConnectorHelper: # pylint: disable=too-many-public-methods
|
|
|
1063
1066
|
"stream_live": True,
|
|
1064
1067
|
"stream_public": False,
|
|
1065
1068
|
}
|
|
1069
|
+
# Get from cache
|
|
1070
|
+
elif self.connect_live_stream_id in self.stream_collections:
|
|
1071
|
+
return self.stream_collections[self.connect_live_stream_id]
|
|
1066
1072
|
else:
|
|
1067
1073
|
query = """
|
|
1068
1074
|
query StreamCollection($id: String!) {
|
|
@@ -1076,6 +1082,10 @@ class OpenCTIConnectorHelper: # pylint: disable=too-many-public-methods
|
|
|
1076
1082
|
}
|
|
1077
1083
|
"""
|
|
1078
1084
|
result = self.api.query(query, {"id": self.connect_live_stream_id})
|
|
1085
|
+
# Put in cache
|
|
1086
|
+
self.stream_collections[self.connect_live_stream_id] = result["data"][
|
|
1087
|
+
"streamCollection"
|
|
1088
|
+
]
|
|
1079
1089
|
return result["data"]["streamCollection"]
|
|
1080
1090
|
else:
|
|
1081
1091
|
raise ValueError("This connector is not connected to any stream")
|
|
@@ -1581,6 +1591,7 @@ class OpenCTIConnectorHelper: # pylint: disable=too-many-public-methods
|
|
|
1581
1591
|
event_version = kwargs.get("event_version", None)
|
|
1582
1592
|
bypass_validation = kwargs.get("bypass_validation", False)
|
|
1583
1593
|
entity_id = kwargs.get("entity_id", None)
|
|
1594
|
+
file_markings = kwargs.get("file_markings", None)
|
|
1584
1595
|
file_name = kwargs.get("file_name", None)
|
|
1585
1596
|
bundle_send_to_queue = kwargs.get("send_to_queue", self.bundle_send_to_queue)
|
|
1586
1597
|
cleanup_inconsistent_bundle = kwargs.get("cleanup_inconsistent_bundle", False)
|
|
@@ -1648,6 +1659,7 @@ class OpenCTIConnectorHelper: # pylint: disable=too-many-public-methods
|
|
|
1648
1659
|
data=bundle,
|
|
1649
1660
|
mime_type="application/json",
|
|
1650
1661
|
entity_id=entity_id,
|
|
1662
|
+
file_markings=file_markings,
|
|
1651
1663
|
)
|
|
1652
1664
|
return []
|
|
1653
1665
|
elif validation_mode == "draft" and not draft_id:
|
|
@@ -256,8 +256,6 @@ class AttackPattern:
|
|
|
256
256
|
get_all = kwargs.get("getAll", False)
|
|
257
257
|
with_pagination = kwargs.get("withPagination", False)
|
|
258
258
|
with_files = kwargs.get("withFiles", False)
|
|
259
|
-
if get_all:
|
|
260
|
-
first = 500
|
|
261
259
|
|
|
262
260
|
self.opencti.app_logger.info(
|
|
263
261
|
"Listing Attack-Patterns with filters", {"filters": json.dumps(filters)}
|
|
@@ -241,8 +241,6 @@ class Campaign:
|
|
|
241
241
|
get_all = kwargs.get("getAll", False)
|
|
242
242
|
with_pagination = kwargs.get("withPagination", False)
|
|
243
243
|
with_files = kwargs.get("withFiles", False)
|
|
244
|
-
if get_all:
|
|
245
|
-
first = 100
|
|
246
244
|
|
|
247
245
|
self.opencti.app_logger.info(
|
|
248
246
|
"Listing Campaigns with filters", {"filters": json.dumps(filters)}
|
|
@@ -467,7 +467,7 @@ class CaseIncident:
|
|
|
467
467
|
|
|
468
468
|
"""
|
|
469
469
|
List Case Incident objects
|
|
470
|
-
|
|
470
|
+
|
|
471
471
|
:param filters: the filters to apply
|
|
472
472
|
:param search: the search keyword
|
|
473
473
|
:param first: return the first n rows from the after ID (or the beginning if not set)
|
|
@@ -486,8 +486,6 @@ class CaseIncident:
|
|
|
486
486
|
get_all = kwargs.get("getAll", False)
|
|
487
487
|
with_pagination = kwargs.get("withPagination", False)
|
|
488
488
|
with_files = kwargs.get("withFiles", False)
|
|
489
|
-
if get_all:
|
|
490
|
-
first = 500
|
|
491
489
|
|
|
492
490
|
self.opencti.app_logger.info(
|
|
493
491
|
"Listing Case Incidents with filters", {"filters": json.dumps(filters)}
|
|
@@ -206,7 +206,7 @@ class CaseRfi:
|
|
|
206
206
|
}
|
|
207
207
|
... on StixCyberObservable {
|
|
208
208
|
observable_value
|
|
209
|
-
}
|
|
209
|
+
}
|
|
210
210
|
... on StixCoreRelationship {
|
|
211
211
|
standard_id
|
|
212
212
|
spec_version
|
|
@@ -417,7 +417,7 @@ class CaseRfi:
|
|
|
417
417
|
}
|
|
418
418
|
... on StixCyberObservable {
|
|
419
419
|
observable_value
|
|
420
|
-
}
|
|
420
|
+
}
|
|
421
421
|
... on StixCoreRelationship {
|
|
422
422
|
standard_id
|
|
423
423
|
spec_version
|
|
@@ -465,7 +465,7 @@ class CaseRfi:
|
|
|
465
465
|
|
|
466
466
|
"""
|
|
467
467
|
List Case Rfi objects
|
|
468
|
-
|
|
468
|
+
|
|
469
469
|
:param filters: the filters to apply
|
|
470
470
|
:param search: the search keyword
|
|
471
471
|
:param first: return the first n rows from the after ID (or the beginning if not set)
|
|
@@ -484,8 +484,6 @@ class CaseRfi:
|
|
|
484
484
|
get_all = kwargs.get("getAll", False)
|
|
485
485
|
with_pagination = kwargs.get("withPagination", False)
|
|
486
486
|
with_files = kwargs.get("withFiles", False)
|
|
487
|
-
if get_all:
|
|
488
|
-
first = 500
|
|
489
487
|
|
|
490
488
|
self.opencti.app_logger.info(
|
|
491
489
|
"Listing Case Rfis with filters", {"filters": json.dumps(filters)}
|
|
@@ -206,7 +206,7 @@ class CaseRft:
|
|
|
206
206
|
}
|
|
207
207
|
... on StixCyberObservable {
|
|
208
208
|
observable_value
|
|
209
|
-
}
|
|
209
|
+
}
|
|
210
210
|
... on StixCoreRelationship {
|
|
211
211
|
standard_id
|
|
212
212
|
spec_version
|
|
@@ -417,7 +417,7 @@ class CaseRft:
|
|
|
417
417
|
}
|
|
418
418
|
... on StixCyberObservable {
|
|
419
419
|
observable_value
|
|
420
|
-
}
|
|
420
|
+
}
|
|
421
421
|
... on StixCoreRelationship {
|
|
422
422
|
standard_id
|
|
423
423
|
spec_version
|
|
@@ -465,7 +465,7 @@ class CaseRft:
|
|
|
465
465
|
|
|
466
466
|
"""
|
|
467
467
|
List Case Rft objects
|
|
468
|
-
|
|
468
|
+
|
|
469
469
|
:param filters: the filters to apply
|
|
470
470
|
:param search: the search keyword
|
|
471
471
|
:param first: return the first n rows from the after ID (or the beginning if not set)
|
|
@@ -484,8 +484,6 @@ class CaseRft:
|
|
|
484
484
|
get_all = kwargs.get("getAll", False)
|
|
485
485
|
with_pagination = kwargs.get("withPagination", False)
|
|
486
486
|
with_files = kwargs.get("withFiles", False)
|
|
487
|
-
if get_all:
|
|
488
|
-
first = 500
|
|
489
487
|
self.opencti.app_logger.info(
|
|
490
488
|
"Listing Case Rfts with filters", {"filters": json.dumps(filters)}
|
|
491
489
|
)
|
|
@@ -237,8 +237,6 @@ class Channel:
|
|
|
237
237
|
get_all = kwargs.get("getAll", False)
|
|
238
238
|
with_pagination = kwargs.get("withPagination", False)
|
|
239
239
|
with_files = kwargs.get("withFiles", False)
|
|
240
|
-
if get_all:
|
|
241
|
-
first = 100
|
|
242
240
|
|
|
243
241
|
self.opencti.app_logger.info(
|
|
244
242
|
"Listing Channels with filters", {"filters": json.dumps(filters)}
|
|
@@ -229,8 +229,6 @@ class CourseOfAction:
|
|
|
229
229
|
get_all = kwargs.get("getAll", False)
|
|
230
230
|
with_pagination = kwargs.get("withPagination", False)
|
|
231
231
|
with_files = kwargs.get("withFiles", False)
|
|
232
|
-
if get_all:
|
|
233
|
-
first = 100
|
|
234
232
|
|
|
235
233
|
self.opencti.app_logger.info(
|
|
236
234
|
"Listing Courses-Of-Action with filters", {"filters": json.dumps(filters)}
|
|
@@ -271,8 +271,6 @@ class DataComponent:
|
|
|
271
271
|
get_all = kwargs.get("getAll", False)
|
|
272
272
|
with_pagination = kwargs.get("withPagination", False)
|
|
273
273
|
with_files = kwargs.get("withFiles", False)
|
|
274
|
-
if get_all:
|
|
275
|
-
first = 100
|
|
276
274
|
|
|
277
275
|
self.opencti.app_logger.info(
|
|
278
276
|
"Listing Data-Components with filters", {"filters": json.dumps(filters)}
|
|
@@ -229,8 +229,6 @@ class DataSource:
|
|
|
229
229
|
get_all = kwargs.get("getAll", False)
|
|
230
230
|
with_pagination = kwargs.get("withPagination", False)
|
|
231
231
|
with_files = kwargs.get("withFiles", False)
|
|
232
|
-
if get_all:
|
|
233
|
-
first = 100
|
|
234
232
|
|
|
235
233
|
self.opencti.app_logger.info(
|
|
236
234
|
"Listing Data-Sources with filters", {"filters": json.dumps(filters)}
|
|
@@ -241,8 +241,6 @@ class Event:
|
|
|
241
241
|
get_all = kwargs.get("getAll", False)
|
|
242
242
|
with_pagination = kwargs.get("withPagination", False)
|
|
243
243
|
with_files = kwargs.get("withFiles", False)
|
|
244
|
-
if get_all:
|
|
245
|
-
first = 100
|
|
246
244
|
|
|
247
245
|
self.opencti.app_logger.info(
|
|
248
246
|
"Listing Events with filters", {"filters": json.dumps(filters)}
|
|
@@ -93,8 +93,6 @@ class ExternalReference:
|
|
|
93
93
|
get_all = kwargs.get("getAll", False)
|
|
94
94
|
with_pagination = kwargs.get("withPagination", False)
|
|
95
95
|
with_files = kwargs.get("withFiles", False)
|
|
96
|
-
if get_all:
|
|
97
|
-
first = 100
|
|
98
96
|
|
|
99
97
|
self.opencti.app_logger.info(
|
|
100
98
|
"Listing External-Reference with filters", {"filters": json.dumps(filters)}
|
|
@@ -444,8 +444,6 @@ class Feedback:
|
|
|
444
444
|
get_all = kwargs.get("getAll", False)
|
|
445
445
|
with_pagination = kwargs.get("withPagination", False)
|
|
446
446
|
with_files = kwargs.get("withFiles", False)
|
|
447
|
-
if get_all:
|
|
448
|
-
first = 500
|
|
449
447
|
|
|
450
448
|
self.opencti.app_logger.info(
|
|
451
449
|
"Listing Feedbacks with filters", {"filters": json.dumps(filters)}
|
|
@@ -434,8 +434,6 @@ class Grouping:
|
|
|
434
434
|
get_all = kwargs.get("getAll", False)
|
|
435
435
|
with_pagination = kwargs.get("withPagination", False)
|
|
436
436
|
with_files = kwargs.get("withFiles", False)
|
|
437
|
-
if get_all:
|
|
438
|
-
first = 100
|
|
439
437
|
|
|
440
438
|
self.opencti.app_logger.info(
|
|
441
439
|
"Listing Groupings with filters", {"filters": json.dumps(filters)}
|
|
@@ -258,8 +258,6 @@ class Identity:
|
|
|
258
258
|
get_all = kwargs.get("getAll", False)
|
|
259
259
|
with_pagination = kwargs.get("withPagination", False)
|
|
260
260
|
with_files = kwargs.get("withFiles", False)
|
|
261
|
-
if get_all:
|
|
262
|
-
first = 500
|
|
263
261
|
|
|
264
262
|
self.opencti.app_logger.info(
|
|
265
263
|
"Listing Identities with filters", {"filters": json.dumps(filters)}
|
|
@@ -250,8 +250,6 @@ class Incident:
|
|
|
250
250
|
get_all = kwargs.get("getAll", False)
|
|
251
251
|
with_pagination = kwargs.get("withPagination", False)
|
|
252
252
|
with_files = kwargs.get("withFiles", False)
|
|
253
|
-
if get_all:
|
|
254
|
-
first = 100
|
|
255
253
|
|
|
256
254
|
self.opencti.app_logger.info(
|
|
257
255
|
"Listing Incidents with filters", {"filters": json.dumps(filters)}
|
|
@@ -270,8 +270,6 @@ class Infrastructure:
|
|
|
270
270
|
get_all = kwargs.get("getAll", False)
|
|
271
271
|
with_pagination = kwargs.get("withPagination", False)
|
|
272
272
|
with_files = kwargs.get("withFiles", False)
|
|
273
|
-
if get_all:
|
|
274
|
-
first = 500
|
|
275
273
|
|
|
276
274
|
self.opencti.app_logger.info(
|
|
277
275
|
"Listing Infrastructures with filters", {"filters": json.dumps(filters)}
|
|
@@ -247,8 +247,6 @@ class IntrusionSet:
|
|
|
247
247
|
get_all = kwargs.get("getAll", False)
|
|
248
248
|
with_pagination = kwargs.get("withPagination", False)
|
|
249
249
|
with_files = kwargs.get("withFiles", False)
|
|
250
|
-
if get_all:
|
|
251
|
-
first = 500
|
|
252
250
|
|
|
253
251
|
self.opencti.app_logger.info(
|
|
254
252
|
"Listing Intrusion-Sets with filters", {"filters": json.dumps(filters)}
|
|
@@ -48,10 +48,7 @@ class KillChainPhase:
|
|
|
48
48
|
order_by = kwargs.get("orderBy", None)
|
|
49
49
|
order_mode = kwargs.get("orderMode", None)
|
|
50
50
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
51
|
-
get_all = kwargs.get("getAll", False)
|
|
52
51
|
with_pagination = kwargs.get("withPagination", False)
|
|
53
|
-
if get_all:
|
|
54
|
-
first = 500
|
|
55
52
|
|
|
56
53
|
self.opencti.app_logger.info(
|
|
57
54
|
"Listing Kill-Chain-Phase with filters", {"filters": json.dumps(filters)}
|
|
@@ -44,8 +44,6 @@ class Label:
|
|
|
44
44
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
45
45
|
get_all = kwargs.get("getAll", False)
|
|
46
46
|
with_pagination = kwargs.get("withPagination", False)
|
|
47
|
-
if get_all:
|
|
48
|
-
first = 100
|
|
49
47
|
|
|
50
48
|
self.opencti.app_logger.info(
|
|
51
49
|
"Listing Labels with filters", {"filters": json.dumps(filters)}
|
|
@@ -249,8 +249,6 @@ class Language:
|
|
|
249
249
|
get_all = kwargs.get("getAll", False)
|
|
250
250
|
with_pagination = kwargs.get("withPagination", False)
|
|
251
251
|
with_files = kwargs.get("withFiles", False)
|
|
252
|
-
if get_all:
|
|
253
|
-
first = 100
|
|
254
252
|
|
|
255
253
|
self.opencti.app_logger.info(
|
|
256
254
|
"Listing Languages with filters", {"filters": json.dumps(filters)}
|
|
@@ -257,11 +257,8 @@ class Location:
|
|
|
257
257
|
order_by = kwargs.get("orderBy", None)
|
|
258
258
|
order_mode = kwargs.get("orderMode", None)
|
|
259
259
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
260
|
-
get_all = kwargs.get("getAll", False)
|
|
261
260
|
with_pagination = kwargs.get("withPagination", False)
|
|
262
261
|
with_files = kwargs.get("withFiles", False)
|
|
263
|
-
if get_all:
|
|
264
|
-
first = 500
|
|
265
262
|
|
|
266
263
|
self.opencti.app_logger.info(
|
|
267
264
|
"Listing Locations with filters", {"filters": json.dumps(filters)}
|
|
@@ -275,8 +275,6 @@ class Malware:
|
|
|
275
275
|
get_all = kwargs.get("getAll", False)
|
|
276
276
|
with_pagination = kwargs.get("withPagination", False)
|
|
277
277
|
with_files = kwargs.get("withFiles", False)
|
|
278
|
-
if get_all:
|
|
279
|
-
first = 500
|
|
280
278
|
|
|
281
279
|
self.opencti.app_logger.info(
|
|
282
280
|
"Listing Malwares with filters", {"filters": json.dumps(filters)}
|
|
@@ -255,8 +255,6 @@ class MalwareAnalysis:
|
|
|
255
255
|
get_all = kwargs.get("getAll", False)
|
|
256
256
|
with_pagination = kwargs.get("withPagination", False)
|
|
257
257
|
with_files = kwargs.get("withFiles", False)
|
|
258
|
-
if get_all:
|
|
259
|
-
first = 500
|
|
260
258
|
|
|
261
259
|
self.opencti.app_logger.info(
|
|
262
260
|
"Listing Malware analyses with filters", {"filters": json.dumps(filters)}
|
|
@@ -66,10 +66,7 @@ class MarkingDefinition:
|
|
|
66
66
|
order_by = kwargs.get("orderBy", None)
|
|
67
67
|
order_mode = kwargs.get("orderMode", None)
|
|
68
68
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
69
|
-
get_all = kwargs.get("getAll", False)
|
|
70
69
|
with_pagination = kwargs.get("withPagination", False)
|
|
71
|
-
if get_all:
|
|
72
|
-
first = 500
|
|
73
70
|
|
|
74
71
|
self.opencti.app_logger.info(
|
|
75
72
|
"Listing Marking-Definitions with filters", {"filters": json.dumps(filters)}
|
|
@@ -227,8 +227,6 @@ class Narrative:
|
|
|
227
227
|
get_all = kwargs.get("getAll", False)
|
|
228
228
|
with_pagination = kwargs.get("withPagination", False)
|
|
229
229
|
with_files = kwargs.get("withFiles", False)
|
|
230
|
-
if get_all:
|
|
231
|
-
first = 100
|
|
232
230
|
|
|
233
231
|
self.opencti.app_logger.info(
|
|
234
232
|
"Listing Narratives with filters", {"filters": json.dumps(filters)}
|
|
@@ -473,8 +473,6 @@ class Note:
|
|
|
473
473
|
get_all = kwargs.get("getAll", False)
|
|
474
474
|
with_pagination = kwargs.get("withPagination", False)
|
|
475
475
|
with_files = kwargs.get("withFiles", False)
|
|
476
|
-
if get_all:
|
|
477
|
-
first = 100
|
|
478
476
|
|
|
479
477
|
self.opencti.app_logger.info(
|
|
480
478
|
"Listing Notes with filters", {"filters": json.dumps(filters)}
|
|
@@ -190,7 +190,7 @@ class ObservedData:
|
|
|
190
190
|
}
|
|
191
191
|
... on StixCyberObservable {
|
|
192
192
|
observable_value
|
|
193
|
-
}
|
|
193
|
+
}
|
|
194
194
|
... on StixCoreRelationship {
|
|
195
195
|
standard_id
|
|
196
196
|
spec_version
|
|
@@ -202,7 +202,7 @@ class ObservedData:
|
|
|
202
202
|
spec_version
|
|
203
203
|
created_at
|
|
204
204
|
updated_at
|
|
205
|
-
}
|
|
205
|
+
}
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
}
|
|
@@ -401,7 +401,7 @@ class ObservedData:
|
|
|
401
401
|
}
|
|
402
402
|
... on StixCyberObservable {
|
|
403
403
|
observable_value
|
|
404
|
-
}
|
|
404
|
+
}
|
|
405
405
|
... on StixCoreRelationship {
|
|
406
406
|
standard_id
|
|
407
407
|
spec_version
|
|
@@ -413,7 +413,7 @@ class ObservedData:
|
|
|
413
413
|
spec_version
|
|
414
414
|
created_at
|
|
415
415
|
updated_at
|
|
416
|
-
}
|
|
416
|
+
}
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
419
|
}
|
|
@@ -461,11 +461,8 @@ class ObservedData:
|
|
|
461
461
|
order_by = kwargs.get("orderBy", None)
|
|
462
462
|
order_mode = kwargs.get("orderMode", None)
|
|
463
463
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
464
|
-
get_all = kwargs.get("getAll", False)
|
|
465
464
|
with_pagination = kwargs.get("withPagination", False)
|
|
466
465
|
with_files = kwargs.get("withFiles", False)
|
|
467
|
-
if get_all:
|
|
468
|
-
first = 500
|
|
469
466
|
|
|
470
467
|
self.opencti.app_logger.info(
|
|
471
468
|
"Listing ObservedDatas with filters", {"filters": json.dumps(filters)}
|
|
@@ -250,8 +250,6 @@ class Opinion:
|
|
|
250
250
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
251
251
|
get_all = kwargs.get("getAll", False)
|
|
252
252
|
with_pagination = kwargs.get("withPagination", False)
|
|
253
|
-
if get_all:
|
|
254
|
-
first = 100
|
|
255
253
|
|
|
256
254
|
self.opencti.app_logger.info(
|
|
257
255
|
"Listing Opinions with filters", {"filters": json.dumps(filters)}
|
|
@@ -504,8 +504,6 @@ class Report:
|
|
|
504
504
|
get_all = kwargs.get("getAll", False)
|
|
505
505
|
with_pagination = kwargs.get("withPagination", False)
|
|
506
506
|
with_files = kwargs.get("withFiles", False)
|
|
507
|
-
if get_all:
|
|
508
|
-
first = 100
|
|
509
507
|
|
|
510
508
|
self.opencti.app_logger.info(
|
|
511
509
|
"Listing Reports with filters",
|
|
@@ -1340,8 +1340,6 @@ class StixCoreObject:
|
|
|
1340
1340
|
get_all = kwargs.get("getAll", False)
|
|
1341
1341
|
with_pagination = kwargs.get("withPagination", False)
|
|
1342
1342
|
with_files = kwargs.get("withFiles", False)
|
|
1343
|
-
if get_all:
|
|
1344
|
-
first = 100
|
|
1345
1343
|
|
|
1346
1344
|
self.opencti.app_logger.info(
|
|
1347
1345
|
"Listing Stix-Core-Objects with filters", {"filters": json.dumps(filters)}
|
|
@@ -408,8 +408,6 @@ class StixCoreRelationship:
|
|
|
408
408
|
get_all = kwargs.get("getAll", False)
|
|
409
409
|
with_pagination = kwargs.get("withPagination", False)
|
|
410
410
|
search = kwargs.get("search", None)
|
|
411
|
-
if get_all:
|
|
412
|
-
first = 100
|
|
413
411
|
|
|
414
412
|
self.opencti.app_logger.info(
|
|
415
413
|
"Listing stix_core_relationships",
|
|
@@ -48,9 +48,6 @@ class StixCyberObservable(StixCyberObservableDeprecatedMixin):
|
|
|
48
48
|
with_pagination = kwargs.get("withPagination", False)
|
|
49
49
|
with_files = kwargs.get("withFiles", False)
|
|
50
50
|
|
|
51
|
-
if get_all:
|
|
52
|
-
first = 100
|
|
53
|
-
|
|
54
51
|
self.opencti.app_logger.info(
|
|
55
52
|
"Listing StixCyberObservables with filters",
|
|
56
53
|
{"filters": json.dumps(filters)},
|
|
@@ -1030,8 +1030,6 @@ class StixDomainObject:
|
|
|
1030
1030
|
get_all = kwargs.get("getAll", False)
|
|
1031
1031
|
with_pagination = kwargs.get("withPagination", False)
|
|
1032
1032
|
with_files = kwargs.get("withFiles", False)
|
|
1033
|
-
if get_all:
|
|
1034
|
-
first = 100
|
|
1035
1033
|
|
|
1036
1034
|
self.opencti.app_logger.info(
|
|
1037
1035
|
"Listing Stix-Domain-Objects with filters", {"filters": json.dumps(filters)}
|
|
@@ -24,13 +24,13 @@ class StixNestedRefRelationship:
|
|
|
24
24
|
standard_id
|
|
25
25
|
entity_type
|
|
26
26
|
parent_types
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
28
|
... on StixSightingRelationship {
|
|
29
29
|
id
|
|
30
30
|
standard_id
|
|
31
31
|
entity_type
|
|
32
32
|
parent_types
|
|
33
|
-
}
|
|
33
|
+
}
|
|
34
34
|
... on StixCyberObservable {
|
|
35
35
|
observable_value
|
|
36
36
|
}
|
|
@@ -47,13 +47,13 @@ class StixNestedRefRelationship:
|
|
|
47
47
|
standard_id
|
|
48
48
|
entity_type
|
|
49
49
|
parent_types
|
|
50
|
-
}
|
|
50
|
+
}
|
|
51
51
|
... on StixSightingRelationship {
|
|
52
52
|
id
|
|
53
53
|
standard_id
|
|
54
54
|
entity_type
|
|
55
55
|
parent_types
|
|
56
|
-
}
|
|
56
|
+
}
|
|
57
57
|
... on StixCyberObservable {
|
|
58
58
|
observable_value
|
|
59
59
|
}
|
|
@@ -92,10 +92,7 @@ class StixNestedRefRelationship:
|
|
|
92
92
|
order_by = kwargs.get("orderBy", None)
|
|
93
93
|
order_mode = kwargs.get("orderMode", None)
|
|
94
94
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
95
|
-
get_all = kwargs.get("getAll", False)
|
|
96
95
|
with_pagination = kwargs.get("withPagination", False)
|
|
97
|
-
if get_all:
|
|
98
|
-
first = 500
|
|
99
96
|
|
|
100
97
|
self.opencti.app_logger.info(
|
|
101
98
|
"Listing stix_nested_ref_relationships",
|
|
@@ -340,8 +340,6 @@ class StixSightingRelationship:
|
|
|
340
340
|
get_all = kwargs.get("getAll", False)
|
|
341
341
|
with_pagination = kwargs.get("withPagination", False)
|
|
342
342
|
search = kwargs.get("search", None)
|
|
343
|
-
if get_all:
|
|
344
|
-
first = 100
|
|
345
343
|
|
|
346
344
|
self.opencti.app_logger.info(
|
|
347
345
|
"Listing stix_sighting with {type: stix_sighting}",
|
|
@@ -257,8 +257,6 @@ class Task:
|
|
|
257
257
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
258
258
|
get_all = kwargs.get("getAll", False)
|
|
259
259
|
with_pagination = kwargs.get("withPagination", False)
|
|
260
|
-
if get_all:
|
|
261
|
-
first = 500
|
|
262
260
|
|
|
263
261
|
self.opencti.app_logger.info(
|
|
264
262
|
"Listing Tasks with filters", {"filters": json.dumps(filters)}
|
|
@@ -168,7 +168,6 @@ class ThreatActor:
|
|
|
168
168
|
:param str after: (optional) OpenCTI object ID of the first row for pagination
|
|
169
169
|
:param str orderBy: (optional) the field to order the response on
|
|
170
170
|
:param bool orderMode: (optional) either "`asc`" or "`desc`"
|
|
171
|
-
:param bool getAll: (optional) switch to return all entries (be careful to use this without any other filters)
|
|
172
171
|
:param bool withPagination: (optional) switch to use pagination
|
|
173
172
|
"""
|
|
174
173
|
|
|
@@ -179,10 +178,7 @@ class ThreatActor:
|
|
|
179
178
|
order_by = kwargs.get("orderBy", None)
|
|
180
179
|
order_mode = kwargs.get("orderMode", None)
|
|
181
180
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
182
|
-
get_all = kwargs.get("getAll", False)
|
|
183
181
|
with_pagination = kwargs.get("withPagination", False)
|
|
184
|
-
if get_all:
|
|
185
|
-
first = 500
|
|
186
182
|
|
|
187
183
|
self.opencti.app_logger.info(
|
|
188
184
|
"Listing Threat-Actors with filters", {"filters": json.dumps(filters)}
|
|
@@ -161,7 +161,6 @@ class ThreatActorGroup:
|
|
|
161
161
|
:param str after: (optional) OpenCTI object ID of the first row for pagination
|
|
162
162
|
:param str orderBy: (optional) the field to order the response on
|
|
163
163
|
:param bool orderMode: (optional) either "`asc`" or "`desc`"
|
|
164
|
-
:param bool getAll: (optional) switch to return all entries (be careful to use this without any other filters)
|
|
165
164
|
:param bool withPagination: (optional) switch to use pagination
|
|
166
165
|
"""
|
|
167
166
|
|
|
@@ -172,10 +171,7 @@ class ThreatActorGroup:
|
|
|
172
171
|
order_by = kwargs.get("orderBy", None)
|
|
173
172
|
order_mode = kwargs.get("orderMode", None)
|
|
174
173
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
175
|
-
get_all = kwargs.get("getAll", False)
|
|
176
174
|
with_pagination = kwargs.get("withPagination", False)
|
|
177
|
-
if get_all:
|
|
178
|
-
first = 500
|
|
179
175
|
|
|
180
176
|
self.opencti.app_logger.info(
|
|
181
177
|
"Listing Threat-Actors-Group with filters", {"filters": json.dumps(filters)}
|
|
@@ -161,7 +161,6 @@ class ThreatActorIndividual:
|
|
|
161
161
|
:param str after: (optional) OpenCTI object ID of the first row for pagination
|
|
162
162
|
:param str orderBy: (optional) the field to order the response on
|
|
163
163
|
:param bool orderMode: (optional) either "`asc`" or "`desc`"
|
|
164
|
-
:param bool getAll: (optional) switch to return all entries (be careful to use this without any other filters)
|
|
165
164
|
:param bool withPagination: (optional) switch to use pagination
|
|
166
165
|
"""
|
|
167
166
|
|
|
@@ -172,10 +171,7 @@ class ThreatActorIndividual:
|
|
|
172
171
|
order_by = kwargs.get("orderBy", None)
|
|
173
172
|
order_mode = kwargs.get("orderMode", None)
|
|
174
173
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
175
|
-
get_all = kwargs.get("getAll", False)
|
|
176
174
|
with_pagination = kwargs.get("withPagination", False)
|
|
177
|
-
if get_all:
|
|
178
|
-
first = 500
|
|
179
175
|
|
|
180
176
|
self.opencti.app_logger.info(
|
|
181
177
|
"Listing Threat-Actors-Individual with filters",
|
|
@@ -158,8 +158,6 @@ class Tool:
|
|
|
158
158
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
159
159
|
get_all = kwargs.get("getAll", False)
|
|
160
160
|
with_pagination = kwargs.get("withPagination", False)
|
|
161
|
-
if get_all:
|
|
162
|
-
first = 100
|
|
163
161
|
|
|
164
162
|
self.opencti.app_logger.info(
|
|
165
163
|
"Listing Tools with filters", {"filters": json.dumps(filters)}
|
|
@@ -155,8 +155,6 @@ class Vulnerability:
|
|
|
155
155
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
156
156
|
get_all = kwargs.get("getAll", False)
|
|
157
157
|
with_pagination = kwargs.get("withPagination", False)
|
|
158
|
-
if get_all:
|
|
159
|
-
first = 100
|
|
160
158
|
|
|
161
159
|
self.opencti.app_logger.info(
|
|
162
160
|
"Listing Vulnerabilities with filters", {"filters": json.dumps(filters)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import datetime
|
|
2
1
|
import logging
|
|
2
|
+
from datetime import datetime, timezone
|
|
3
3
|
|
|
4
4
|
from pythonjsonlogger import jsonlogger
|
|
5
5
|
|
|
@@ -9,8 +9,8 @@ class CustomJsonFormatter(jsonlogger.JsonFormatter):
|
|
|
9
9
|
super(CustomJsonFormatter, self).add_fields(log_record, record, message_dict)
|
|
10
10
|
if not log_record.get("timestamp"):
|
|
11
11
|
# This doesn't use record.created, so it is slightly off
|
|
12
|
-
now = datetime.
|
|
13
|
-
log_record["timestamp"] = now
|
|
12
|
+
now = datetime.now(tz=timezone.utc)
|
|
13
|
+
log_record["timestamp"] = now.strftime("%Y-%m-%dT%H:%M:%S.%fZ")
|
|
14
14
|
if log_record.get("level"):
|
|
15
15
|
log_record["level"] = log_record["level"].upper()
|
|
16
16
|
else:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: pycti
|
|
3
|
-
Version: 6.5.
|
|
3
|
+
Version: 6.5.3
|
|
4
4
|
Summary: Python API client for OpenCTI.
|
|
5
5
|
Home-page: https://github.com/OpenCTI-Platform/client-python
|
|
6
6
|
Author: Filigran
|
|
@@ -23,7 +23,7 @@ Description-Content-Type: text/markdown
|
|
|
23
23
|
License-File: LICENSE
|
|
24
24
|
Requires-Dist: datefinder~=0.7.3
|
|
25
25
|
Requires-Dist: pika~=1.3.0
|
|
26
|
-
Requires-Dist: pydantic
|
|
26
|
+
Requires-Dist: pydantic<2.11.0,>=2.8.2
|
|
27
27
|
Requires-Dist: python-magic~=0.4.27; sys_platform == "linux" or sys_platform == "darwin"
|
|
28
28
|
Requires-Dist: python-magic-bin~=0.4.14; sys_platform == "win32"
|
|
29
29
|
Requires-Dist: python_json_logger~=2.0.4
|
|
@@ -32,16 +32,16 @@ Requires-Dist: requests~=2.32.2
|
|
|
32
32
|
Requires-Dist: setuptools~=71.1.0
|
|
33
33
|
Requires-Dist: cachetools~=5.5.0
|
|
34
34
|
Requires-Dist: prometheus-client~=0.21.1
|
|
35
|
-
Requires-Dist: opentelemetry-api
|
|
36
|
-
Requires-Dist: opentelemetry-sdk
|
|
35
|
+
Requires-Dist: opentelemetry-api<=1.30.0,>=1.22.0
|
|
36
|
+
Requires-Dist: opentelemetry-sdk<=1.30.0,>=1.22.0
|
|
37
37
|
Requires-Dist: deprecation~=2.1.0
|
|
38
38
|
Requires-Dist: filigran-sseclient>=1.0.2
|
|
39
39
|
Requires-Dist: stix2~=3.0.1
|
|
40
40
|
Provides-Extra: dev
|
|
41
41
|
Requires-Dist: black~=24.4.0; extra == "dev"
|
|
42
42
|
Requires-Dist: build~=1.2.1; extra == "dev"
|
|
43
|
-
Requires-Dist: isort~=
|
|
44
|
-
Requires-Dist: types-pytz~=
|
|
43
|
+
Requires-Dist: isort~=6.0.0; extra == "dev"
|
|
44
|
+
Requires-Dist: types-pytz~=2025.1.0.20250204; extra == "dev"
|
|
45
45
|
Requires-Dist: pre-commit~=3.8.0; extra == "dev"
|
|
46
46
|
Requires-Dist: pytest-cases~=3.8.0; extra == "dev"
|
|
47
47
|
Requires-Dist: pytest-cov~=5.0.0; extra == "dev"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
datefinder~=0.7.3
|
|
2
2
|
pika~=1.3.0
|
|
3
|
-
pydantic
|
|
3
|
+
pydantic<2.11.0,>=2.8.2
|
|
4
4
|
python_json_logger~=2.0.4
|
|
5
5
|
PyYAML~=6.0
|
|
6
6
|
requests~=2.32.2
|
|
7
7
|
setuptools~=71.1.0
|
|
8
8
|
cachetools~=5.5.0
|
|
9
9
|
prometheus-client~=0.21.1
|
|
10
|
-
opentelemetry-api
|
|
11
|
-
opentelemetry-sdk
|
|
10
|
+
opentelemetry-api<=1.30.0,>=1.22.0
|
|
11
|
+
opentelemetry-sdk<=1.30.0,>=1.22.0
|
|
12
12
|
deprecation~=2.1.0
|
|
13
13
|
filigran-sseclient>=1.0.2
|
|
14
14
|
stix2~=3.0.1
|
|
@@ -22,8 +22,8 @@ python-magic-bin~=0.4.14
|
|
|
22
22
|
[dev]
|
|
23
23
|
black~=24.4.0
|
|
24
24
|
build~=1.2.1
|
|
25
|
-
isort~=
|
|
26
|
-
types-pytz~=
|
|
25
|
+
isort~=6.0.0
|
|
26
|
+
types-pytz~=2025.1.0.20250204
|
|
27
27
|
pre-commit~=3.8.0
|
|
28
28
|
pytest-cases~=3.8.0
|
|
29
29
|
pytest-cov~=5.0.0
|
|
@@ -36,7 +36,7 @@ include_package_data = True
|
|
|
36
36
|
install_requires =
|
|
37
37
|
datefinder~=0.7.3
|
|
38
38
|
pika~=1.3.0
|
|
39
|
-
pydantic
|
|
39
|
+
pydantic>=2.8.2,<2.11.0
|
|
40
40
|
python-magic~=0.4.27; sys_platform == 'linux' or sys_platform == 'darwin'
|
|
41
41
|
python-magic-bin~=0.4.14; sys_platform == 'win32'
|
|
42
42
|
python_json_logger~=2.0.4
|
|
@@ -45,8 +45,8 @@ install_requires =
|
|
|
45
45
|
setuptools~=71.1.0
|
|
46
46
|
cachetools~=5.5.0
|
|
47
47
|
prometheus-client~=0.21.1
|
|
48
|
-
opentelemetry-api
|
|
49
|
-
opentelemetry-sdk
|
|
48
|
+
opentelemetry-api>=1.22.0,<=1.30.0
|
|
49
|
+
opentelemetry-sdk>=1.22.0,<=1.30.0
|
|
50
50
|
deprecation~=2.1.0
|
|
51
51
|
filigran-sseclient>=1.0.2
|
|
52
52
|
stix2~=3.0.1
|
|
@@ -55,8 +55,8 @@ install_requires =
|
|
|
55
55
|
dev =
|
|
56
56
|
black~=24.4.0
|
|
57
57
|
build~=1.2.1
|
|
58
|
-
isort~=
|
|
59
|
-
types-pytz~=
|
|
58
|
+
isort~=6.0.0
|
|
59
|
+
types-pytz~=2025.1.0.20250204
|
|
60
60
|
pre-commit~=3.8.0
|
|
61
61
|
pytest-cases~=3.8.0
|
|
62
62
|
pytest-cov~=5.0.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|