splunk-soar-sdk 2.3.6__py3-none-any.whl → 2.3.7__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.
- soar_sdk/actions_manager.py +5 -6
- soar_sdk/shims/phantom/base_connector.py +8 -0
- soar_sdk/shims/phantom/install_info.py +15 -2
- {splunk_soar_sdk-2.3.6.dist-info → splunk_soar_sdk-2.3.7.dist-info}/METADATA +1 -1
- {splunk_soar_sdk-2.3.6.dist-info → splunk_soar_sdk-2.3.7.dist-info}/RECORD +8 -8
- {splunk_soar_sdk-2.3.6.dist-info → splunk_soar_sdk-2.3.7.dist-info}/WHEEL +0 -0
- {splunk_soar_sdk-2.3.6.dist-info → splunk_soar_sdk-2.3.7.dist-info}/entry_points.txt +0 -0
- {splunk_soar_sdk-2.3.6.dist-info → splunk_soar_sdk-2.3.7.dist-info}/licenses/LICENSE +0 -0
soar_sdk/actions_manager.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from typing import Optional, Any
|
|
2
2
|
import os
|
|
3
3
|
|
|
4
|
+
from soar_sdk.compat import remove_when_soar_newer_than
|
|
4
5
|
from soar_sdk.input_spec import InputSpecification
|
|
5
6
|
from soar_sdk.shims.phantom.base_connector import BaseConnector
|
|
6
7
|
|
|
@@ -8,13 +9,9 @@ from soar_sdk.meta.actions import ActionMeta
|
|
|
8
9
|
from soar_sdk.types import Action
|
|
9
10
|
from pydantic import ValidationError
|
|
10
11
|
from soar_sdk.shims.phantom.action_result import ActionResult as PhantomActionResult
|
|
12
|
+
from soar_sdk.shims.phantom.install_info import is_onprem_broker_install
|
|
11
13
|
from soar_sdk.logging import getLogger
|
|
12
14
|
|
|
13
|
-
try:
|
|
14
|
-
from phantom_common import install_info
|
|
15
|
-
except ImportError:
|
|
16
|
-
install_info = None
|
|
17
|
-
|
|
18
15
|
|
|
19
16
|
_INGEST_STATE_KEY = "ingestion_state"
|
|
20
17
|
_AUTH_STATE_KEY = "auth_state"
|
|
@@ -150,8 +147,10 @@ class ActionsManager(BaseConnector):
|
|
|
150
147
|
|
|
151
148
|
Returns APP_HOME directly on brokers, which contains the correct SDK app path.
|
|
152
149
|
"""
|
|
150
|
+
# Remove when 7.1.0 is the min supported broker version
|
|
151
|
+
remove_when_soar_newer_than("7.1.1")
|
|
153
152
|
# On AB, APP_HOME is set by spawn to the full app path at runtime
|
|
154
|
-
if
|
|
153
|
+
if is_onprem_broker_install():
|
|
155
154
|
return os.getenv("APP_HOME", "")
|
|
156
155
|
|
|
157
156
|
# For non-broker just proceed as we did before
|
|
@@ -5,8 +5,11 @@ try:
|
|
|
5
5
|
except ImportError:
|
|
6
6
|
_soar_is_available = False
|
|
7
7
|
|
|
8
|
+
from pathlib import Path
|
|
8
9
|
from typing import TYPE_CHECKING
|
|
9
10
|
|
|
11
|
+
from soar_sdk.compat import remove_when_soar_newer_than
|
|
12
|
+
|
|
10
13
|
if TYPE_CHECKING or not _soar_is_available:
|
|
11
14
|
import json
|
|
12
15
|
import abc
|
|
@@ -132,5 +135,10 @@ if TYPE_CHECKING or not _soar_is_available:
|
|
|
132
135
|
def initialize(self) -> bool:
|
|
133
136
|
return True
|
|
134
137
|
|
|
138
|
+
def get_app_dir(self) -> str:
|
|
139
|
+
# Remove when 7.1.0 is the min supported broker version
|
|
140
|
+
remove_when_soar_newer_than("7.1.1")
|
|
141
|
+
return Path.cwd().as_posix()
|
|
142
|
+
|
|
135
143
|
|
|
136
144
|
__all__ = ["BaseConnector"]
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
try:
|
|
2
|
-
from phantom_common.install_info import
|
|
2
|
+
from phantom_common.install_info import (
|
|
3
|
+
get_verify_ssl_setting,
|
|
4
|
+
get_product_version,
|
|
5
|
+
is_onprem_broker_install,
|
|
6
|
+
)
|
|
3
7
|
|
|
4
8
|
_soar_is_available = True
|
|
5
9
|
except ImportError:
|
|
@@ -17,6 +21,10 @@ if TYPE_CHECKING or not _soar_is_available:
|
|
|
17
21
|
"""Mock function to simulate the behavior of get_product_version."""
|
|
18
22
|
return "6.4.1"
|
|
19
23
|
|
|
24
|
+
def is_onprem_broker_install() -> bool:
|
|
25
|
+
"""Mock function to simulate the behavior of is_onprem_broker_install."""
|
|
26
|
+
return False
|
|
27
|
+
|
|
20
28
|
|
|
21
29
|
def is_soar_available() -> bool:
|
|
22
30
|
"""
|
|
@@ -25,4 +33,9 @@ def is_soar_available() -> bool:
|
|
|
25
33
|
return _soar_is_available
|
|
26
34
|
|
|
27
35
|
|
|
28
|
-
__all__ = [
|
|
36
|
+
__all__ = [
|
|
37
|
+
"get_product_version",
|
|
38
|
+
"get_verify_ssl_setting",
|
|
39
|
+
"is_onprem_broker_install",
|
|
40
|
+
"is_soar_available",
|
|
41
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: splunk-soar-sdk
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.7
|
|
4
4
|
Summary: The official framework for developing and testing Splunk SOAR Apps
|
|
5
5
|
Project-URL: Homepage, https://github.com/phantomcyber/splunk-soar-sdk
|
|
6
6
|
Project-URL: Documentation, https://github.com/phantomcyber/splunk-soar-sdk
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
soar_sdk/__init__.py,sha256=RzAng-ARqpK01SY82lNy4uYJFVG0yW6Q3CccEqbToJ4,726
|
|
2
2
|
soar_sdk/abstract.py,sha256=AU5ssJWytMp_RmYOxt_sKBqaFN63UfdMmzmAn0HQE_g,7940
|
|
3
3
|
soar_sdk/action_results.py,sha256=NQTcQ3NJcYB6h-YNRqO0bCG_hILmTidv2D4FdvCzyDE,11092
|
|
4
|
-
soar_sdk/actions_manager.py,sha256=
|
|
4
|
+
soar_sdk/actions_manager.py,sha256=IoNWiUzY4N76C9xwkNsyteSG6kt6EiunQODRq4QNZmg,6494
|
|
5
5
|
soar_sdk/app.py,sha256=WywDS9Eqy52u2lOQyuF6EfLHhLqCVjPTbFzIX06hiAs,33200
|
|
6
6
|
soar_sdk/app_cli_runner.py,sha256=fJoozhyAt7QUMuc02nE5RL_InpsjQBpr6U4rF9sey3E,11627
|
|
7
7
|
soar_sdk/app_client.py,sha256=GZmpenBl25-UQVVpELxWRJanmXBWNIQBRphcSAbnZlU,6253
|
|
@@ -69,11 +69,11 @@ soar_sdk/models/vault_attachment.py,sha256=_ARh74nv6iD9nH0dN3uayUYA7O8wIIiIKW98w
|
|
|
69
69
|
soar_sdk/models/view.py,sha256=fgPEdUNxu-Kbi4J0nOk16lkD0uof-PkxDumBcaQqKTE,832
|
|
70
70
|
soar_sdk/shims/phantom/action_result.py,sha256=jCZPljCcW5RMFA_Pp0OQ2Dg9c9c_PjDM9bm7Jj3wJrg,1635
|
|
71
71
|
soar_sdk/shims/phantom/app.py,sha256=PpNj9FoXjyj6r5w9S2fpElKFS6EcBIqsnpaTSvnIzyI,303
|
|
72
|
-
soar_sdk/shims/phantom/base_connector.py,sha256=
|
|
72
|
+
soar_sdk/shims/phantom/base_connector.py,sha256=6A98WNLoatuk96_CPuLXs6PrzB_kdk5_9J-6zmN7s0Q,4769
|
|
73
73
|
soar_sdk/shims/phantom/connector_result.py,sha256=T6eDXdMyblWB0Xa3RW4ojuhy9wJmWZTpY8Oojl5sYYk,641
|
|
74
74
|
soar_sdk/shims/phantom/consts.py,sha256=eq6AIuDhb2Z-CJORwv98D3JbcIOW8CC673zx5dNPFKU,404
|
|
75
75
|
soar_sdk/shims/phantom/encryption_helper.py,sha256=kiZNwBMgrhvVtNjKVP7ZswEn4DXxH8gTC-9tuxjVzTc,1386
|
|
76
|
-
soar_sdk/shims/phantom/install_info.py,sha256=
|
|
76
|
+
soar_sdk/shims/phantom/install_info.py,sha256=hR3W8pKlNUVlE1jOwGT_o2f6uTGQknPG3GLRDHrGSUQ,994
|
|
77
77
|
soar_sdk/shims/phantom/json_keys.py,sha256=QgDO5qGlcNNqJBsolJQs0UOW1sa8xMYIubqfCXeP4C4,528
|
|
78
78
|
soar_sdk/shims/phantom/ph_ipc.py,sha256=hl2hOPUXS7CIOpdW2E-nZojvOy8RSfRp5XDU1Fgsaak,1397
|
|
79
79
|
soar_sdk/shims/phantom/vault.py,sha256=JLNvUkhCtB_qUgI2tgnjl82xOJH--snZXJQBgH1JLOU,14257
|
|
@@ -96,8 +96,8 @@ soar_sdk/views/components/pie_chart.py,sha256=LVTeHVJN6nf2vjUs9y7PDBhS0U1fKW750l
|
|
|
96
96
|
soar_sdk/webhooks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
97
97
|
soar_sdk/webhooks/models.py,sha256=-rjuFA9cRX5zTLp7cHSHVTkt5eVJD6BdESGbj_qkyHI,4540
|
|
98
98
|
soar_sdk/webhooks/routing.py,sha256=BKbURSrBPdOTS5UFL-mHzFEr-Fj04mJMx9KeiPrZ2VQ,6872
|
|
99
|
-
splunk_soar_sdk-2.3.
|
|
100
|
-
splunk_soar_sdk-2.3.
|
|
101
|
-
splunk_soar_sdk-2.3.
|
|
102
|
-
splunk_soar_sdk-2.3.
|
|
103
|
-
splunk_soar_sdk-2.3.
|
|
99
|
+
splunk_soar_sdk-2.3.7.dist-info/METADATA,sha256=h4lVk3Go0IUwM8PvzUGOAw-LrZ9IurDsUCZNoXhHQmE,7361
|
|
100
|
+
splunk_soar_sdk-2.3.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
101
|
+
splunk_soar_sdk-2.3.7.dist-info/entry_points.txt,sha256=CgBjo2ZWpYNkt9TgvToL26h2Tg1yt8FbvYTb5NVgNuc,51
|
|
102
|
+
splunk_soar_sdk-2.3.7.dist-info/licenses/LICENSE,sha256=gNCGrGhrSQb1PUzBOByVUN1tvaliwLZfna-QU2r2hQ8,11345
|
|
103
|
+
splunk_soar_sdk-2.3.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|