pycti 6.1.6__tar.gz → 6.1.7__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.1.6 → pycti-6.1.7}/PKG-INFO +1 -1
  2. {pycti-6.1.6 → pycti-6.1.7}/pycti/__init__.py +1 -1
  3. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_stix_core_relationship.py +7 -0
  4. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_stix_nested_ref_relationship.py +7 -0
  5. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_stix_object_or_stix_relationship.py +7 -0
  6. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_stix_sighting_relationship.py +7 -0
  7. {pycti-6.1.6 → pycti-6.1.7}/pycti.egg-info/PKG-INFO +1 -1
  8. {pycti-6.1.6 → pycti-6.1.7}/LICENSE +0 -0
  9. {pycti-6.1.6 → pycti-6.1.7}/README.md +0 -0
  10. {pycti-6.1.6 → pycti-6.1.7}/pycti/api/__init__.py +0 -0
  11. {pycti-6.1.6 → pycti-6.1.7}/pycti/api/opencti_api_client.py +0 -0
  12. {pycti-6.1.6 → pycti-6.1.7}/pycti/api/opencti_api_connector.py +0 -0
  13. {pycti-6.1.6 → pycti-6.1.7}/pycti/api/opencti_api_playbook.py +0 -0
  14. {pycti-6.1.6 → pycti-6.1.7}/pycti/api/opencti_api_work.py +0 -0
  15. {pycti-6.1.6 → pycti-6.1.7}/pycti/connector/__init__.py +0 -0
  16. {pycti-6.1.6 → pycti-6.1.7}/pycti/connector/opencti_connector.py +0 -0
  17. {pycti-6.1.6 → pycti-6.1.7}/pycti/connector/opencti_connector_helper.py +0 -0
  18. {pycti-6.1.6 → pycti-6.1.7}/pycti/connector/opencti_metric_handler.py +0 -0
  19. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/__init__.py +0 -0
  20. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_attack_pattern.py +0 -0
  21. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_campaign.py +0 -0
  22. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_case_incident.py +0 -0
  23. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_case_rfi.py +0 -0
  24. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_case_rft.py +0 -0
  25. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_channel.py +0 -0
  26. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_course_of_action.py +0 -0
  27. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_data_component.py +0 -0
  28. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_data_source.py +0 -0
  29. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_event.py +0 -0
  30. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_external_reference.py +0 -0
  31. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_feedback.py +0 -0
  32. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_grouping.py +0 -0
  33. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_identity.py +0 -0
  34. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_incident.py +0 -0
  35. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_indicator.py +0 -0
  36. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_infrastructure.py +0 -0
  37. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_intrusion_set.py +0 -0
  38. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_kill_chain_phase.py +0 -0
  39. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_label.py +0 -0
  40. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_language.py +0 -0
  41. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_location.py +0 -0
  42. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_malware.py +0 -0
  43. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_malware_analysis.py +0 -0
  44. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_marking_definition.py +0 -0
  45. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_narrative.py +0 -0
  46. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_note.py +0 -0
  47. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_observed_data.py +0 -0
  48. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_opinion.py +0 -0
  49. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_report.py +0 -0
  50. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_stix.py +0 -0
  51. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_stix_core_object.py +0 -0
  52. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_stix_cyber_observable.py +0 -0
  53. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_stix_domain_object.py +0 -0
  54. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_task.py +0 -0
  55. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_threat_actor.py +0 -0
  56. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_threat_actor_group.py +0 -0
  57. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_threat_actor_individual.py +0 -0
  58. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_tool.py +0 -0
  59. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_vocabulary.py +0 -0
  60. {pycti-6.1.6 → pycti-6.1.7}/pycti/entities/opencti_vulnerability.py +0 -0
  61. {pycti-6.1.6 → pycti-6.1.7}/pycti/utils/__init__.py +0 -0
  62. {pycti-6.1.6 → pycti-6.1.7}/pycti/utils/constants.py +0 -0
  63. {pycti-6.1.6 → pycti-6.1.7}/pycti/utils/opencti_logger.py +0 -0
  64. {pycti-6.1.6 → pycti-6.1.7}/pycti/utils/opencti_stix2.py +0 -0
  65. {pycti-6.1.6 → pycti-6.1.7}/pycti/utils/opencti_stix2_splitter.py +0 -0
  66. {pycti-6.1.6 → pycti-6.1.7}/pycti/utils/opencti_stix2_update.py +0 -0
  67. {pycti-6.1.6 → pycti-6.1.7}/pycti/utils/opencti_stix2_utils.py +0 -0
  68. {pycti-6.1.6 → pycti-6.1.7}/pycti.egg-info/SOURCES.txt +0 -0
  69. {pycti-6.1.6 → pycti-6.1.7}/pycti.egg-info/dependency_links.txt +0 -0
  70. {pycti-6.1.6 → pycti-6.1.7}/pycti.egg-info/requires.txt +0 -0
  71. {pycti-6.1.6 → pycti-6.1.7}/pycti.egg-info/top_level.txt +0 -0
  72. {pycti-6.1.6 → pycti-6.1.7}/pyproject.toml +0 -0
  73. {pycti-6.1.6 → pycti-6.1.7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycti
3
- Version: 6.1.6
3
+ Version: 6.1.7
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.1.6"
2
+ __version__ = "6.1.7"
3
3
 
4
4
  from .api.opencti_api_client import OpenCTIApiClient
5
5
  from .api.opencti_api_connector import OpenCTIApiConnector
@@ -521,6 +521,7 @@ class StixCoreRelationship:
521
521
  start_time_stop = kwargs.get("startTimeStop", None)
522
522
  stop_time_start = kwargs.get("stopTimeStart", None)
523
523
  stop_time_stop = kwargs.get("stopTimeStop", None)
524
+ filters = kwargs.get("filters", None)
524
525
  custom_attributes = kwargs.get("customAttributes", None)
525
526
  if id is not None:
526
527
  self.opencti.app_logger.info("Reading stix_core_relationship", {"id": id})
@@ -543,6 +544,12 @@ class StixCoreRelationship:
543
544
  return self.opencti.process_multiple_fields(
544
545
  result["data"]["stixCoreRelationship"]
545
546
  )
547
+ elif filters is not None:
548
+ result = self.list(filters=filters, customAttributes=custom_attributes)
549
+ if len(result) > 0:
550
+ return result[0]
551
+ else:
552
+ return None
546
553
  elif from_id is not None and to_id is not None:
547
554
  result = self.list(
548
555
  fromOrToId=from_or_to_id,
@@ -178,6 +178,7 @@ class StixNestedRefRelationship:
178
178
  stop_time_start = kwargs.get("stopTimeStart", None)
179
179
  stop_time_stop = kwargs.get("stopTimeStop", None)
180
180
  custom_attributes = kwargs.get("customAttributes", None)
181
+ filters = kwargs.get("filters", None)
181
182
  if id is not None:
182
183
  self.opencti.app_logger.info(
183
184
  "Reading stix_observable_relationship", {"id": id}
@@ -201,6 +202,12 @@ class StixNestedRefRelationship:
201
202
  return self.opencti.process_multiple_fields(
202
203
  result["data"]["stixRefRelationship"]
203
204
  )
205
+ elif filters is not None:
206
+ result = self.list(filters=filters, customAttributes=custom_attributes)
207
+ if len(result) > 0:
208
+ return result[0]
209
+ else:
210
+ return None
204
211
  else:
205
212
  result = self.list(
206
213
  fromOrToId=from_or_to_id,
@@ -481,6 +481,7 @@ class StixObjectOrStixRelationship:
481
481
  def read(self, **kwargs):
482
482
  id = kwargs.get("id", None)
483
483
  custom_attributes = kwargs.get("customAttributes", None)
484
+ filters = kwargs.get("filters", None)
484
485
  if id is not None:
485
486
  self.opencti.app_logger.info(
486
487
  "Reading StixObjectOrStixRelationship", {"id": id}
@@ -504,6 +505,12 @@ class StixObjectOrStixRelationship:
504
505
  return self.opencti.process_multiple_fields(
505
506
  result["data"]["stixObjectOrStixRelationship"]
506
507
  )
508
+ elif filters is not None:
509
+ result = self.list(filters=filters)
510
+ if len(result) > 0:
511
+ return result[0]
512
+ else:
513
+ return None
507
514
  else:
508
515
  self.opencti.app_logger.error("Missing parameters: id")
509
516
  return None
@@ -431,6 +431,7 @@ class StixSightingRelationship:
431
431
  last_seen_start = kwargs.get("lastSeenStart", None)
432
432
  last_seen_stop = kwargs.get("lastSeenStop", None)
433
433
  custom_attributes = kwargs.get("customAttributes", None)
434
+ filters = kwargs.get("filters", None)
434
435
  if id is not None:
435
436
  self.opencti.app_logger.info("Reading stix_sighting", {"id": id})
436
437
  query = (
@@ -452,6 +453,12 @@ class StixSightingRelationship:
452
453
  return self.opencti.process_multiple_fields(
453
454
  result["data"]["stixSightingRelationship"]
454
455
  )
456
+ elif filters is not None:
457
+ result = self.list(filters=filters)
458
+ if len(result) > 0:
459
+ return result[0]
460
+ else:
461
+ return None
455
462
  elif from_id is not None and to_id is not None:
456
463
  result = self.list(
457
464
  fromOrToId=from_or_to_id,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycti
3
- Version: 6.1.6
3
+ Version: 6.1.7
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