pycti 6.2.6__tar.gz → 6.2.8__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 (78) hide show
  1. {pycti-6.2.6 → pycti-6.2.8}/PKG-INFO +3 -3
  2. {pycti-6.2.6 → pycti-6.2.8}/pycti/__init__.py +1 -1
  3. {pycti-6.2.6 → pycti-6.2.8}/pycti/api/opencti_api_playbook.py +6 -1
  4. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_identity.py +22 -0
  5. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_location.py +10 -0
  6. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_report.py +24 -1
  7. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_stix_cyber_observable.py +1 -1
  8. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_vulnerability.py +13 -0
  9. {pycti-6.2.6 → pycti-6.2.8}/pycti.egg-info/PKG-INFO +3 -3
  10. {pycti-6.2.6 → pycti-6.2.8}/pycti.egg-info/requires.txt +2 -2
  11. {pycti-6.2.6 → pycti-6.2.8}/setup.cfg +2 -2
  12. {pycti-6.2.6 → pycti-6.2.8}/LICENSE +0 -0
  13. {pycti-6.2.6 → pycti-6.2.8}/README.md +0 -0
  14. {pycti-6.2.6 → pycti-6.2.8}/pycti/api/__init__.py +0 -0
  15. {pycti-6.2.6 → pycti-6.2.8}/pycti/api/opencti_api_client.py +0 -0
  16. {pycti-6.2.6 → pycti-6.2.8}/pycti/api/opencti_api_connector.py +0 -0
  17. {pycti-6.2.6 → pycti-6.2.8}/pycti/api/opencti_api_work.py +0 -0
  18. {pycti-6.2.6 → pycti-6.2.8}/pycti/connector/__init__.py +0 -0
  19. {pycti-6.2.6 → pycti-6.2.8}/pycti/connector/opencti_connector.py +0 -0
  20. {pycti-6.2.6 → pycti-6.2.8}/pycti/connector/opencti_connector_helper.py +0 -0
  21. {pycti-6.2.6 → pycti-6.2.8}/pycti/connector/opencti_metric_handler.py +0 -0
  22. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/__init__.py +0 -0
  23. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/indicator/__init__.py +0 -0
  24. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/indicator/opencti_indicator_properties.py +0 -0
  25. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_attack_pattern.py +0 -0
  26. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_campaign.py +0 -0
  27. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_case_incident.py +0 -0
  28. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_case_rfi.py +0 -0
  29. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_case_rft.py +0 -0
  30. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_channel.py +0 -0
  31. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_course_of_action.py +0 -0
  32. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_data_component.py +0 -0
  33. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_data_source.py +0 -0
  34. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_event.py +0 -0
  35. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_external_reference.py +0 -0
  36. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_feedback.py +0 -0
  37. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_grouping.py +0 -0
  38. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_incident.py +0 -0
  39. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_indicator.py +0 -0
  40. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_infrastructure.py +0 -0
  41. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_intrusion_set.py +0 -0
  42. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_kill_chain_phase.py +0 -0
  43. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_label.py +0 -0
  44. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_language.py +0 -0
  45. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_malware.py +0 -0
  46. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_malware_analysis.py +0 -0
  47. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_marking_definition.py +0 -0
  48. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_narrative.py +0 -0
  49. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_note.py +0 -0
  50. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_observed_data.py +0 -0
  51. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_opinion.py +0 -0
  52. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_stix.py +0 -0
  53. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_stix_core_object.py +0 -0
  54. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_stix_core_relationship.py +0 -0
  55. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_stix_domain_object.py +0 -0
  56. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_stix_nested_ref_relationship.py +0 -0
  57. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_stix_object_or_stix_relationship.py +0 -0
  58. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_stix_sighting_relationship.py +0 -0
  59. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_task.py +0 -0
  60. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_threat_actor.py +0 -0
  61. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_threat_actor_group.py +0 -0
  62. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_threat_actor_individual.py +0 -0
  63. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_tool.py +0 -0
  64. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/opencti_vocabulary.py +0 -0
  65. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/stix_cyber_observable/__init__.py +0 -0
  66. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/stix_cyber_observable/opencti_stix_cyber_observable_deprecated.py +0 -0
  67. {pycti-6.2.6 → pycti-6.2.8}/pycti/entities/stix_cyber_observable/opencti_stix_cyber_observable_properties.py +0 -0
  68. {pycti-6.2.6 → pycti-6.2.8}/pycti/utils/__init__.py +0 -0
  69. {pycti-6.2.6 → pycti-6.2.8}/pycti/utils/constants.py +0 -0
  70. {pycti-6.2.6 → pycti-6.2.8}/pycti/utils/opencti_logger.py +0 -0
  71. {pycti-6.2.6 → pycti-6.2.8}/pycti/utils/opencti_stix2.py +0 -0
  72. {pycti-6.2.6 → pycti-6.2.8}/pycti/utils/opencti_stix2_splitter.py +0 -0
  73. {pycti-6.2.6 → pycti-6.2.8}/pycti/utils/opencti_stix2_update.py +0 -0
  74. {pycti-6.2.6 → pycti-6.2.8}/pycti/utils/opencti_stix2_utils.py +0 -0
  75. {pycti-6.2.6 → pycti-6.2.8}/pycti.egg-info/SOURCES.txt +0 -0
  76. {pycti-6.2.6 → pycti-6.2.8}/pycti.egg-info/dependency_links.txt +0 -0
  77. {pycti-6.2.6 → pycti-6.2.8}/pycti.egg-info/top_level.txt +0 -0
  78. {pycti-6.2.6 → pycti-6.2.8}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycti
3
- Version: 6.2.6
3
+ Version: 6.2.8
4
4
  Summary: Python API client for OpenCTI.
5
5
  Home-page: https://github.com/OpenCTI-Platform/client-python
6
6
  Author: Filigran
@@ -28,8 +28,8 @@ Requires-Dist: python-magic-bin~=0.4.14; sys_platform == "win32"
28
28
  Requires-Dist: python_json_logger~=2.0.4
29
29
  Requires-Dist: PyYAML~=6.0
30
30
  Requires-Dist: requests~=2.32.2
31
- Requires-Dist: setuptools~=70.3.0
32
- Requires-Dist: cachetools~=5.3.0
31
+ Requires-Dist: setuptools~=71.1.0
32
+ Requires-Dist: cachetools~=5.4.0
33
33
  Requires-Dist: prometheus-client~=0.20.0
34
34
  Requires-Dist: opentelemetry-api~=1.22.0
35
35
  Requires-Dist: opentelemetry-sdk~=1.22.0
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- __version__ = "6.2.6"
2
+ __version__ = "6.2.8"
3
3
 
4
4
  from .api.opencti_api_client import OpenCTIApiClient
5
5
  from .api.opencti_api_connector import OpenCTIApiConnector
@@ -6,7 +6,12 @@ class OpenCTIApiPlaybook:
6
6
 
7
7
  def playbook_step_execution(self, playbook: dict, bundle: str):
8
8
  self.api.app_logger.info(
9
- "Executing playbook step", {"playbook_id": playbook["playbook_id"]}
9
+ "Executing playbook step",
10
+ {
11
+ "playbook_id": playbook["playbook_id"],
12
+ "step_id": playbook["step_id"],
13
+ "data_instance_id": playbook["data_instance_id"],
14
+ },
10
15
  )
11
16
  query = """
12
17
  mutation PlaybookStepExecution($execution_id: ID!, $event_id: ID!, $execution_start: DateTime!, $data_instance_id: ID!, $playbook_id: ID!, $previous_step_id: ID!, $step_id: ID!, $previous_bundle: String!, $bundle: String!) {
@@ -60,6 +60,11 @@ class Identity:
60
60
  x_opencti_order
61
61
  x_opencti_color
62
62
  }
63
+ objectOrganization {
64
+ id
65
+ standard_id
66
+ name
67
+ }
63
68
  objectLabel {
64
69
  id
65
70
  value
@@ -148,6 +153,11 @@ class Identity:
148
153
  x_opencti_order
149
154
  x_opencti_color
150
155
  }
156
+ objectOrganization {
157
+ id
158
+ standard_id
159
+ name
160
+ }
151
161
  objectLabel {
152
162
  id
153
163
  value
@@ -388,6 +398,7 @@ class Identity:
388
398
  x_opencti_firstname = kwargs.get("x_opencti_firstname", None)
389
399
  x_opencti_lastname = kwargs.get("x_opencti_lastname", None)
390
400
  x_opencti_stix_ids = kwargs.get("x_opencti_stix_ids", None)
401
+ granted_refs = kwargs.get("objectOrganization", None)
391
402
  x_opencti_workflow_id = kwargs.get("x_opencti_workflow_id", None)
392
403
  update = kwargs.get("update", False)
393
404
 
@@ -440,6 +451,7 @@ class Identity:
440
451
  }
441
452
  }
442
453
  """
454
+ input_variables["objectOrganization"] = granted_refs
443
455
  input_variables["x_opencti_firstname"] = x_opencti_firstname
444
456
  input_variables["x_opencti_lastname"] = x_opencti_lastname
445
457
  input_variables["x_opencti_reliability"] = x_opencti_reliability
@@ -455,6 +467,7 @@ class Identity:
455
467
  }
456
468
  }
457
469
  """
470
+ input_variables["objectOrganization"] = granted_refs
458
471
  input_variables["x_opencti_firstname"] = x_opencti_firstname
459
472
  input_variables["x_opencti_lastname"] = x_opencti_lastname
460
473
  input_variables["x_opencti_reliability"] = x_opencti_reliability
@@ -540,6 +553,10 @@ class Identity:
540
553
  stix_object["x_opencti_stix_ids"] = (
541
554
  self.opencti.get_attribute_in_extension("stix_ids", stix_object)
542
555
  )
556
+ if "x_opencti_granted_refs" not in stix_object:
557
+ stix_object["x_opencti_granted_refs"] = (
558
+ self.opencti.get_attribute_in_extension("granted_refs", stix_object)
559
+ )
543
560
  if "x_opencti_workflow_id" not in stix_object:
544
561
  stix_object["x_opencti_workflow_id"] = (
545
562
  self.opencti.get_attribute_in_extension("workflow_id", stix_object)
@@ -611,6 +628,11 @@ class Identity:
611
628
  if "x_opencti_stix_ids" in stix_object
612
629
  else None
613
630
  ),
631
+ objectOrganization=(
632
+ stix_object["x_opencti_granted_refs"]
633
+ if "x_opencti_granted_refs" in stix_object
634
+ else None
635
+ ),
614
636
  x_opencti_workflow_id=(
615
637
  stix_object["x_opencti_workflow_id"]
616
638
  if "x_opencti_workflow_id" in stix_object
@@ -58,6 +58,11 @@ class Location:
58
58
  x_opencti_order
59
59
  x_opencti_color
60
60
  }
61
+ objectOrganization {
62
+ id
63
+ standard_id
64
+ name
65
+ }
61
66
  objectLabel {
62
67
  id
63
68
  value
@@ -139,6 +144,11 @@ class Location:
139
144
  x_opencti_order
140
145
  x_opencti_color
141
146
  }
147
+ objectOrganization {
148
+ id
149
+ standard_id
150
+ name
151
+ }
142
152
  objectLabel {
143
153
  id
144
154
  value
@@ -694,6 +694,8 @@ class Report:
694
694
  created_by = kwargs.get("createdBy", None)
695
695
  objects = kwargs.get("objects", None)
696
696
  object_marking = kwargs.get("objectMarking", None)
697
+ object_assignee = kwargs.get("objectAssignee", None)
698
+ object_participant = kwargs.get("objectParticipant", None)
697
699
  object_label = kwargs.get("objectLabel", None)
698
700
  external_references = kwargs.get("externalReferences", None)
699
701
  revoked = kwargs.get("revoked", None)
@@ -733,6 +735,8 @@ class Report:
733
735
  "objectMarking": object_marking,
734
736
  "objectLabel": object_label,
735
737
  "objectOrganization": granted_refs,
738
+ "objectAssignee": object_assignee,
739
+ "objectParticipant": object_participant,
736
740
  "objects": objects,
737
741
  "externalReferences": external_references,
738
742
  "revoked": revoked,
@@ -886,7 +890,16 @@ class Report:
886
890
  )
887
891
  if "x_opencti_content" in stix_object:
888
892
  stix_object["content"] = stix_object["x_opencti_content"]
889
-
893
+ if "x_opencti_assignee_ids" not in stix_object:
894
+ stix_object["x_opencti_assignee_ids"] = (
895
+ self.opencti.get_attribute_in_extension("assignee_ids", stix_object)
896
+ )
897
+ if "x_opencti_participant_ids" not in stix_object:
898
+ stix_object["x_opencti_participant_ids"] = (
899
+ self.opencti.get_attribute_in_extension(
900
+ "participant_ids", stix_object
901
+ )
902
+ )
890
903
  return self.create(
891
904
  stix_id=stix_object["id"],
892
905
  createdBy=(
@@ -897,6 +910,16 @@ class Report:
897
910
  if "object_marking_ids" in extras
898
911
  else None
899
912
  ),
913
+ objectAssignee=(
914
+ stix_object["x_opencti_assignee_ids"]
915
+ if "x_opencti_assignee_ids" in stix_object
916
+ else None
917
+ ),
918
+ objectParticipant=(
919
+ stix_object["x_opencti_participant_ids"]
920
+ if "x_opencti_participant_ids" in stix_object
921
+ else None
922
+ ),
900
923
  objectLabel=(
901
924
  extras["object_label_ids"] if "object_label_ids" in extras else None
902
925
  ),
@@ -347,7 +347,7 @@ class StixCyberObservable(StixCyberObservableDeprecatedMixin):
347
347
 
348
348
  if type is not None:
349
349
  self.opencti.app_logger.info(
350
- "Creating Stix-Cyber-Observable with indicator",
350
+ "Creating Stix-Cyber-Observable",
351
351
  {"type": type, "create_indicator": create_indicator},
352
352
  )
353
353
  input_variables = {
@@ -105,6 +105,7 @@ class Vulnerability:
105
105
  x_opencti_cvss_integrity_impact
106
106
  x_opencti_cvss_availability_impact
107
107
  x_opencti_cvss_confidentiality_impact
108
+ x_opencti_cisa_kev
108
109
  importFiles {
109
110
  edges {
110
111
  node {
@@ -283,6 +284,7 @@ class Vulnerability:
283
284
  x_opencti_cvss_base_score = kwargs.get("x_opencti_cvss_base_score", None)
284
285
  x_opencti_cvss_base_severity = kwargs.get("x_opencti_cvss_base_severity", None)
285
286
  x_opencti_cvss_attack_vector = kwargs.get("x_opencti_cvss_attack_vector", None)
287
+ x_opencti_cisa_kev = kwargs.get("x_opencti_cisa_kev", None)
286
288
  x_opencti_cvss_integrity_impact = kwargs.get(
287
289
  "x_opencti_cvss_integrity_impact", None
288
290
  )
@@ -333,6 +335,7 @@ class Vulnerability:
333
335
  "x_opencti_cvss_integrity_impact": x_opencti_cvss_integrity_impact,
334
336
  "x_opencti_cvss_availability_impact": x_opencti_cvss_availability_impact,
335
337
  "x_opencti_cvss_confidentiality_impact": x_opencti_cvss_confidentiality_impact,
338
+ "x_opencti_cisa_kev": x_opencti_cisa_kev,
336
339
  "x_opencti_stix_ids": x_opencti_stix_ids,
337
340
  "x_opencti_workflow_id": x_opencti_workflow_id,
338
341
  "update": update,
@@ -437,6 +440,11 @@ class Vulnerability:
437
440
  stix_object["x_opencti_workflow_id"] = (
438
441
  self.opencti.get_attribute_in_extension("workflow_id", stix_object)
439
442
  )
443
+ if "x_opencti_cisa_kev" not in stix_object:
444
+ stix_object["x_opencti_cisa_kev"] = (
445
+ self.opencti.get_attribute_in_extension("cisa_kev", stix_object)
446
+ )
447
+
440
448
  return self.create(
441
449
  stix_id=stix_object["id"],
442
450
  createdBy=(
@@ -518,6 +526,11 @@ class Vulnerability:
518
526
  if "x_opencti_workflow_id" in stix_object
519
527
  else None
520
528
  ),
529
+ x_opencti_cisa_kev=(
530
+ stix_object["x_opencti_cisa_kev"]
531
+ if "x_opencti_cisa_kev" in stix_object
532
+ else None
533
+ ),
521
534
  update=update,
522
535
  )
523
536
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycti
3
- Version: 6.2.6
3
+ Version: 6.2.8
4
4
  Summary: Python API client for OpenCTI.
5
5
  Home-page: https://github.com/OpenCTI-Platform/client-python
6
6
  Author: Filigran
@@ -28,8 +28,8 @@ Requires-Dist: python-magic-bin~=0.4.14; sys_platform == "win32"
28
28
  Requires-Dist: python_json_logger~=2.0.4
29
29
  Requires-Dist: PyYAML~=6.0
30
30
  Requires-Dist: requests~=2.32.2
31
- Requires-Dist: setuptools~=70.3.0
32
- Requires-Dist: cachetools~=5.3.0
31
+ Requires-Dist: setuptools~=71.1.0
32
+ Requires-Dist: cachetools~=5.4.0
33
33
  Requires-Dist: prometheus-client~=0.20.0
34
34
  Requires-Dist: opentelemetry-api~=1.22.0
35
35
  Requires-Dist: opentelemetry-sdk~=1.22.0
@@ -3,8 +3,8 @@ pika~=1.3.0
3
3
  python_json_logger~=2.0.4
4
4
  PyYAML~=6.0
5
5
  requests~=2.32.2
6
- setuptools~=70.3.0
7
- cachetools~=5.3.0
6
+ setuptools~=71.1.0
7
+ cachetools~=5.4.0
8
8
  prometheus-client~=0.20.0
9
9
  opentelemetry-api~=1.22.0
10
10
  opentelemetry-sdk~=1.22.0
@@ -41,8 +41,8 @@ install_requires =
41
41
  python_json_logger~=2.0.4
42
42
  PyYAML~=6.0
43
43
  requests~=2.32.2
44
- setuptools~=70.3.0
45
- cachetools~=5.3.0
44
+ setuptools~=71.1.0
45
+ cachetools~=5.4.0
46
46
  prometheus-client~=0.20.0
47
47
  opentelemetry-api~=1.22.0
48
48
  opentelemetry-sdk~=1.22.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