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

pycti/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- __version__ = "6.8.9"
2
+ __version__ = "6.8.10"
3
3
 
4
4
  from .api.opencti_api_client import OpenCTIApiClient
5
5
  from .api.opencti_api_connector import OpenCTIApiConnector
@@ -108,6 +108,7 @@ class Report:
108
108
  modified
109
109
  name
110
110
  description
111
+ content
111
112
  report_types
112
113
  published
113
114
  objects(all: true) {
@@ -287,6 +287,8 @@ class StixCyberObservable(StixCyberObservableDeprecatedMixin):
287
287
  type = "IPv6-Addr"
288
288
  elif type.lower() == "persona":
289
289
  type = "Persona"
290
+ elif type.lower() == "ssh-key":
291
+ type = "SSH-Key"
290
292
  elif type.lower() == "hostname" or type.lower() == "x-opencti-hostname":
291
293
  type = "Hostname"
292
294
  elif type.lower() == "payment-card" or type.lower() == "x-opencti-payment-card":
@@ -420,6 +422,7 @@ class StixCyberObservable(StixCyberObservableDeprecatedMixin):
420
422
  $PaymentCard: PaymentCardAddInput
421
423
  $Persona: PersonaAddInput
422
424
  $MediaContent: MediaContentAddInput
425
+ $SSHKey: SSHKeyAddInput
423
426
  ) {
424
427
  stixCyberObservableAdd(
425
428
  type: $type,
@@ -465,6 +468,7 @@ class StixCyberObservable(StixCyberObservableDeprecatedMixin):
465
468
  PaymentCard: $PaymentCard
466
469
  Persona: $Persona
467
470
  MediaContent: $MediaContent
471
+ SSHKey: $SSHKey
468
472
  ) {
469
473
  id
470
474
  standard_id
@@ -713,6 +717,49 @@ class StixCyberObservable(StixCyberObservableDeprecatedMixin):
713
717
  else None
714
718
  ),
715
719
  }
720
+ elif type == "SSH-Key" or type.lower() == "ssh-key":
721
+ input_variables["SSHKey"] = {
722
+ "key_type": (
723
+ observable_data["key_type"]
724
+ if "key_type" in observable_data
725
+ else None
726
+ ),
727
+ "public_key": (
728
+ observable_data["public_key"]
729
+ if "public_key" in observable_data
730
+ else None
731
+ ),
732
+ "fingerprint_sha256": (
733
+ observable_data["fingerprint_sha256"]
734
+ if "fingerprint_sha256" in observable_data
735
+ else False
736
+ ),
737
+ "fingerprint_md5": (
738
+ observable_data["fingerprint_md5"]
739
+ if "fingerprint_md5" in observable_data
740
+ else None
741
+ ),
742
+ "key_length": (
743
+ observable_data["key_length"]
744
+ if "key_length" in observable_data
745
+ else None
746
+ ),
747
+ "comment": (
748
+ observable_data["comment"]
749
+ if "comment" in observable_data
750
+ else None
751
+ ),
752
+ "created": (
753
+ observable_data["created"]
754
+ if "created" in observable_data
755
+ else None
756
+ ),
757
+ "expiration_date": (
758
+ observable_data["expiration_date"]
759
+ if "expiration_date" in observable_data
760
+ else None
761
+ ),
762
+ }
716
763
  elif type == "IPv4-Addr":
717
764
  input_variables["IPv4Addr"] = {
718
765
  "value": (
@@ -173,6 +173,16 @@ SCO_PROPERTIES = """
173
173
  algorithm
174
174
  hash
175
175
  }
176
+ }
177
+ ... on SSHKey {
178
+ key_type
179
+ public_key
180
+ fingerprint_sha256
181
+ fingerprint_md5
182
+ key_length
183
+ expiration_date
184
+ comment
185
+ created
176
186
  }
177
187
  ... on IPv4Addr {
178
188
  value
@@ -479,6 +489,16 @@ SCO_PROPERTIES_WITH_FILES = """
479
489
  hash
480
490
  }
481
491
  }
492
+ ... on SSHKey {
493
+ key_type
494
+ public_key
495
+ fingerprint_sha256
496
+ fingerprint_md5
497
+ key_length
498
+ expiration_date
499
+ comment
500
+ created
501
+ }
482
502
  ... on IPv4Addr {
483
503
  value
484
504
  }
pycti/utils/constants.py CHANGED
@@ -46,6 +46,7 @@ class StixCyberObservableTypes(Enum):
46
46
  MEDIA_CONTENT = "Media-Content"
47
47
  SIMPLE_OBSERVABLE = "Simple-Observable"
48
48
  PERSONA = "Persona"
49
+ SSH_KEY = "SSH-Key"
49
50
 
50
51
  @classmethod
51
52
  def has_value(cls, value: str) -> bool:
@@ -103,6 +103,7 @@ STIX_CYBER_OBSERVABLE_MAPPING = {
103
103
  "media-content": "Media-Content",
104
104
  "simple-observable": "Simple-Observable",
105
105
  "persona": "Persona",
106
+ "ssh-key": "SSH-Key",
106
107
  }
107
108
 
108
109
  STIX_OBJECTS = (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pycti
3
- Version: 6.8.9
3
+ Version: 6.8.10
4
4
  Summary: Python API client for OpenCTI.
5
5
  Home-page: https://github.com/OpenCTI-Platform/client-python
6
6
  Author: Filigran
@@ -1,4 +1,4 @@
1
- pycti/__init__.py,sha256=mxG2AQCaVdFshDTHXdIWR-Y1Bg7JsZpYHSLK7QhDKNo,5676
1
+ pycti/__init__.py,sha256=Y1ouy1xRFU24qVRMSxGbn8QxtJnJEXQZJVBhs80p88U,5677
2
2
  pycti/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  pycti/api/opencti_api_client.py,sha256=rAUEOYU8ND1oEw4w_hgbRbkpxF_5xVy3inV5Vo9QIfg,35494
4
4
  pycti/api/opencti_api_connector.py,sha256=k2Rq1PS9cmVfy822eKUBHL4ebPv3Zh9BTfxzkNt26O8,5671
@@ -47,14 +47,14 @@ pycti/entities/opencti_narrative.py,sha256=3TPIsCu7T7qCO1uFiHj4rmePHtEP6eNQKJBI9
47
47
  pycti/entities/opencti_note.py,sha256=b-4vm1YzoN0csqLucdaErd6TEYak5NwJm0SOfoNFdCU,31278
48
48
  pycti/entities/opencti_observed_data.py,sha256=ME1YvnU2-y8M-88LfwvnkNKsZbNK7_BJRZP5-ZY8w0Q,31594
49
49
  pycti/entities/opencti_opinion.py,sha256=1kG6J5WhxgPi8NpNmyAyy4bZjEMc4h8Jl8OzB7s6XNc,22852
50
- pycti/entities/opencti_report.py,sha256=AT88ZBipX2LqrR4gFEK7btifcZ12fKtfy1zRZoQkufc,35507
50
+ pycti/entities/opencti_report.py,sha256=zESA7-UNNBuHedgSFO3ImqKzISJRyUSEvudt_BGX0dc,35527
51
51
  pycti/entities/opencti_role.py,sha256=ryfPmZ_ch2sRGgqEr6_qxChTcGoeqvHW0MvlGHkLgdw,14039
52
52
  pycti/entities/opencti_security_coverage.py,sha256=1rEs-8NFFj1D8R_IMpaEPyIM4CS_jZgnKx_8Ykkw1Oo,12487
53
53
  pycti/entities/opencti_settings.py,sha256=aCbVUACuOK7AXvHp1tPDf3HBftFzJrZ60vHFu_pudAA,13469
54
54
  pycti/entities/opencti_stix.py,sha256=W8DQSg1QfWFNU1hR4jHiSbzB_N9BMakSlQTl-yOVQbQ,2616
55
55
  pycti/entities/opencti_stix_core_object.py,sha256=EAAdFkAd3jKSNXSqV2oSLtDhSMYf0iID7oQwEvI7Xb0,63719
56
56
  pycti/entities/opencti_stix_core_relationship.py,sha256=wgPvzVvFRb4plQVfDebrtI4SSqcr2abpqLeV0VcpZuM,48631
57
- pycti/entities/opencti_stix_cyber_observable.py,sha256=2k7PRSP6DQEpOH37T_pkxoq4hRtTGI_PQruVM55C7XM,93698
57
+ pycti/entities/opencti_stix_cyber_observable.py,sha256=e3GNn4pEaeKXyPoidNssJPDE1UYcpnOC4Us0reBKiH0,95659
58
58
  pycti/entities/opencti_stix_domain_object.py,sha256=6VGill8b0Vr22yUe8fAP0dOpWDXaDtteJ4rqhLqwzKM,83173
59
59
  pycti/entities/opencti_stix_nested_ref_relationship.py,sha256=81mS3ccqlsiZf20ssvhTPmtDvoTsBWPUSXe2pkulQVc,12705
60
60
  pycti/entities/opencti_stix_object_or_stix_relationship.py,sha256=wOWVEXiGnFORTOVIrdMqAo55InbCEcBD6Nl2FAkYHpY,20256
@@ -71,17 +71,17 @@ pycti/entities/indicator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
71
71
  pycti/entities/indicator/opencti_indicator_properties.py,sha256=iQvSeMHB-vSTzINnRxqIJfC3OgMHyhbXUVF2juU7DoE,5219
72
72
  pycti/entities/stix_cyber_observable/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
73
73
  pycti/entities/stix_cyber_observable/opencti_stix_cyber_observable_deprecated.py,sha256=q-2G6OOqvUC1U2hSKxD8uT5T18M_IDkl72Tn1KoumQI,1847
74
- pycti/entities/stix_cyber_observable/opencti_stix_cyber_observable_properties.py,sha256=lB4ORi5t9R5n8CwZ35FCIdfpVlDBPGJMg2dqtTMDfOo,11345
74
+ pycti/entities/stix_cyber_observable/opencti_stix_cyber_observable_properties.py,sha256=GbRCNP9sY0sfngVGdKcz24rg30BIyuRSlA9FVVZEJCg,11722
75
75
  pycti/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
- pycti/utils/constants.py,sha256=VRYRvDm6hkTR0ZcHHWMzQBwqlPRskYnusBpgoX0S05A,12854
76
+ pycti/utils/constants.py,sha256=R7xNgnKntplcGvonAh5ALFiw5VsUmz99B3Etst1lxsc,12878
77
77
  pycti/utils/opencti_logger.py,sha256=MApWthWJrSeBI0rumnhLhBtanjrtmfP6PJqOiQjcCOY,4091
78
78
  pycti/utils/opencti_stix2.py,sha256=R0_VRGmd8xaCpSjbol79y8jn0CRrjatd1T2FuUhbIos,137177
79
79
  pycti/utils/opencti_stix2_identifier.py,sha256=k8L1z4q1xdCBfxqUba4YS_kT-MmbJFxYh0RvfGOmrOs,837
80
80
  pycti/utils/opencti_stix2_splitter.py,sha256=nMGbFPtGz2Vaeb6asWyPiOntHFNjREzJnbLEJHDV_T0,11539
81
81
  pycti/utils/opencti_stix2_update.py,sha256=CnMyqkeVA0jgyxEcgqna8sABU4YPMjkEJ228GVurIn4,14658
82
- pycti/utils/opencti_stix2_utils.py,sha256=J9DCD11bETq4Dowur3RovddbHOIMBeXBg13gLPHRLkA,7570
83
- pycti-6.8.9.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
84
- pycti-6.8.9.dist-info/METADATA,sha256=FzK12UjBPNtUfHcP_7EaAduU2WvmFVMssZl6EmZ0V4Q,5808
85
- pycti-6.8.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
86
- pycti-6.8.9.dist-info/top_level.txt,sha256=cqEpxitAhHP4VgSA6xmrak6Yk9MeBkwoMTB6k7d2ZnE,6
87
- pycti-6.8.9.dist-info/RECORD,,
82
+ pycti/utils/opencti_stix2_utils.py,sha256=TVUGAFRJU5MtIBlR_bZX5cQ50S8djsAxNEzOxDqyTrs,7596
83
+ pycti-6.8.10.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
84
+ pycti-6.8.10.dist-info/METADATA,sha256=LtMwijlqWpJ83eoMmLvBj12DsDIfsiP7Y49L6foEZ2Q,5809
85
+ pycti-6.8.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
86
+ pycti-6.8.10.dist-info/top_level.txt,sha256=cqEpxitAhHP4VgSA6xmrak6Yk9MeBkwoMTB6k7d2ZnE,6
87
+ pycti-6.8.10.dist-info/RECORD,,
File without changes