pycti 6.6.18__py3-none-any.whl → 6.7.1__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 +1 -1
- pycti/api/opencti_api_client.py +14 -0
- pycti/api/opencti_api_draft.py +19 -0
- pycti/api/opencti_api_internal_file.py +26 -0
- pycti/api/opencti_api_notification.py +39 -0
- pycti/api/opencti_api_pir.py +37 -0
- pycti/api/opencti_api_playbook.py +20 -0
- pycti/api/opencti_api_public_dashboard.py +25 -0
- pycti/api/opencti_api_trash.py +42 -0
- pycti/api/opencti_api_work.py +19 -0
- pycti/api/opencti_api_workspace.py +24 -0
- pycti/entities/opencti_group.py +7 -1
- pycti/entities/opencti_identity.py +59 -0
- pycti/entities/opencti_indicator.py +37 -0
- pycti/entities/opencti_stix.py +4 -3
- pycti/entities/opencti_stix_core_object.py +327 -0
- pycti/entities/opencti_stix_core_relationship.py +83 -0
- pycti/entities/opencti_stix_domain_object.py +80 -0
- pycti/entities/opencti_stix_object_or_stix_relationship.py +40 -0
- pycti/entities/opencti_stix_sighting_relationship.py +81 -0
- pycti/entities/opencti_vulnerability.py +627 -36
- pycti/utils/constants.py +2 -1
- pycti/utils/opencti_stix2.py +195 -11
- pycti/utils/opencti_stix2_splitter.py +6 -3
- pycti/utils/opencti_stix2_utils.py +31 -4
- {pycti-6.6.18.dist-info → pycti-6.7.1.dist-info}/METADATA +1 -1
- {pycti-6.6.18.dist-info → pycti-6.7.1.dist-info}/RECORD +30 -23
- {pycti-6.6.18.dist-info → pycti-6.7.1.dist-info}/WHEEL +0 -0
- {pycti-6.6.18.dist-info → pycti-6.7.1.dist-info}/licenses/LICENSE +0 -0
- {pycti-6.6.18.dist-info → pycti-6.7.1.dist-info}/top_level.txt +0 -0
|
@@ -354,14 +354,54 @@ class StixCoreObject:
|
|
|
354
354
|
... on Vulnerability {
|
|
355
355
|
name
|
|
356
356
|
description
|
|
357
|
+
x_opencti_aliases
|
|
358
|
+
x_opencti_cvss_vector_string
|
|
357
359
|
x_opencti_cvss_base_score
|
|
358
360
|
x_opencti_cvss_base_severity
|
|
359
361
|
x_opencti_cvss_attack_vector
|
|
362
|
+
x_opencti_cvss_attack_complexity
|
|
363
|
+
x_opencti_cvss_privileges_required
|
|
364
|
+
x_opencti_cvss_user_interaction
|
|
365
|
+
x_opencti_cvss_scope
|
|
366
|
+
x_opencti_cvss_confidentiality_impact
|
|
360
367
|
x_opencti_cvss_integrity_impact
|
|
361
368
|
x_opencti_cvss_availability_impact
|
|
369
|
+
x_opencti_cvss_exploit_code_maturity
|
|
370
|
+
x_opencti_cvss_remediation_level
|
|
371
|
+
x_opencti_cvss_report_confidence
|
|
372
|
+
x_opencti_cvss_temporal_score
|
|
373
|
+
x_opencti_cvss_v2_vector_string
|
|
374
|
+
x_opencti_cvss_v2_base_score
|
|
375
|
+
x_opencti_cvss_v2_access_vector
|
|
376
|
+
x_opencti_cvss_v2_access_complexity
|
|
377
|
+
x_opencti_cvss_v2_authentication
|
|
378
|
+
x_opencti_cvss_v2_confidentiality_impact
|
|
379
|
+
x_opencti_cvss_v2_integrity_impact
|
|
380
|
+
x_opencti_cvss_v2_availability_impact
|
|
381
|
+
x_opencti_cvss_v2_exploitability
|
|
382
|
+
x_opencti_cvss_v2_remediation_level
|
|
383
|
+
x_opencti_cvss_v2_report_confidence
|
|
384
|
+
x_opencti_cvss_v2_temporal_score
|
|
385
|
+
x_opencti_cvss_v4_vector_string
|
|
386
|
+
x_opencti_cvss_v4_base_score
|
|
387
|
+
x_opencti_cvss_v4_base_severity
|
|
388
|
+
x_opencti_cvss_v4_attack_vector
|
|
389
|
+
x_opencti_cvss_v4_attack_complexity
|
|
390
|
+
x_opencti_cvss_v4_attack_requirements
|
|
391
|
+
x_opencti_cvss_v4_privileges_required
|
|
392
|
+
x_opencti_cvss_v4_user_interaction
|
|
393
|
+
x_opencti_cvss_v4_confidentiality_impact_v
|
|
394
|
+
x_opencti_cvss_v4_confidentiality_impact_s
|
|
395
|
+
x_opencti_cvss_v4_integrity_impact_v
|
|
396
|
+
x_opencti_cvss_v4_integrity_impact_s
|
|
397
|
+
x_opencti_cvss_v4_availability_impact_v
|
|
398
|
+
x_opencti_cvss_v4_availability_impact_s
|
|
399
|
+
x_opencti_cvss_v4_exploit_maturity
|
|
400
|
+
x_opencti_cwe
|
|
362
401
|
x_opencti_cisa_kev
|
|
363
402
|
x_opencti_epss_score
|
|
364
403
|
x_opencti_epss_percentile
|
|
404
|
+
x_opencti_score
|
|
365
405
|
}
|
|
366
406
|
... on Incident {
|
|
367
407
|
name
|
|
@@ -1025,14 +1065,54 @@ class StixCoreObject:
|
|
|
1025
1065
|
... on Vulnerability {
|
|
1026
1066
|
name
|
|
1027
1067
|
description
|
|
1068
|
+
x_opencti_aliases
|
|
1069
|
+
x_opencti_cvss_vector_string
|
|
1028
1070
|
x_opencti_cvss_base_score
|
|
1029
1071
|
x_opencti_cvss_base_severity
|
|
1030
1072
|
x_opencti_cvss_attack_vector
|
|
1073
|
+
x_opencti_cvss_attack_complexity
|
|
1074
|
+
x_opencti_cvss_privileges_required
|
|
1075
|
+
x_opencti_cvss_user_interaction
|
|
1076
|
+
x_opencti_cvss_scope
|
|
1077
|
+
x_opencti_cvss_confidentiality_impact
|
|
1031
1078
|
x_opencti_cvss_integrity_impact
|
|
1032
1079
|
x_opencti_cvss_availability_impact
|
|
1080
|
+
x_opencti_cvss_exploit_code_maturity
|
|
1081
|
+
x_opencti_cvss_remediation_level
|
|
1082
|
+
x_opencti_cvss_report_confidence
|
|
1083
|
+
x_opencti_cvss_temporal_score
|
|
1084
|
+
x_opencti_cvss_v2_vector_string
|
|
1085
|
+
x_opencti_cvss_v2_base_score
|
|
1086
|
+
x_opencti_cvss_v2_access_vector
|
|
1087
|
+
x_opencti_cvss_v2_access_complexity
|
|
1088
|
+
x_opencti_cvss_v2_authentication
|
|
1089
|
+
x_opencti_cvss_v2_confidentiality_impact
|
|
1090
|
+
x_opencti_cvss_v2_integrity_impact
|
|
1091
|
+
x_opencti_cvss_v2_availability_impact
|
|
1092
|
+
x_opencti_cvss_v2_exploitability
|
|
1093
|
+
x_opencti_cvss_v2_remediation_level
|
|
1094
|
+
x_opencti_cvss_v2_report_confidence
|
|
1095
|
+
x_opencti_cvss_v2_temporal_score
|
|
1096
|
+
x_opencti_cvss_v4_vector_string
|
|
1097
|
+
x_opencti_cvss_v4_base_score
|
|
1098
|
+
x_opencti_cvss_v4_base_severity
|
|
1099
|
+
x_opencti_cvss_v4_attack_vector
|
|
1100
|
+
x_opencti_cvss_v4_attack_complexity
|
|
1101
|
+
x_opencti_cvss_v4_attack_requirements
|
|
1102
|
+
x_opencti_cvss_v4_privileges_required
|
|
1103
|
+
x_opencti_cvss_v4_user_interaction
|
|
1104
|
+
x_opencti_cvss_v4_confidentiality_impact_v
|
|
1105
|
+
x_opencti_cvss_v4_confidentiality_impact_s
|
|
1106
|
+
x_opencti_cvss_v4_integrity_impact_v
|
|
1107
|
+
x_opencti_cvss_v4_integrity_impact_s
|
|
1108
|
+
x_opencti_cvss_v4_availability_impact_v
|
|
1109
|
+
x_opencti_cvss_v4_availability_impact_s
|
|
1110
|
+
x_opencti_cvss_v4_exploit_maturity
|
|
1111
|
+
x_opencti_cwe
|
|
1033
1112
|
x_opencti_cisa_kev
|
|
1034
1113
|
x_opencti_epss_score
|
|
1035
1114
|
x_opencti_epss_percentile
|
|
1115
|
+
x_opencti_score
|
|
1036
1116
|
}
|
|
1037
1117
|
... on Incident {
|
|
1038
1118
|
name
|
|
@@ -1680,6 +1760,228 @@ class StixCoreObject:
|
|
|
1680
1760
|
self.opencti.app_logger.error("Missing parameters: id")
|
|
1681
1761
|
return None
|
|
1682
1762
|
|
|
1763
|
+
"""
|
|
1764
|
+
Apply rule to Stix-Core-Object object
|
|
1765
|
+
|
|
1766
|
+
:param element_id: the Stix-Core-Object id
|
|
1767
|
+
:param rule_id: the rule to apply
|
|
1768
|
+
:return void
|
|
1769
|
+
"""
|
|
1770
|
+
|
|
1771
|
+
def rule_apply(self, **kwargs):
|
|
1772
|
+
rule_id = kwargs.get("rule_id", None)
|
|
1773
|
+
element_id = kwargs.get("element_id", None)
|
|
1774
|
+
if element_id is not None and rule_id is not None:
|
|
1775
|
+
self.opencti.app_logger.info(
|
|
1776
|
+
"Apply rule stix_core_object", {"id": element_id}
|
|
1777
|
+
)
|
|
1778
|
+
query = """
|
|
1779
|
+
mutation StixCoreApplyRule($elementId: ID!, $ruleId: ID!) {
|
|
1780
|
+
ruleApply(elementId: $elementId, ruleId: $ruleId)
|
|
1781
|
+
}
|
|
1782
|
+
"""
|
|
1783
|
+
self.opencti.query(query, {"elementId": element_id, "ruleId": rule_id})
|
|
1784
|
+
else:
|
|
1785
|
+
self.opencti.app_logger.error(
|
|
1786
|
+
"[stix_core_object] Cant apply rule, missing parameters: id"
|
|
1787
|
+
)
|
|
1788
|
+
return None
|
|
1789
|
+
|
|
1790
|
+
"""
|
|
1791
|
+
Apply rule clear to Stix-Core-Object object
|
|
1792
|
+
|
|
1793
|
+
:param element_id: the Stix-Core-Object id
|
|
1794
|
+
:param rule_id: the rule to apply
|
|
1795
|
+
:return void
|
|
1796
|
+
"""
|
|
1797
|
+
|
|
1798
|
+
def rule_clear(self, **kwargs):
|
|
1799
|
+
rule_id = kwargs.get("rule_id", None)
|
|
1800
|
+
element_id = kwargs.get("element_id", None)
|
|
1801
|
+
if element_id is not None and rule_id is not None:
|
|
1802
|
+
self.opencti.app_logger.info(
|
|
1803
|
+
"Apply rule clear stix_core_object", {"id": element_id}
|
|
1804
|
+
)
|
|
1805
|
+
query = """
|
|
1806
|
+
mutation StixCoreClearRule($elementId: ID!, $ruleId: ID!) {
|
|
1807
|
+
ruleClear(elementId: $elementId, ruleId: $ruleId)
|
|
1808
|
+
}
|
|
1809
|
+
"""
|
|
1810
|
+
self.opencti.query(query, {"elementId": element_id, "ruleId": rule_id})
|
|
1811
|
+
else:
|
|
1812
|
+
self.opencti.app_logger.error(
|
|
1813
|
+
"[stix_core_object] Cant clear rule, missing parameters: id"
|
|
1814
|
+
)
|
|
1815
|
+
return None
|
|
1816
|
+
|
|
1817
|
+
"""
|
|
1818
|
+
Apply rules rescan to Stix-Core-Object object
|
|
1819
|
+
|
|
1820
|
+
:param element_id: the Stix-Core-Object id
|
|
1821
|
+
:return void
|
|
1822
|
+
"""
|
|
1823
|
+
|
|
1824
|
+
def rules_rescan(self, **kwargs):
|
|
1825
|
+
element_id = kwargs.get("element_id", None)
|
|
1826
|
+
if element_id is not None:
|
|
1827
|
+
self.opencti.app_logger.info(
|
|
1828
|
+
"Apply rules rescan stix_core_object", {"id": element_id}
|
|
1829
|
+
)
|
|
1830
|
+
query = """
|
|
1831
|
+
mutation StixCoreRescanRules($elementId: ID!) {
|
|
1832
|
+
rulesRescan(elementId: $elementId)
|
|
1833
|
+
}
|
|
1834
|
+
"""
|
|
1835
|
+
self.opencti.query(query, {"elementId": element_id})
|
|
1836
|
+
else:
|
|
1837
|
+
self.opencti.app_logger.error(
|
|
1838
|
+
"[stix_core_object] Cant rescan rule, missing parameters: id"
|
|
1839
|
+
)
|
|
1840
|
+
return None
|
|
1841
|
+
|
|
1842
|
+
"""
|
|
1843
|
+
Ask clear restriction
|
|
1844
|
+
|
|
1845
|
+
:param element_id: the Stix-Core-Object id
|
|
1846
|
+
:return void
|
|
1847
|
+
"""
|
|
1848
|
+
|
|
1849
|
+
def clear_access_restriction(self, **kwargs):
|
|
1850
|
+
element_id = kwargs.get("element_id", None)
|
|
1851
|
+
if element_id is not None:
|
|
1852
|
+
query = """
|
|
1853
|
+
mutation StixCoreObjectEdit($id: ID!) {
|
|
1854
|
+
stixCoreObjectEdit(id: $id) {
|
|
1855
|
+
clearAccessRestriction {
|
|
1856
|
+
id
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
"""
|
|
1861
|
+
self.opencti.query(
|
|
1862
|
+
query,
|
|
1863
|
+
{
|
|
1864
|
+
"id": element_id,
|
|
1865
|
+
},
|
|
1866
|
+
)
|
|
1867
|
+
else:
|
|
1868
|
+
self.opencti.app_logger.error(
|
|
1869
|
+
"[stix_core_object] Cant clear access restriction, missing parameters: id"
|
|
1870
|
+
)
|
|
1871
|
+
return None
|
|
1872
|
+
|
|
1873
|
+
"""
|
|
1874
|
+
Ask enrichment with single connector
|
|
1875
|
+
|
|
1876
|
+
:param element_id: the Stix-Core-Object id
|
|
1877
|
+
:param connector_id the connector
|
|
1878
|
+
:return void
|
|
1879
|
+
"""
|
|
1880
|
+
|
|
1881
|
+
def ask_enrichment(self, **kwargs):
|
|
1882
|
+
element_id = kwargs.get("element_id", None)
|
|
1883
|
+
connector_id = kwargs.get("connector_id", None)
|
|
1884
|
+
query = """
|
|
1885
|
+
mutation StixCoreObjectEdit($id: ID!, $connectorId: ID!) {
|
|
1886
|
+
stixCoreObjectEdit(id: $id) {
|
|
1887
|
+
askEnrichment(connectorId: $connectorId) {
|
|
1888
|
+
id
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
"""
|
|
1893
|
+
self.opencti.query(
|
|
1894
|
+
query,
|
|
1895
|
+
{
|
|
1896
|
+
"id": element_id,
|
|
1897
|
+
"connectorId": connector_id,
|
|
1898
|
+
},
|
|
1899
|
+
)
|
|
1900
|
+
|
|
1901
|
+
"""
|
|
1902
|
+
Ask enrichment with multiple connectors
|
|
1903
|
+
|
|
1904
|
+
:param element_id: the Stix-Core-Object id
|
|
1905
|
+
:param connector_ids the connectors
|
|
1906
|
+
:return void
|
|
1907
|
+
"""
|
|
1908
|
+
|
|
1909
|
+
def ask_enrichments(self, **kwargs):
|
|
1910
|
+
element_id = kwargs.get("element_id", None)
|
|
1911
|
+
connector_ids = kwargs.get("connector_ids", None)
|
|
1912
|
+
query = """
|
|
1913
|
+
mutation StixCoreObjectEdit($id: ID!, $connectorIds: [ID!]!) {
|
|
1914
|
+
stixCoreObjectEdit(id: $id) {
|
|
1915
|
+
askEnrichments(connectorIds: $connectorIds) {
|
|
1916
|
+
id
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
"""
|
|
1921
|
+
self.opencti.query(
|
|
1922
|
+
query,
|
|
1923
|
+
{
|
|
1924
|
+
"id": element_id,
|
|
1925
|
+
"connectorId": connector_ids,
|
|
1926
|
+
},
|
|
1927
|
+
)
|
|
1928
|
+
|
|
1929
|
+
"""
|
|
1930
|
+
Share element to multiple organizations
|
|
1931
|
+
|
|
1932
|
+
:param entity_id: the Stix-Core-Object id
|
|
1933
|
+
:param organization_id:s the organization to share with
|
|
1934
|
+
:return void
|
|
1935
|
+
"""
|
|
1936
|
+
|
|
1937
|
+
def organization_share(self, entity_id, organization_ids, sharing_direct_container):
|
|
1938
|
+
query = """
|
|
1939
|
+
mutation StixCoreObjectEdit($id: ID!, $organizationId: [ID!]!, $directContainerSharing: Boolean) {
|
|
1940
|
+
stixCoreObjectEdit(id: $id) {
|
|
1941
|
+
restrictionOrganizationAdd(organizationId: $organizationId, directContainerSharing: $directContainerSharing) {
|
|
1942
|
+
id
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
"""
|
|
1947
|
+
self.opencti.query(
|
|
1948
|
+
query,
|
|
1949
|
+
{
|
|
1950
|
+
"id": entity_id,
|
|
1951
|
+
"organizationId": organization_ids,
|
|
1952
|
+
"directContainerSharing": sharing_direct_container,
|
|
1953
|
+
},
|
|
1954
|
+
)
|
|
1955
|
+
|
|
1956
|
+
"""
|
|
1957
|
+
Unshare element from multiple organizations
|
|
1958
|
+
|
|
1959
|
+
:param entity_id: the Stix-Core-Object id
|
|
1960
|
+
:param organization_id:s the organization to share with
|
|
1961
|
+
:return void
|
|
1962
|
+
"""
|
|
1963
|
+
|
|
1964
|
+
def organization_unshare(
|
|
1965
|
+
self, entity_id, organization_ids, sharing_direct_container
|
|
1966
|
+
):
|
|
1967
|
+
query = """
|
|
1968
|
+
mutation StixCoreObjectEdit($id: ID!, $organizationId: [ID!]!, $directContainerSharing: Boolean) {
|
|
1969
|
+
stixCoreObjectEdit(id: $id) {
|
|
1970
|
+
restrictionOrganizationDelete(organizationId: $organizationId, directContainerSharing: $directContainerSharing) {
|
|
1971
|
+
id
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1975
|
+
"""
|
|
1976
|
+
self.opencti.query(
|
|
1977
|
+
query,
|
|
1978
|
+
{
|
|
1979
|
+
"id": entity_id,
|
|
1980
|
+
"organizationId": organization_ids,
|
|
1981
|
+
"directContainerSharing": sharing_direct_container,
|
|
1982
|
+
},
|
|
1983
|
+
)
|
|
1984
|
+
|
|
1683
1985
|
"""
|
|
1684
1986
|
Delete a Stix-Core-Object object
|
|
1685
1987
|
|
|
@@ -1702,3 +2004,28 @@ class StixCoreObject:
|
|
|
1702
2004
|
else:
|
|
1703
2005
|
self.opencti.app_logger.error("[stix_core_object] Missing parameters: id")
|
|
1704
2006
|
return None
|
|
2007
|
+
|
|
2008
|
+
"""
|
|
2009
|
+
Remove a Stix-Core-Object object from draft (revert)
|
|
2010
|
+
|
|
2011
|
+
:param id: the Stix-Core-Object id
|
|
2012
|
+
:return void
|
|
2013
|
+
"""
|
|
2014
|
+
|
|
2015
|
+
def remove_from_draft(self, **kwargs):
|
|
2016
|
+
id = kwargs.get("id", None)
|
|
2017
|
+
if id is not None:
|
|
2018
|
+
self.opencti.app_logger.info("Draft remove stix_core_object", {"id": id})
|
|
2019
|
+
query = """
|
|
2020
|
+
mutation StixCoreObjectEditDraftRemove($id: ID!) {
|
|
2021
|
+
stixCoreObjectEdit(id: $id) {
|
|
2022
|
+
removeFromDraft
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
"""
|
|
2026
|
+
self.opencti.query(query, {"id": id})
|
|
2027
|
+
else:
|
|
2028
|
+
self.opencti.app_logger.error(
|
|
2029
|
+
"[stix_core_object] Cant remove from draft, missing parameters: id"
|
|
2030
|
+
)
|
|
2031
|
+
return None
|
|
@@ -1247,3 +1247,86 @@ class StixCoreRelationship:
|
|
|
1247
1247
|
self.opencti.app_logger.error(
|
|
1248
1248
|
"[opencti_stix_core_relationship] Missing parameters: stixObject"
|
|
1249
1249
|
)
|
|
1250
|
+
|
|
1251
|
+
"""
|
|
1252
|
+
Share element to multiple organizations
|
|
1253
|
+
|
|
1254
|
+
:param entity_id: the stix_core_relationship id
|
|
1255
|
+
:param organization_id:s the organization to share with
|
|
1256
|
+
:return void
|
|
1257
|
+
"""
|
|
1258
|
+
|
|
1259
|
+
def organization_share(self, entity_id, organization_ids, sharing_direct_container):
|
|
1260
|
+
query = """
|
|
1261
|
+
mutation StixCoreRelationshipEdit($id: ID!, $organizationId: [ID!]!, $directContainerSharing: Boolean) {
|
|
1262
|
+
stixCoreRelationshipEdit(id: $id) {
|
|
1263
|
+
restrictionOrganizationAdd(organizationId: $organizationId, directContainerSharing: $directContainerSharing) {
|
|
1264
|
+
id
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
"""
|
|
1269
|
+
self.opencti.query(
|
|
1270
|
+
query,
|
|
1271
|
+
{
|
|
1272
|
+
"id": entity_id,
|
|
1273
|
+
"organizationId": organization_ids,
|
|
1274
|
+
"directContainerSharing": sharing_direct_container,
|
|
1275
|
+
},
|
|
1276
|
+
)
|
|
1277
|
+
|
|
1278
|
+
"""
|
|
1279
|
+
Unshare element from multiple organizations
|
|
1280
|
+
|
|
1281
|
+
:param entity_id: the stix_core_relationship id
|
|
1282
|
+
:param organization_id:s the organization to share with
|
|
1283
|
+
:return void
|
|
1284
|
+
"""
|
|
1285
|
+
|
|
1286
|
+
def organization_unshare(
|
|
1287
|
+
self, entity_id, organization_ids, sharing_direct_container
|
|
1288
|
+
):
|
|
1289
|
+
query = """
|
|
1290
|
+
mutation StixCoreRelationshipEdit($id: ID!, $organizationId: [ID!]!, $directContainerSharing: Boolean) {
|
|
1291
|
+
stixCoreRelationshipEdit(id: $id) {
|
|
1292
|
+
restrictionOrganizationDelete(organizationId: $organizationId, directContainerSharing: $directContainerSharing) {
|
|
1293
|
+
id
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
"""
|
|
1298
|
+
self.opencti.query(
|
|
1299
|
+
query,
|
|
1300
|
+
{
|
|
1301
|
+
"id": entity_id,
|
|
1302
|
+
"organizationId": organization_ids,
|
|
1303
|
+
"directContainerSharing": sharing_direct_container,
|
|
1304
|
+
},
|
|
1305
|
+
)
|
|
1306
|
+
|
|
1307
|
+
"""
|
|
1308
|
+
Remove a stix_core_relationship object from draft (revert)
|
|
1309
|
+
|
|
1310
|
+
:param id: the stix_core_relationship id
|
|
1311
|
+
:return void
|
|
1312
|
+
"""
|
|
1313
|
+
|
|
1314
|
+
def remove_from_draft(self, **kwargs):
|
|
1315
|
+
id = kwargs.get("id", None)
|
|
1316
|
+
if id is not None:
|
|
1317
|
+
self.opencti.app_logger.info(
|
|
1318
|
+
"Draft remove stix_core_relationship", {"id": id}
|
|
1319
|
+
)
|
|
1320
|
+
query = """
|
|
1321
|
+
mutation StixCoreRelationshipEditDraftRemove($id: ID!) {
|
|
1322
|
+
stixCoreRelationshipEdit(id: $id) {
|
|
1323
|
+
removeFromDraft
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
"""
|
|
1327
|
+
self.opencti.query(query, {"id": id})
|
|
1328
|
+
else:
|
|
1329
|
+
self.opencti.app_logger.error(
|
|
1330
|
+
"[stix_core_relationship] Cant remove from draft, missing parameters: id"
|
|
1331
|
+
)
|
|
1332
|
+
return None
|
|
@@ -477,14 +477,54 @@ class StixDomainObject:
|
|
|
477
477
|
... on Vulnerability {
|
|
478
478
|
name
|
|
479
479
|
description
|
|
480
|
+
x_opencti_aliases
|
|
481
|
+
x_opencti_cvss_vector_string
|
|
480
482
|
x_opencti_cvss_base_score
|
|
481
483
|
x_opencti_cvss_base_severity
|
|
482
484
|
x_opencti_cvss_attack_vector
|
|
485
|
+
x_opencti_cvss_attack_complexity
|
|
486
|
+
x_opencti_cvss_privileges_required
|
|
487
|
+
x_opencti_cvss_user_interaction
|
|
488
|
+
x_opencti_cvss_scope
|
|
489
|
+
x_opencti_cvss_confidentiality_impact
|
|
483
490
|
x_opencti_cvss_integrity_impact
|
|
484
491
|
x_opencti_cvss_availability_impact
|
|
492
|
+
x_opencti_cvss_exploit_code_maturity
|
|
493
|
+
x_opencti_cvss_remediation_level
|
|
494
|
+
x_opencti_cvss_report_confidence
|
|
495
|
+
x_opencti_cvss_temporal_score
|
|
496
|
+
x_opencti_cvss_v2_vector_string
|
|
497
|
+
x_opencti_cvss_v2_base_score
|
|
498
|
+
x_opencti_cvss_v2_access_vector
|
|
499
|
+
x_opencti_cvss_v2_access_complexity
|
|
500
|
+
x_opencti_cvss_v2_authentication
|
|
501
|
+
x_opencti_cvss_v2_confidentiality_impact
|
|
502
|
+
x_opencti_cvss_v2_integrity_impact
|
|
503
|
+
x_opencti_cvss_v2_availability_impact
|
|
504
|
+
x_opencti_cvss_v2_exploitability
|
|
505
|
+
x_opencti_cvss_v2_remediation_level
|
|
506
|
+
x_opencti_cvss_v2_report_confidence
|
|
507
|
+
x_opencti_cvss_v2_temporal_score
|
|
508
|
+
x_opencti_cvss_v4_vector_string
|
|
509
|
+
x_opencti_cvss_v4_base_score
|
|
510
|
+
x_opencti_cvss_v4_base_severity
|
|
511
|
+
x_opencti_cvss_v4_attack_vector
|
|
512
|
+
x_opencti_cvss_v4_attack_complexity
|
|
513
|
+
x_opencti_cvss_v4_attack_requirements
|
|
514
|
+
x_opencti_cvss_v4_privileges_required
|
|
515
|
+
x_opencti_cvss_v4_user_interaction
|
|
516
|
+
x_opencti_cvss_v4_confidentiality_impact_v
|
|
517
|
+
x_opencti_cvss_v4_confidentiality_impact_s
|
|
518
|
+
x_opencti_cvss_v4_integrity_impact_v
|
|
519
|
+
x_opencti_cvss_v4_integrity_impact_s
|
|
520
|
+
x_opencti_cvss_v4_availability_impact_v
|
|
521
|
+
x_opencti_cvss_v4_availability_impact_s
|
|
522
|
+
x_opencti_cvss_v4_exploit_maturity
|
|
523
|
+
x_opencti_cwe
|
|
485
524
|
x_opencti_cisa_kev
|
|
486
525
|
x_opencti_epss_score
|
|
487
526
|
x_opencti_epss_percentile
|
|
527
|
+
x_opencti_score
|
|
488
528
|
}
|
|
489
529
|
... on Incident {
|
|
490
530
|
name
|
|
@@ -975,14 +1015,54 @@ class StixDomainObject:
|
|
|
975
1015
|
... on Vulnerability {
|
|
976
1016
|
name
|
|
977
1017
|
description
|
|
1018
|
+
x_opencti_aliases
|
|
1019
|
+
x_opencti_cvss_vector_string
|
|
978
1020
|
x_opencti_cvss_base_score
|
|
979
1021
|
x_opencti_cvss_base_severity
|
|
980
1022
|
x_opencti_cvss_attack_vector
|
|
1023
|
+
x_opencti_cvss_attack_complexity
|
|
1024
|
+
x_opencti_cvss_privileges_required
|
|
1025
|
+
x_opencti_cvss_user_interaction
|
|
1026
|
+
x_opencti_cvss_scope
|
|
1027
|
+
x_opencti_cvss_confidentiality_impact
|
|
981
1028
|
x_opencti_cvss_integrity_impact
|
|
982
1029
|
x_opencti_cvss_availability_impact
|
|
1030
|
+
x_opencti_cvss_exploit_code_maturity
|
|
1031
|
+
x_opencti_cvss_remediation_level
|
|
1032
|
+
x_opencti_cvss_report_confidence
|
|
1033
|
+
x_opencti_cvss_temporal_score
|
|
1034
|
+
x_opencti_cvss_v2_vector_string
|
|
1035
|
+
x_opencti_cvss_v2_base_score
|
|
1036
|
+
x_opencti_cvss_v2_access_vector
|
|
1037
|
+
x_opencti_cvss_v2_access_complexity
|
|
1038
|
+
x_opencti_cvss_v2_authentication
|
|
1039
|
+
x_opencti_cvss_v2_confidentiality_impact
|
|
1040
|
+
x_opencti_cvss_v2_integrity_impact
|
|
1041
|
+
x_opencti_cvss_v2_availability_impact
|
|
1042
|
+
x_opencti_cvss_v2_exploitability
|
|
1043
|
+
x_opencti_cvss_v2_remediation_level
|
|
1044
|
+
x_opencti_cvss_v2_report_confidence
|
|
1045
|
+
x_opencti_cvss_v2_temporal_score
|
|
1046
|
+
x_opencti_cvss_v4_vector_string
|
|
1047
|
+
x_opencti_cvss_v4_base_score
|
|
1048
|
+
x_opencti_cvss_v4_base_severity
|
|
1049
|
+
x_opencti_cvss_v4_attack_vector
|
|
1050
|
+
x_opencti_cvss_v4_attack_complexity
|
|
1051
|
+
x_opencti_cvss_v4_attack_requirements
|
|
1052
|
+
x_opencti_cvss_v4_privileges_required
|
|
1053
|
+
x_opencti_cvss_v4_user_interaction
|
|
1054
|
+
x_opencti_cvss_v4_confidentiality_impact_v
|
|
1055
|
+
x_opencti_cvss_v4_confidentiality_impact_s
|
|
1056
|
+
x_opencti_cvss_v4_integrity_impact_v
|
|
1057
|
+
x_opencti_cvss_v4_integrity_impact_s
|
|
1058
|
+
x_opencti_cvss_v4_availability_impact_v
|
|
1059
|
+
x_opencti_cvss_v4_availability_impact_s
|
|
1060
|
+
x_opencti_cvss_v4_exploit_maturity
|
|
1061
|
+
x_opencti_cwe
|
|
983
1062
|
x_opencti_cisa_kev
|
|
984
1063
|
x_opencti_epss_score
|
|
985
1064
|
x_opencti_epss_percentile
|
|
1065
|
+
x_opencti_score
|
|
986
1066
|
}
|
|
987
1067
|
... on Incident {
|
|
988
1068
|
name
|
|
@@ -293,14 +293,54 @@ class StixObjectOrStixRelationship:
|
|
|
293
293
|
... on Vulnerability {
|
|
294
294
|
name
|
|
295
295
|
description
|
|
296
|
+
x_opencti_aliases
|
|
297
|
+
x_opencti_cvss_vector_string
|
|
296
298
|
x_opencti_cvss_base_score
|
|
297
299
|
x_opencti_cvss_base_severity
|
|
298
300
|
x_opencti_cvss_attack_vector
|
|
301
|
+
x_opencti_cvss_attack_complexity
|
|
302
|
+
x_opencti_cvss_privileges_required
|
|
303
|
+
x_opencti_cvss_user_interaction
|
|
304
|
+
x_opencti_cvss_scope
|
|
305
|
+
x_opencti_cvss_confidentiality_impact
|
|
299
306
|
x_opencti_cvss_integrity_impact
|
|
300
307
|
x_opencti_cvss_availability_impact
|
|
308
|
+
x_opencti_cvss_exploit_code_maturity
|
|
309
|
+
x_opencti_cvss_remediation_level
|
|
310
|
+
x_opencti_cvss_report_confidence
|
|
311
|
+
x_opencti_cvss_temporal_score
|
|
312
|
+
x_opencti_cvss_v2_vector_string
|
|
313
|
+
x_opencti_cvss_v2_base_score
|
|
314
|
+
x_opencti_cvss_v2_access_vector
|
|
315
|
+
x_opencti_cvss_v2_access_complexity
|
|
316
|
+
x_opencti_cvss_v2_authentication
|
|
317
|
+
x_opencti_cvss_v2_confidentiality_impact
|
|
318
|
+
x_opencti_cvss_v2_integrity_impact
|
|
319
|
+
x_opencti_cvss_v2_availability_impact
|
|
320
|
+
x_opencti_cvss_v2_exploitability
|
|
321
|
+
x_opencti_cvss_v2_remediation_level
|
|
322
|
+
x_opencti_cvss_v2_report_confidence
|
|
323
|
+
x_opencti_cvss_v2_temporal_score
|
|
324
|
+
x_opencti_cvss_v4_vector_string
|
|
325
|
+
x_opencti_cvss_v4_base_score
|
|
326
|
+
x_opencti_cvss_v4_base_severity
|
|
327
|
+
x_opencti_cvss_v4_attack_vector
|
|
328
|
+
x_opencti_cvss_v4_attack_complexity
|
|
329
|
+
x_opencti_cvss_v4_attack_requirements
|
|
330
|
+
x_opencti_cvss_v4_privileges_required
|
|
331
|
+
x_opencti_cvss_v4_user_interaction
|
|
332
|
+
x_opencti_cvss_v4_confidentiality_impact_v
|
|
333
|
+
x_opencti_cvss_v4_confidentiality_impact_s
|
|
334
|
+
x_opencti_cvss_v4_integrity_impact_v
|
|
335
|
+
x_opencti_cvss_v4_integrity_impact_s
|
|
336
|
+
x_opencti_cvss_v4_availability_impact_v
|
|
337
|
+
x_opencti_cvss_v4_availability_impact_s
|
|
338
|
+
x_opencti_cvss_v4_exploit_maturity
|
|
339
|
+
x_opencti_cwe
|
|
301
340
|
x_opencti_cisa_kev
|
|
302
341
|
x_opencti_epss_score
|
|
303
342
|
x_opencti_epss_percentile
|
|
343
|
+
x_opencti_score
|
|
304
344
|
}
|
|
305
345
|
... on Incident {
|
|
306
346
|
name
|