pycti 6.6.3__py3-none-any.whl → 6.6.4__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.

Files changed (38) hide show
  1. pycti/__init__.py +1 -1
  2. pycti/api/opencti_api_client.py +34 -18
  3. pycti/connector/opencti_connector_helper.py +8 -0
  4. pycti/entities/opencti_attack_pattern.py +16 -0
  5. pycti/entities/opencti_campaign.py +16 -0
  6. pycti/entities/opencti_case_incident.py +16 -0
  7. pycti/entities/opencti_case_rfi.py +16 -0
  8. pycti/entities/opencti_case_rft.py +16 -0
  9. pycti/entities/opencti_course_of_action.py +16 -0
  10. pycti/entities/opencti_data_component.py +16 -0
  11. pycti/entities/opencti_data_source.py +16 -0
  12. pycti/entities/opencti_event.py +16 -0
  13. pycti/entities/opencti_feedback.py +16 -0
  14. pycti/entities/opencti_grouping.py +16 -0
  15. pycti/entities/opencti_identity.py +16 -0
  16. pycti/entities/opencti_incident.py +16 -0
  17. pycti/entities/opencti_infrastructure.py +16 -0
  18. pycti/entities/opencti_intrusion_set.py +16 -0
  19. pycti/entities/opencti_language.py +16 -0
  20. pycti/entities/opencti_location.py +16 -0
  21. pycti/entities/opencti_malware.py +16 -0
  22. pycti/entities/opencti_malware_analysis.py +16 -0
  23. pycti/entities/opencti_narrative.py +16 -0
  24. pycti/entities/opencti_note.py +16 -0
  25. pycti/entities/opencti_observed_data.py +16 -0
  26. pycti/entities/opencti_opinion.py +8 -0
  27. pycti/entities/opencti_stix_core_relationship.py +8 -0
  28. pycti/entities/opencti_stix_sighting_relationship.py +8 -0
  29. pycti/entities/opencti_task.py +8 -0
  30. pycti/entities/opencti_threat_actor_group.py +8 -0
  31. pycti/entities/opencti_threat_actor_individual.py +8 -0
  32. pycti/entities/opencti_tool.py +8 -0
  33. pycti/entities/opencti_vulnerability.py +8 -0
  34. {pycti-6.6.3.dist-info → pycti-6.6.4.dist-info}/METADATA +12 -12
  35. {pycti-6.6.3.dist-info → pycti-6.6.4.dist-info}/RECORD +38 -38
  36. {pycti-6.6.3.dist-info → pycti-6.6.4.dist-info}/WHEEL +0 -0
  37. {pycti-6.6.3.dist-info → pycti-6.6.4.dist-info}/licenses/LICENSE +0 -0
  38. {pycti-6.6.3.dist-info → pycti-6.6.4.dist-info}/top_level.txt +0 -0
pycti/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- __version__ = "6.6.3"
2
+ __version__ = "6.6.4"
3
3
 
4
4
  from .api.opencti_api_client import OpenCTIApiClient
5
5
  from .api.opencti_api_connector import OpenCTIApiConnector
@@ -71,6 +71,25 @@ from pycti.utils.opencti_stix2 import OpenCTIStix2
71
71
  from pycti.utils.opencti_stix2_utils import OpenCTIStix2Utils
72
72
 
73
73
 
74
+ def build_request_headers(token: str, custom_headers: str, app_logger):
75
+ headers_dict = {
76
+ "User-Agent": "pycti/" + __version__,
77
+ "Authorization": "Bearer " + token,
78
+ }
79
+ # Build and add custom headers
80
+ if custom_headers is not None:
81
+ for header_pair in custom_headers.strip().split(";"):
82
+ if header_pair: # Skip empty header pairs
83
+ try:
84
+ key, value = header_pair.split(":", 1)
85
+ headers_dict[key.strip()] = value.strip()
86
+ except ValueError:
87
+ app_logger.warning(
88
+ "Ignored invalid header pair", {"header_pair": header_pair}
89
+ )
90
+ return headers_dict
91
+
92
+
74
93
  class File:
75
94
  def __init__(self, name, data, mime="text/plain"):
76
95
  self.name = name
@@ -99,24 +118,28 @@ class OpenCTIApiClient:
99
118
  ```
100
119
  :param json_logging: format the logs as json if set to True
101
120
  :type json_logging: bool, optional
121
+ :param bundle_send_to_queue: if bundle will be sent to queue
122
+ :type bundle_send_to_queue: bool, optional
102
123
  :param cert: If String, file path to pem file. If Tuple, a ('path_to_cert.crt', 'path_to_key.key') pair representing the certificate and the key.
103
124
  :type cert: str, tuple, optional
104
- :param auth: Add a AuthBase class with custom authentication for you OpenCTI infrastructure.
105
- :type auth: requests.auth.AuthBase, optional
125
+ :param custom_headers: Add custom headers to use with the graphql queries
126
+ :type custom_headers: str, optional must in the format header01:value;header02:value
127
+ :param perform_health_check: if client init must check the api access
128
+ :type perform_health_check: bool, optional
106
129
  """
107
130
 
108
131
  def __init__(
109
132
  self,
110
133
  url: str,
111
134
  token: str,
112
- log_level="info",
135
+ log_level: str = "info",
113
136
  ssl_verify: Union[bool, str] = False,
114
137
  proxies: Union[Dict[str, str], None] = None,
115
- json_logging=False,
116
- bundle_send_to_queue=True,
138
+ json_logging: bool = False,
139
+ bundle_send_to_queue: bool = True,
117
140
  cert: Union[str, Tuple[str, str], None] = None,
118
- auth=None,
119
- perform_health_check=True,
141
+ custom_headers: str = None,
142
+ perform_health_check: bool = True,
120
143
  ):
121
144
  """Constructor method"""
122
145
 
@@ -138,17 +161,10 @@ class OpenCTIApiClient:
138
161
  # Define API
139
162
  self.api_token = token
140
163
  self.api_url = url + "/graphql"
141
- self.request_headers = {
142
- "User-Agent": "pycti/" + __version__,
143
- "Authorization": "Bearer " + token,
144
- }
145
-
146
- if auth is not None:
147
- self.session = requests.session()
148
- self.session.auth = auth
149
- else:
150
- self.session = requests.session()
151
-
164
+ self.request_headers = build_request_headers(
165
+ token, custom_headers, self.app_logger
166
+ )
167
+ self.session = requests.session()
152
168
  # Define the dependencies
153
169
  self.work = OpenCTIApiWork(self)
154
170
  self.playbook = OpenCTIApiPlaybook(self)
@@ -902,6 +902,12 @@ class OpenCTIConnectorHelper: # pylint: disable=too-many-public-methods
902
902
  self.opencti_token = get_config_variable(
903
903
  "OPENCTI_TOKEN", ["opencti", "token"], config
904
904
  )
905
+ self.opencti_custom_headers = get_config_variable(
906
+ "OPENCTI_CUSTOM_HEADERS",
907
+ ["opencti", "custom_headers"],
908
+ config,
909
+ default=None,
910
+ )
905
911
  self.opencti_ssl_verify = get_config_variable(
906
912
  "OPENCTI_SSL_VERIFY", ["opencti", "ssl_verify"], config, False, False
907
913
  )
@@ -1078,6 +1084,7 @@ class OpenCTIConnectorHelper: # pylint: disable=too-many-public-methods
1078
1084
  self.log_level,
1079
1085
  self.opencti_ssl_verify,
1080
1086
  json_logging=self.opencti_json_logging,
1087
+ custom_headers=self.opencti_custom_headers,
1081
1088
  bundle_send_to_queue=self.bundle_send_to_queue,
1082
1089
  )
1083
1090
  # - Impersonate API that will use applicant id
@@ -1088,6 +1095,7 @@ class OpenCTIConnectorHelper: # pylint: disable=too-many-public-methods
1088
1095
  self.log_level,
1089
1096
  self.opencti_ssl_verify,
1090
1097
  json_logging=self.opencti_json_logging,
1098
+ custom_headers=self.opencti_custom_headers,
1091
1099
  bundle_send_to_queue=self.bundle_send_to_queue,
1092
1100
  )
1093
1101
  self.connector_logger = self.api.logger_class(self.connect_name)
@@ -17,6 +17,14 @@ class AttackPattern:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -109,6 +117,14 @@ class AttackPattern:
109
117
  spec_version
110
118
  created_at
111
119
  updated_at
120
+ status {
121
+ id
122
+ template {
123
+ id
124
+ name
125
+ color
126
+ }
127
+ }
112
128
  createdBy {
113
129
  ... on Identity {
114
130
  id
@@ -17,6 +17,14 @@ class Campaign:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -103,6 +111,14 @@ class Campaign:
103
111
  spec_version
104
112
  created_at
105
113
  updated_at
114
+ status {
115
+ id
116
+ template {
117
+ id
118
+ name
119
+ color
120
+ }
121
+ }
106
122
  createdBy {
107
123
  ... on Identity {
108
124
  id
@@ -17,6 +17,14 @@ class CaseIncident:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -233,6 +241,14 @@ class CaseIncident:
233
241
  spec_version
234
242
  created_at
235
243
  updated_at
244
+ status {
245
+ id
246
+ template {
247
+ id
248
+ name
249
+ color
250
+ }
251
+ }
236
252
  createdBy {
237
253
  ... on Identity {
238
254
  id
@@ -17,6 +17,14 @@ class CaseRfi:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -232,6 +240,14 @@ class CaseRfi:
232
240
  spec_version
233
241
  created_at
234
242
  updated_at
243
+ status {
244
+ id
245
+ template {
246
+ id
247
+ name
248
+ color
249
+ }
250
+ }
235
251
  createdBy {
236
252
  ... on Identity {
237
253
  id
@@ -17,6 +17,14 @@ class CaseRft:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -232,6 +240,14 @@ class CaseRft:
232
240
  spec_version
233
241
  created_at
234
242
  updated_at
243
+ status {
244
+ id
245
+ template {
246
+ id
247
+ name
248
+ color
249
+ }
250
+ }
235
251
  createdBy {
236
252
  ... on Identity {
237
253
  id
@@ -17,6 +17,14 @@ class CourseOfAction:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -96,6 +104,14 @@ class CourseOfAction:
96
104
  spec_version
97
105
  created_at
98
106
  updated_at
107
+ status {
108
+ id
109
+ template {
110
+ id
111
+ name
112
+ color
113
+ }
114
+ }
99
115
  createdBy {
100
116
  ... on Identity {
101
117
  id
@@ -17,6 +17,14 @@ class DataComponent:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -118,6 +126,14 @@ class DataComponent:
118
126
  spec_version
119
127
  created_at
120
128
  updated_at
129
+ status {
130
+ id
131
+ template {
132
+ id
133
+ name
134
+ color
135
+ }
136
+ }
121
137
  createdBy {
122
138
  ... on Identity {
123
139
  id
@@ -17,6 +17,14 @@ class DataSource:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -97,6 +105,14 @@ class DataSource:
97
105
  spec_version
98
106
  created_at
99
107
  updated_at
108
+ status {
109
+ id
110
+ template {
111
+ id
112
+ name
113
+ color
114
+ }
115
+ }
100
116
  createdBy {
101
117
  ... on Identity {
102
118
  id
@@ -17,6 +17,14 @@ class Event:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -103,6 +111,14 @@ class Event:
103
111
  spec_version
104
112
  created_at
105
113
  updated_at
114
+ status {
115
+ id
116
+ template {
117
+ id
118
+ name
119
+ color
120
+ }
121
+ }
106
122
  createdBy {
107
123
  ... on Identity {
108
124
  id
@@ -16,6 +16,14 @@ class Feedback:
16
16
  spec_version
17
17
  created_at
18
18
  updated_at
19
+ status {
20
+ id
21
+ template {
22
+ id
23
+ name
24
+ color
25
+ }
26
+ }
19
27
  createdBy {
20
28
  ... on Identity {
21
29
  id
@@ -204,6 +212,14 @@ class Feedback:
204
212
  spec_version
205
213
  created_at
206
214
  updated_at
215
+ status {
216
+ id
217
+ template {
218
+ id
219
+ name
220
+ color
221
+ }
222
+ }
207
223
  createdBy {
208
224
  ... on Identity {
209
225
  id
@@ -18,6 +18,14 @@ class Grouping:
18
18
  spec_version
19
19
  created_at
20
20
  updated_at
21
+ status {
22
+ id
23
+ template {
24
+ id
25
+ name
26
+ color
27
+ }
28
+ }
21
29
  createdBy {
22
30
  ... on Identity {
23
31
  id
@@ -197,6 +205,14 @@ class Grouping:
197
205
  spec_version
198
206
  created_at
199
207
  updated_at
208
+ status {
209
+ id
210
+ template {
211
+ id
212
+ name
213
+ color
214
+ }
215
+ }
200
216
  createdBy {
201
217
  ... on Identity {
202
218
  id
@@ -19,6 +19,14 @@ class Identity:
19
19
  spec_version
20
20
  created_at
21
21
  updated_at
22
+ status {
23
+ id
24
+ template {
25
+ id
26
+ name
27
+ color
28
+ }
29
+ }
22
30
  createdBy {
23
31
  ... on Identity {
24
32
  id
@@ -112,6 +120,14 @@ class Identity:
112
120
  spec_version
113
121
  created_at
114
122
  updated_at
123
+ status {
124
+ id
125
+ template {
126
+ id
127
+ name
128
+ color
129
+ }
130
+ }
115
131
  createdBy {
116
132
  ... on Identity {
117
133
  id
@@ -18,6 +18,14 @@ class Incident:
18
18
  spec_version
19
19
  created_at
20
20
  updated_at
21
+ status {
22
+ id
23
+ template {
24
+ id
25
+ name
26
+ color
27
+ }
28
+ }
21
29
  createdBy {
22
30
  ... on Identity {
23
31
  id
@@ -107,6 +115,14 @@ class Incident:
107
115
  spec_version
108
116
  created_at
109
117
  updated_at
118
+ status {
119
+ id
120
+ template {
121
+ id
122
+ name
123
+ color
124
+ }
125
+ }
110
126
  createdBy {
111
127
  ... on Identity {
112
128
  id
@@ -22,6 +22,14 @@ class Infrastructure:
22
22
  spec_version
23
23
  created_at
24
24
  updated_at
25
+ status {
26
+ id
27
+ template {
28
+ id
29
+ name
30
+ color
31
+ }
32
+ }
25
33
  createdBy {
26
34
  ... on Identity {
27
35
  id
@@ -117,6 +125,14 @@ class Infrastructure:
117
125
  spec_version
118
126
  created_at
119
127
  updated_at
128
+ status {
129
+ id
130
+ template {
131
+ id
132
+ name
133
+ color
134
+ }
135
+ }
120
136
  createdBy {
121
137
  ... on Identity {
122
138
  id
@@ -17,6 +17,14 @@ class IntrusionSet:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -106,6 +114,14 @@ class IntrusionSet:
106
114
  spec_version
107
115
  created_at
108
116
  updated_at
117
+ status {
118
+ id
119
+ template {
120
+ id
121
+ name
122
+ color
123
+ }
124
+ }
109
125
  createdBy {
110
126
  ... on Identity {
111
127
  id
@@ -17,6 +17,14 @@ class Language:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -120,6 +128,14 @@ class Language:
120
128
  spec_version
121
129
  created_at
122
130
  updated_at
131
+ status {
132
+ id
133
+ template {
134
+ id
135
+ name
136
+ color
137
+ }
138
+ }
123
139
  createdBy {
124
140
  ... on Identity {
125
141
  id
@@ -17,6 +17,14 @@ class Location:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -103,6 +111,14 @@ class Location:
103
111
  spec_version
104
112
  created_at
105
113
  updated_at
114
+ status {
115
+ id
116
+ template {
117
+ id
118
+ name
119
+ color
120
+ }
121
+ }
106
122
  createdBy {
107
123
  ... on Identity {
108
124
  id
@@ -17,6 +17,14 @@ class Malware:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -120,6 +128,14 @@ class Malware:
120
128
  spec_version
121
129
  created_at
122
130
  updated_at
131
+ status {
132
+ id
133
+ template {
134
+ id
135
+ name
136
+ color
137
+ }
138
+ }
123
139
  createdBy {
124
140
  ... on Identity {
125
141
  id
@@ -17,6 +17,14 @@ class MalwareAnalysis:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -108,6 +116,14 @@ class MalwareAnalysis:
108
116
  spec_version
109
117
  created_at
110
118
  updated_at
119
+ status {
120
+ id
121
+ template {
122
+ id
123
+ name
124
+ color
125
+ }
126
+ }
111
127
  createdBy {
112
128
  ... on Identity {
113
129
  id
@@ -17,6 +17,14 @@ class Narrative:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -96,6 +104,14 @@ class Narrative:
96
104
  spec_version
97
105
  created_at
98
106
  updated_at
107
+ status {
108
+ id
109
+ template {
110
+ id
111
+ name
112
+ color
113
+ }
114
+ }
99
115
  createdBy {
100
116
  ... on Identity {
101
117
  id
@@ -18,6 +18,14 @@ class Note:
18
18
  spec_version
19
19
  created_at
20
20
  updated_at
21
+ status {
22
+ id
23
+ template {
24
+ id
25
+ name
26
+ color
27
+ }
28
+ }
21
29
  createdBy {
22
30
  ... on Identity {
23
31
  id
@@ -219,6 +227,14 @@ class Note:
219
227
  spec_version
220
228
  created_at
221
229
  updated_at
230
+ status {
231
+ id
232
+ template {
233
+ id
234
+ name
235
+ color
236
+ }
237
+ }
222
238
  createdBy {
223
239
  ... on Identity {
224
240
  id
@@ -17,6 +17,14 @@ class ObservedData:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -215,6 +223,14 @@ class ObservedData:
215
223
  spec_version
216
224
  created_at
217
225
  updated_at
226
+ status {
227
+ id
228
+ template {
229
+ id
230
+ name
231
+ color
232
+ }
233
+ }
218
234
  createdBy {
219
235
  ... on Identity {
220
236
  id
@@ -17,6 +17,14 @@ class Opinion:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -26,6 +26,14 @@ class StixCoreRelationship:
26
26
  lang
27
27
  created
28
28
  modified
29
+ status {
30
+ id
31
+ template {
32
+ id
33
+ name
34
+ color
35
+ }
36
+ }
29
37
  createdBy {
30
38
  ... on Identity {
31
39
  id
@@ -25,6 +25,14 @@ class StixSightingRelationship:
25
25
  created
26
26
  modified
27
27
  confidence
28
+ status {
29
+ id
30
+ template {
31
+ id
32
+ name
33
+ color
34
+ }
35
+ }
28
36
  createdBy {
29
37
  ... on Identity {
30
38
  id
@@ -17,6 +17,14 @@ class Task:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -25,6 +25,14 @@ class ThreatActorGroup:
25
25
  spec_version
26
26
  created_at
27
27
  updated_at
28
+ status {
29
+ id
30
+ template {
31
+ id
32
+ name
33
+ color
34
+ }
35
+ }
28
36
  createdBy {
29
37
  ... on Identity {
30
38
  id
@@ -25,6 +25,14 @@ class ThreatActorIndividual:
25
25
  spec_version
26
26
  created_at
27
27
  updated_at
28
+ status {
29
+ id
30
+ template {
31
+ id
32
+ name
33
+ color
34
+ }
35
+ }
28
36
  createdBy {
29
37
  ... on Identity {
30
38
  id
@@ -17,6 +17,14 @@ class Tool:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -17,6 +17,14 @@ class Vulnerability:
17
17
  spec_version
18
18
  created_at
19
19
  updated_at
20
+ status {
21
+ id
22
+ template {
23
+ id
24
+ name
25
+ color
26
+ }
27
+ }
20
28
  createdBy {
21
29
  ... on Identity {
22
30
  id
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pycti
3
- Version: 6.6.3
3
+ Version: 6.6.4
4
4
  Summary: Python API client for OpenCTI.
5
5
  Home-page: https://github.com/OpenCTI-Platform/client-python
6
6
  Author: Filigran
@@ -23,37 +23,37 @@ 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<2.11.0,>=2.8.2
26
+ Requires-Dist: pydantic~=2.11.3
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
- Requires-Dist: python_json_logger~=2.0.4
29
+ Requires-Dist: python_json_logger~=3.3.0
30
30
  Requires-Dist: PyYAML~=6.0
31
- Requires-Dist: requests<=2.32.3,>=2.32.0
32
- Requires-Dist: setuptools~=71.1.0
31
+ Requires-Dist: requests~=2.32.3
32
+ Requires-Dist: setuptools~=78.1.0
33
33
  Requires-Dist: cachetools~=5.5.0
34
34
  Requires-Dist: prometheus-client~=0.21.1
35
- Requires-Dist: opentelemetry-api<=1.30.0,>=1.22.0
36
- Requires-Dist: opentelemetry-sdk<=1.30.0,>=1.22.0
35
+ Requires-Dist: opentelemetry-api~=1.32.0
36
+ Requires-Dist: opentelemetry-sdk~=1.32.0
37
37
  Requires-Dist: deprecation~=2.1.0
38
38
  Requires-Dist: fastapi<0.116.0,>=0.115.8
39
39
  Requires-Dist: uvicorn[standard]<0.35.0,>=0.33.0
40
40
  Requires-Dist: filigran-sseclient>=1.0.2
41
41
  Requires-Dist: stix2~=3.0.1
42
42
  Provides-Extra: dev
43
- Requires-Dist: black~=24.4.0; extra == "dev"
43
+ Requires-Dist: black~=25.1.0; extra == "dev"
44
44
  Requires-Dist: build~=1.2.1; extra == "dev"
45
45
  Requires-Dist: isort~=6.0.0; extra == "dev"
46
- Requires-Dist: types-pytz~=2025.1.0.20250204; extra == "dev"
47
- Requires-Dist: pre-commit~=3.8.0; extra == "dev"
46
+ Requires-Dist: types-pytz~=2025.2.0.20250326; extra == "dev"
47
+ Requires-Dist: pre-commit~=4.2.0; extra == "dev"
48
48
  Requires-Dist: pytest-cases~=3.8.0; extra == "dev"
49
- Requires-Dist: pytest-cov~=5.0.0; extra == "dev"
49
+ Requires-Dist: pytest-cov~=6.1.1; extra == "dev"
50
50
  Requires-Dist: pytest_randomly~=3.16.0; extra == "dev"
51
51
  Requires-Dist: pytest~=8.3.4; extra == "dev"
52
52
  Requires-Dist: types-python-dateutil~=2.9.0; extra == "dev"
53
53
  Requires-Dist: wheel~=0.45.1; extra == "dev"
54
54
  Provides-Extra: doc
55
55
  Requires-Dist: autoapi~=2.0.1; extra == "doc"
56
- Requires-Dist: sphinx-autodoc-typehints~=2.5.0; extra == "doc"
56
+ Requires-Dist: sphinx-autodoc-typehints~=3.1.0; extra == "doc"
57
57
  Requires-Dist: sphinx-rtd-theme~=3.0.2; extra == "doc"
58
58
  Dynamic: license-file
59
59
 
@@ -1,64 +1,64 @@
1
- pycti/__init__.py,sha256=jEajlndh644LBeVq9S8alWk5WJqM_nbpy3S5cyPRdsY,5538
1
+ pycti/__init__.py,sha256=8Zro3anNAFUW4usWhONa1giqwMRX2W5eOCSD9lIyc6c,5538
2
2
  pycti/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- pycti/api/opencti_api_client.py,sha256=Q9qiHyv-qXtA4z9Dut40nCNF32IzT6wQy9kqbBLbas0,33356
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
5
5
  pycti/api/opencti_api_playbook.py,sha256=456We78vESukfSOi_CctfZ9dbBJEi76EHClRc2f21Js,1628
6
6
  pycti/api/opencti_api_work.py,sha256=qIRJMCfyC9odXf7LMRg9ImYizqF2WHUOU7Ty5IUFGg8,8351
7
7
  pycti/connector/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  pycti/connector/opencti_connector.py,sha256=8lCZFvcA9-S1x6vFl756hgWAlzKfrnq-C4AIdDJr-Kg,2715
9
- pycti/connector/opencti_connector_helper.py,sha256=Mitarl0GzrSaAurZBgyZvez8xbPaHRBXtsie54bSluo,88252
9
+ pycti/connector/opencti_connector_helper.py,sha256=2KokfDLiq25vP213oC_3WhyRL7xSKINgSikvIZN-efE,88560
10
10
  pycti/connector/opencti_metric_handler.py,sha256=4jXHeJflomtHjuQ_YU0b36TG7o26vOWbY_jvU8Ezobs,3725
11
11
  pycti/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- pycti/entities/opencti_attack_pattern.py,sha256=QXJaMMZlnVCxxHGZNGSKPLmHL3TgM08aUIS8SypmIek,22193
13
- pycti/entities/opencti_campaign.py,sha256=y2kk95eQxRyE3iu1FJ-RV_hEWCg_XDUgYuWbAyakRx0,17745
12
+ pycti/entities/opencti_attack_pattern.py,sha256=IQ238VBSLKhROQRdYrxuJMBEDdbAWe0-xi9DiexbpJ4,22527
13
+ pycti/entities/opencti_campaign.py,sha256=FIweLdt2oL70m2meamV-9NDheihL8EofjQ6G1oLLqfY,18079
14
14
  pycti/entities/opencti_capability.py,sha256=mAR3AT__w6ULuAgc4T_QYxDwW9Jz8bsXQ8SDKF2BCL4,1515
15
- pycti/entities/opencti_case_incident.py,sha256=6duPTxOPkwRlygH_lF7f34cNe7oOn929w0f48lBu1ag,34397
16
- pycti/entities/opencti_case_rfi.py,sha256=v8n2iHFeTZE87tTWtrVyamlUGzZZxWym5upFyaxaFUM,34055
17
- pycti/entities/opencti_case_rft.py,sha256=yV9fqNa9juLocJtOtylLM_Nuj4dPSWkTjEmT_89szbY,34946
15
+ pycti/entities/opencti_case_incident.py,sha256=N-9fSJawE7cK-AW2mE1wvB3oXjzJrim6G_UIioIAI7M,34731
16
+ pycti/entities/opencti_case_rfi.py,sha256=L0EMPQAsWbTYHgDNS6oLAjZxNvx2LrXMe2DGhVVnQKk,34389
17
+ pycti/entities/opencti_case_rft.py,sha256=l30b1udEk6WZvypE4x9_YvhX3HjYAe_4yo0wFAqVmsw,35312
18
18
  pycti/entities/opencti_channel.py,sha256=JPVy-DYcQnyxpySaX9xP8LkXmD6WZxEEnbJDfYVTlWY,16669
19
- pycti/entities/opencti_course_of_action.py,sha256=BFxnt55QWjq88fKxAuH0nv0TFIAS4uPtotmSPMH2PfY,18653
20
- pycti/entities/opencti_data_component.py,sha256=cdFxleWYBRxiLBTqklNHJIBIid8YPGJ0FDHBr-7LgEI,19225
21
- pycti/entities/opencti_data_source.py,sha256=abXeSHtBeaViuCqh5sZRZ6PZ_QchPBfUev0tvRKRpkw,18110
22
- pycti/entities/opencti_event.py,sha256=owGBWodcYFfurAq1LxaTSj3JIMXbdvFG4cr-joy-nak,16765
19
+ pycti/entities/opencti_course_of_action.py,sha256=dVIJDF8GmuAZFchoC9EHZbyRbcEhoehOHEnUq5areME,18987
20
+ pycti/entities/opencti_data_component.py,sha256=C8FHkEmeywlZJWpU4lz9C5DFmTQC3i0Zbg6SishfM5U,19559
21
+ pycti/entities/opencti_data_source.py,sha256=OqgeOkQl463aREDb8CkFwVrYngKTNYnUTyghi8hmr8o,18444
22
+ pycti/entities/opencti_event.py,sha256=lGqxCnurlcbIXDMdKIFI2gaxjq2LNJoj8k8HGQnKHXo,17099
23
23
  pycti/entities/opencti_external_reference.py,sha256=zSsGOUajrTgSG9T0MHUzq-16XalJ0BHHC54RvBaTD48,13524
24
- pycti/entities/opencti_feedback.py,sha256=Duu3oXiQcTbJ6Tyk7k8wWt0wTK0U1Dtow1Hhht7tZeo,32376
24
+ pycti/entities/opencti_feedback.py,sha256=MyFs1CuC6_SZvjLOPyWwe6mWMoUmyoGKJ73o237j-Mg,32710
25
25
  pycti/entities/opencti_group.py,sha256=X7NfJ7-0Nwzggh9BqlA0GiKHc7v2PhmJnNQsffAeVA0,26172
26
- pycti/entities/opencti_grouping.py,sha256=WPLIt3dB4jMFkai4sDxaUq27VxjouOP1FT6LJQ8td2E,30235
27
- pycti/entities/opencti_identity.py,sha256=trQsvyzc2kIoZcZQn5GMQmutCNt7qRt39twg1EmWD2o,23759
28
- pycti/entities/opencti_incident.py,sha256=OFWUX1mtQ2lM2f15DU6FlriTZ9bXkb3Ql7oLCVLEmFk,18632
26
+ pycti/entities/opencti_grouping.py,sha256=cjXfgmRma0laGAP5j1oYMtZzVsQxrNvZ0o0-MsToufg,30569
27
+ pycti/entities/opencti_identity.py,sha256=1OveaX1uFOzMPBWbMqK0a_Bz3FT77GzOmanmQALArpg,24093
28
+ pycti/entities/opencti_incident.py,sha256=mQn2PN2enf9CYoM2vFD3f8S2hIZj8pbiBUZOQ4cMT7Q,18966
29
29
  pycti/entities/opencti_indicator.py,sha256=BcfuS9zfdjDEtbW_nKGLU_nK9KCnObsLnQiEONqvTRM,21444
30
- pycti/entities/opencti_infrastructure.py,sha256=TXnofpQskioYSKAhVzH5bj17aWk2y7rsmlG57uhoxK4,19997
31
- pycti/entities/opencti_intrusion_set.py,sha256=2vIk2jfvrTL8H83UkpdpHwax_DYhO4lUAAlz_Ec1N3k,19023
30
+ pycti/entities/opencti_infrastructure.py,sha256=-vuGCDiwWH60GmLOpUelVDPtvM9XB9DhfGDwM0S2OpI,20331
31
+ pycti/entities/opencti_intrusion_set.py,sha256=Jg-kkh6_kfyUIL6XsRYWg_d7Nejrp9kniJlI-SlAph0,19357
32
32
  pycti/entities/opencti_kill_chain_phase.py,sha256=acNzuFdxhwI_8fvZOTEHhP8fC6EGY_r6jcKpA-nKa8Q,7991
33
33
  pycti/entities/opencti_label.py,sha256=vB6Qf6isxWBgFS8-lsPE_Zb56qsrt9JyPlB2TUcHuKA,8756
34
- pycti/entities/opencti_language.py,sha256=yViPa5qJ9lC_Cd8_iYVdmiNsK42DCeStnCgJ1NclaqQ,16238
35
- pycti/entities/opencti_location.py,sha256=NmUQR1C-w--nBMON0FMpLkC_TDGYKdrmulQJffQ-W0Q,18305
36
- pycti/entities/opencti_malware.py,sha256=hK7gjUDwb3c0XyBisQTP3bZXTXRp24AXM-HgvrjZgn4,20416
37
- pycti/entities/opencti_malware_analysis.py,sha256=sHGDTiY2xSNtSyI1Wej3QlwU_fmx9-nTXUMpx-5K7sk,21754
34
+ pycti/entities/opencti_language.py,sha256=yKlc6jmVyZW35oW9leV7j4q6rlr6kTGZSkTqJ_q7ywE,16572
35
+ pycti/entities/opencti_location.py,sha256=L9KlpKoplbBH1tquNhoL9agUeph_MOFzH9sdJo3H2xc,18639
36
+ pycti/entities/opencti_malware.py,sha256=dRol60QdZMmxcMLeG48r2fq2-mpplAwQ8K5hhxTGtKg,20750
37
+ pycti/entities/opencti_malware_analysis.py,sha256=xC-sF1emTx5ym9Tq_iBTgVn6Rkx6PKZCX7LPdog2GQs,22088
38
38
  pycti/entities/opencti_marking_definition.py,sha256=JYNodKOe94a22NbNf8YNI3xhh2q-D-5JuohLMM1njlE,13695
39
- pycti/entities/opencti_narrative.py,sha256=udkZK0ezfBoX0T0zmTsRgA3-3oYGvZZURAPUuKInU6E,17107
40
- pycti/entities/opencti_note.py,sha256=QHmA-067V1kXdgWpQD3m_GtSyv7Y5d-MqpQ-PIur7Og,30732
41
- pycti/entities/opencti_observed_data.py,sha256=va8frxFZfHVGR6vgmcZpB8blATmQ-zXhy4bQEsfwAp8,31043
42
- pycti/entities/opencti_opinion.py,sha256=SHD6oepJYF7dS5yorbaEilRdnasWmjDGcnAxHZnGdfk,22459
39
+ pycti/entities/opencti_narrative.py,sha256=LtUI2g8Hle3pTGDDopt4evnRlL7ZFVyWH1JC9Z6kjmI,17441
40
+ pycti/entities/opencti_note.py,sha256=ze4tAY-XyCApnBiZl1NDfkOcd2XXXh8AjlyuGjPbWmU,31066
41
+ pycti/entities/opencti_observed_data.py,sha256=7k8g2gopNUDKqjUa6PWZH0md9D4juOGOHeUy4q4Pmn8,31377
42
+ pycti/entities/opencti_opinion.py,sha256=cTT0fuzBC9xdFGquwYSK47_Hdm5WW1ZeYFGICuKHKT8,22626
43
43
  pycti/entities/opencti_report.py,sha256=LY2wB6zcdchBD8URYoNqGWENMqnalOrmxoNKz306EDM,35303
44
44
  pycti/entities/opencti_role.py,sha256=ryfPmZ_ch2sRGgqEr6_qxChTcGoeqvHW0MvlGHkLgdw,14039
45
45
  pycti/entities/opencti_settings.py,sha256=3dArFaPPdcFTV44uGRffjHpnDE-MKIXgd496QZcH6Bw,13547
46
46
  pycti/entities/opencti_stix.py,sha256=uMheSg8i1f2Ozx2Mk0iShWzHHjj6MMWDtV5nDjVxKEE,2275
47
47
  pycti/entities/opencti_stix_core_object.py,sha256=eyhsNAWaQO5X55Wn91b21j_d6bydBxfN29s2eQHrXkI,51639
48
- pycti/entities/opencti_stix_core_relationship.py,sha256=Ab3jJhhpmGFSTA4GaC11XoAsuUnujDCc8zSvwRUEwiQ,44742
48
+ pycti/entities/opencti_stix_core_relationship.py,sha256=xHyJSW89ef9OV0PJhQRynm-c1MSO0tUFPPzQiXYeukk,44909
49
49
  pycti/entities/opencti_stix_cyber_observable.py,sha256=W_vs-VmO7HMVu7kGcL9NPuHXhioCeEwDJRBB8Q3XsBI,92049
50
50
  pycti/entities/opencti_stix_domain_object.py,sha256=-7Dec8kTqeJA_sr1KrRohgQzitOC51dOd4035EXRALw,78850
51
51
  pycti/entities/opencti_stix_nested_ref_relationship.py,sha256=7USJlfTanPFY16aFIH2YONdRakrfoBuIbB0d0I52PSM,12479
52
52
  pycti/entities/opencti_stix_object_or_stix_relationship.py,sha256=5qutzML6SyYzDhZ-QpI9Vh23hzLEs-xeFAAZOpGHZ2g,18049
53
- pycti/entities/opencti_stix_sighting_relationship.py,sha256=PO4RK3UBkA2b_xcqjiqWnLSKgvaQy291al_yunQ96h4,28736
54
- pycti/entities/opencti_task.py,sha256=rYfiUKtsSEq8A-Qa2wi7QBias1oiiHsaq3g_aLcWgl0,25290
53
+ pycti/entities/opencti_stix_sighting_relationship.py,sha256=8rncZGYnDrmqAmwVKhy4lmbYoplvxEKkpIAH3yQzGig,28903
54
+ pycti/entities/opencti_task.py,sha256=QOGuPTpH5rI80i9kwhHJ7Lgdr6bKTdAs-jwQ3kQ2Yjo,25457
55
55
  pycti/entities/opencti_threat_actor.py,sha256=vFPeo0pOYSqHBKVlWc4o8RjuP2PP0A09KWU6rsYXnvA,11201
56
- pycti/entities/opencti_threat_actor_group.py,sha256=ANvs1C_ugpYv_jNwW9mOwn4jXKTmkV7tL5wdPgt3PXA,20661
57
- pycti/entities/opencti_threat_actor_individual.py,sha256=i41YIdC7Mc5qMzdYmzItI1qVdDqngqsA1kMWGngRDGo,21011
58
- pycti/entities/opencti_tool.py,sha256=YbOp0Ur5Do7ToLzfIKGX-MtlBQf-Dt9Qtgk1lI9Q7aU,15295
56
+ pycti/entities/opencti_threat_actor_group.py,sha256=dV28sDfADoDpATyk8w2fN1ZGOoad3LCk7lnij3nFBY8,20828
57
+ pycti/entities/opencti_threat_actor_individual.py,sha256=l-E0RShOofXTZgw2HUyrDprXm8K3yvxh620hqAl-a-4,21178
58
+ pycti/entities/opencti_tool.py,sha256=GXeTfWkTgNxFnNGPsO03BOK2dsZGCp5IT-leQHiFWtw,15462
59
59
  pycti/entities/opencti_user.py,sha256=zJKhJCvC2N5-3E92uFad2CwiQhCWVAHYrgomzqBwD-s,29735
60
60
  pycti/entities/opencti_vocabulary.py,sha256=xupdHJ6TznCmvI3sVYU261SnfblSNc1nwg19MG9yrao,6499
61
- pycti/entities/opencti_vulnerability.py,sha256=ssMH7EB7WC--Nv2bq-D-_wLBGXMgP3ZLK-X8SslpVJQ,22614
61
+ pycti/entities/opencti_vulnerability.py,sha256=LAha8HDTN-r9Eddugt7-CEtTZvXw7Z2za-6fkKyvnfw,22781
62
62
  pycti/entities/indicator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
63
  pycti/entities/indicator/opencti_indicator_properties.py,sha256=iQvSeMHB-vSTzINnRxqIJfC3OgMHyhbXUVF2juU7DoE,5219
64
64
  pycti/entities/stix_cyber_observable/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -72,8 +72,8 @@ pycti/utils/opencti_stix2_identifier.py,sha256=k8L1z4q1xdCBfxqUba4YS_kT-MmbJFxYh
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.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
76
- pycti-6.6.3.dist-info/METADATA,sha256=P21J0YVasyshZig5MNgtd1itEXf--AVxItKmraSjS6A,5564
77
- pycti-6.6.3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
78
- pycti-6.6.3.dist-info/top_level.txt,sha256=cqEpxitAhHP4VgSA6xmrak6Yk9MeBkwoMTB6k7d2ZnE,6
79
- pycti-6.6.3.dist-info/RECORD,,
75
+ pycti-6.6.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
76
+ pycti-6.6.4.dist-info/METADATA,sha256=tXhyze8n-cuLEd3Lca_V_5YGWybcB4gdfBpTeIgJnK8,5530
77
+ pycti-6.6.4.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
78
+ pycti-6.6.4.dist-info/top_level.txt,sha256=cqEpxitAhHP4VgSA6xmrak6Yk9MeBkwoMTB6k7d2ZnE,6
79
+ pycti-6.6.4.dist-info/RECORD,,
File without changes