pycti 6.0.2__tar.gz → 6.0.4__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.

Files changed (73) hide show
  1. {pycti-6.0.2 → pycti-6.0.4}/PKG-INFO +1 -1
  2. {pycti-6.0.2 → pycti-6.0.4}/pycti/__init__.py +1 -1
  3. {pycti-6.0.2 → pycti-6.0.4}/pycti/api/opencti_api_client.py +3 -0
  4. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_external_reference.py +2 -2
  5. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_stix_cyber_observable.py +2 -2
  6. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_stix_domain_object.py +2 -2
  7. {pycti-6.0.2 → pycti-6.0.4}/pycti/utils/opencti_stix2.py +10 -10
  8. {pycti-6.0.2 → pycti-6.0.4}/pycti.egg-info/PKG-INFO +1 -1
  9. {pycti-6.0.2 → pycti-6.0.4}/LICENSE +0 -0
  10. {pycti-6.0.2 → pycti-6.0.4}/README.md +0 -0
  11. {pycti-6.0.2 → pycti-6.0.4}/pycti/api/__init__.py +0 -0
  12. {pycti-6.0.2 → pycti-6.0.4}/pycti/api/opencti_api_connector.py +0 -0
  13. {pycti-6.0.2 → pycti-6.0.4}/pycti/api/opencti_api_playbook.py +0 -0
  14. {pycti-6.0.2 → pycti-6.0.4}/pycti/api/opencti_api_work.py +0 -0
  15. {pycti-6.0.2 → pycti-6.0.4}/pycti/connector/__init__.py +0 -0
  16. {pycti-6.0.2 → pycti-6.0.4}/pycti/connector/opencti_connector.py +0 -0
  17. {pycti-6.0.2 → pycti-6.0.4}/pycti/connector/opencti_connector_helper.py +0 -0
  18. {pycti-6.0.2 → pycti-6.0.4}/pycti/connector/opencti_metric_handler.py +0 -0
  19. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/__init__.py +0 -0
  20. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_attack_pattern.py +0 -0
  21. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_campaign.py +0 -0
  22. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_case_incident.py +0 -0
  23. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_case_rfi.py +0 -0
  24. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_case_rft.py +0 -0
  25. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_channel.py +0 -0
  26. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_course_of_action.py +0 -0
  27. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_data_component.py +0 -0
  28. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_data_source.py +0 -0
  29. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_event.py +0 -0
  30. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_feedback.py +0 -0
  31. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_grouping.py +0 -0
  32. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_identity.py +0 -0
  33. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_incident.py +0 -0
  34. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_indicator.py +0 -0
  35. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_infrastructure.py +0 -0
  36. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_intrusion_set.py +0 -0
  37. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_kill_chain_phase.py +0 -0
  38. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_label.py +0 -0
  39. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_language.py +0 -0
  40. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_location.py +0 -0
  41. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_malware.py +0 -0
  42. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_malware_analysis.py +0 -0
  43. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_marking_definition.py +0 -0
  44. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_narrative.py +0 -0
  45. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_note.py +0 -0
  46. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_observed_data.py +0 -0
  47. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_opinion.py +0 -0
  48. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_report.py +0 -0
  49. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_stix.py +0 -0
  50. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_stix_core_object.py +0 -0
  51. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_stix_core_relationship.py +0 -0
  52. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_stix_nested_ref_relationship.py +0 -0
  53. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_stix_object_or_stix_relationship.py +0 -0
  54. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_stix_sighting_relationship.py +0 -0
  55. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_task.py +0 -0
  56. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_threat_actor.py +0 -0
  57. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_threat_actor_group.py +0 -0
  58. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_threat_actor_individual.py +0 -0
  59. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_tool.py +0 -0
  60. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_vocabulary.py +0 -0
  61. {pycti-6.0.2 → pycti-6.0.4}/pycti/entities/opencti_vulnerability.py +0 -0
  62. {pycti-6.0.2 → pycti-6.0.4}/pycti/utils/__init__.py +0 -0
  63. {pycti-6.0.2 → pycti-6.0.4}/pycti/utils/constants.py +0 -0
  64. {pycti-6.0.2 → pycti-6.0.4}/pycti/utils/opencti_logger.py +0 -0
  65. {pycti-6.0.2 → pycti-6.0.4}/pycti/utils/opencti_stix2_splitter.py +0 -0
  66. {pycti-6.0.2 → pycti-6.0.4}/pycti/utils/opencti_stix2_update.py +0 -0
  67. {pycti-6.0.2 → pycti-6.0.4}/pycti/utils/opencti_stix2_utils.py +0 -0
  68. {pycti-6.0.2 → pycti-6.0.4}/pycti.egg-info/SOURCES.txt +0 -0
  69. {pycti-6.0.2 → pycti-6.0.4}/pycti.egg-info/dependency_links.txt +0 -0
  70. {pycti-6.0.2 → pycti-6.0.4}/pycti.egg-info/requires.txt +0 -0
  71. {pycti-6.0.2 → pycti-6.0.4}/pycti.egg-info/top_level.txt +0 -0
  72. {pycti-6.0.2 → pycti-6.0.4}/pyproject.toml +0 -0
  73. {pycti-6.0.2 → pycti-6.0.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycti
3
- Version: 6.0.2
3
+ Version: 6.0.4
4
4
  Summary: Python API client for OpenCTI.
5
5
  Home-page: https://github.com/OpenCTI-Platform/client-python
6
6
  Author: Filigran
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- __version__ = "6.0.2"
2
+ __version__ = "6.0.4"
3
3
 
4
4
  from .api.opencti_api_client import OpenCTIApiClient
5
5
  from .api.opencti_api_connector import OpenCTIApiConnector
@@ -210,6 +210,9 @@ class OpenCTIApiClient:
210
210
  "true" if synchronized is True else "false"
211
211
  )
212
212
 
213
+ def set_previous_standard_header(self, previous_standard):
214
+ self.request_headers["previous-standard"] = previous_standard
215
+
213
216
  def get_request_headers(self):
214
217
  return self.request_headers
215
218
 
@@ -268,13 +268,13 @@ class ExternalReference:
268
268
  id = kwargs.get("id", None)
269
269
  file_name = kwargs.get("file_name", None)
270
270
  data = kwargs.get("data", None)
271
- version = kwargs.get("version")
271
+ version = kwargs.get("version", None)
272
272
  mime_type = kwargs.get("mime_type", "text/plain")
273
273
  no_trigger_import = kwargs.get("no_trigger_import", False)
274
274
  if id is not None and file_name is not None:
275
275
  final_file_name = os.path.basename(file_name)
276
276
  query = """
277
- mutation ExternalReferenceEdit($id: ID!, $file: Upload!, $version: String, $noTriggerImport: Boolean) {
277
+ mutation ExternalReferenceEdit($id: ID!, $file: Upload!, $version: DateTime, $noTriggerImport: Boolean) {
278
278
  externalReferenceEdit(id: $id) {
279
279
  importPush(file: $file, version: $version, noTriggerImport: $noTriggerImport) {
280
280
  id
@@ -764,13 +764,13 @@ class StixCyberObservable:
764
764
  id = kwargs.get("id", None)
765
765
  file_name = kwargs.get("file_name", None)
766
766
  data = kwargs.get("data", None)
767
- version = kwargs.get("version")
767
+ version = kwargs.get("version", None)
768
768
  mime_type = kwargs.get("mime_type", "text/plain")
769
769
  no_trigger_import = kwargs.get("no_trigger_import", False)
770
770
  if id is not None and file_name is not None:
771
771
  final_file_name = os.path.basename(file_name)
772
772
  query = """
773
- mutation StixCyberObservableEdit($id: ID!, $file: Upload!, $version: String, $noTriggerImport: Boolean) {
773
+ mutation StixCyberObservableEdit($id: ID!, $file: Upload!, $version: DateTime, $noTriggerImport: Boolean) {
774
774
  stixCyberObservableEdit(id: $id) {
775
775
  importPush(file: $file, version: $version, noTriggerImport: $noTriggerImport) {
776
776
  id
@@ -1280,13 +1280,13 @@ class StixDomainObject:
1280
1280
  id = kwargs.get("id", None)
1281
1281
  file_name = kwargs.get("file_name", None)
1282
1282
  data = kwargs.get("data", None)
1283
- version = kwargs.get("version")
1283
+ version = kwargs.get("version", None)
1284
1284
  mime_type = kwargs.get("mime_type", "text/plain")
1285
1285
  no_trigger_import = kwargs.get("no_trigger_import", False)
1286
1286
  if id is not None and file_name is not None:
1287
1287
  final_file_name = os.path.basename(file_name)
1288
1288
  query = """
1289
- mutation StixDomainObjectEdit($id: ID!, $file: Upload!, $version: String, $noTriggerImport: Boolean) {
1289
+ mutation StixDomainObjectEdit($id: ID!, $file: Upload!, $version: DateTime, $noTriggerImport: Boolean) {
1290
1290
  stixDomainObjectEdit(id: $id) {
1291
1291
  importPush(file: $file, version: $version, noTriggerImport: $noTriggerImport) {
1292
1292
  id
@@ -557,7 +557,7 @@ class OpenCTIStix2:
557
557
  self.opencti.external_reference.add_file(
558
558
  id=external_reference_id,
559
559
  file_name=file["name"],
560
- version=file["version"],
560
+ version=file.get("version", None),
561
561
  data=base64.b64decode(file["data"]),
562
562
  mime_type=file["mime_type"],
563
563
  no_trigger_import=file.get("no_trigger_import", False),
@@ -574,7 +574,7 @@ class OpenCTIStix2:
574
574
  self.opencti.external_reference.add_file(
575
575
  id=external_reference_id,
576
576
  file_name=file["name"],
577
- version=file["version"],
577
+ version=file.get("version", None),
578
578
  data=base64.b64decode(file["data"]),
579
579
  mime_type=file["mime_type"],
580
580
  no_trigger_import=file.get("no_trigger_import", False),
@@ -725,7 +725,7 @@ class OpenCTIStix2:
725
725
  self.opencti.external_reference.add_file(
726
726
  id=external_reference_id,
727
727
  file_name=file["name"],
728
- version=file["version"],
728
+ version=file.get("version", None),
729
729
  data=base64.b64decode(file["data"]),
730
730
  mime_type=file["mime_type"],
731
731
  no_trigger_import=file.get("no_trigger_import", False),
@@ -740,7 +740,7 @@ class OpenCTIStix2:
740
740
  self.opencti.external_reference.add_file(
741
741
  id=external_reference_id,
742
742
  file_name=file["name"],
743
- version=file["version"],
743
+ version=file.get("version", None),
744
744
  data=base64.b64decode(file["data"]),
745
745
  mime_type=file["mime_type"],
746
746
  no_trigger_import=file.get("no_trigger_import", False),
@@ -951,7 +951,7 @@ class OpenCTIStix2:
951
951
  self.opencti.stix_domain_object.add_file(
952
952
  id=stix_object_result["id"],
953
953
  file_name=file["name"],
954
- version=file["version"],
954
+ version=file.get("version", None),
955
955
  data=base64.b64decode(file["data"]),
956
956
  mime_type=file["mime_type"],
957
957
  no_trigger_import=file.get("no_trigger_import", False),
@@ -966,7 +966,7 @@ class OpenCTIStix2:
966
966
  self.opencti.stix_domain_object.add_file(
967
967
  id=stix_object_result["id"],
968
968
  file_name=file["name"],
969
- version=file["version"],
969
+ version=file.get("version", None),
970
970
  data=base64.b64decode(file["data"]),
971
971
  mime_type=file["mime_type"],
972
972
  no_trigger_import=file.get("no_trigger_import", False),
@@ -1074,7 +1074,7 @@ class OpenCTIStix2:
1074
1074
  self.opencti.stix_cyber_observable.add_file(
1075
1075
  id=stix_observable_result["id"],
1076
1076
  file_name=file["name"],
1077
- version=file["version"],
1077
+ version=file.get("version", None),
1078
1078
  data=base64.b64decode(file["data"]),
1079
1079
  mime_type=file["mime_type"],
1080
1080
  no_trigger_import=file.get("no_trigger_import", False),
@@ -1089,7 +1089,7 @@ class OpenCTIStix2:
1089
1089
  self.opencti.stix_cyber_observable.add_file(
1090
1090
  id=stix_observable_result["id"],
1091
1091
  file_name=file["name"],
1092
- version=file["version"],
1092
+ version=file.get("version", None),
1093
1093
  data=base64.b64decode(file["data"]),
1094
1094
  mime_type=file["mime_type"],
1095
1095
  no_trigger_import=file.get("no_trigger_import", False),
@@ -1539,7 +1539,7 @@ class OpenCTIStix2:
1539
1539
  "name": file["name"],
1540
1540
  "data": data,
1541
1541
  "mime_type": file["metaData"]["mimetype"],
1542
- "version": file["metaData"]["version"],
1542
+ "version": file["metaData"].get("version", None),
1543
1543
  }
1544
1544
  )
1545
1545
  entity["external_references"].append(external_reference)
@@ -1826,7 +1826,7 @@ class OpenCTIStix2:
1826
1826
  "name": file["name"],
1827
1827
  "data": data,
1828
1828
  "mime_type": file["metaData"]["mimetype"],
1829
- "version": file["metaData"]["version"],
1829
+ "version": file["metaData"].get("version", None),
1830
1830
  }
1831
1831
  )
1832
1832
  del entity["importFiles"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycti
3
- Version: 6.0.2
3
+ Version: 6.0.4
4
4
  Summary: Python API client for OpenCTI.
5
5
  Home-page: https://github.com/OpenCTI-Platform/client-python
6
6
  Author: Filigran
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