splunk-soar-sdk 1.6.1__py3-none-any.whl → 1.6.3__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/action_results.py +9 -7
- soar_sdk/app.py +1 -1
- soar_sdk/shims/phantom/encryption_helper.py +6 -0
- {splunk_soar_sdk-1.6.1.dist-info → splunk_soar_sdk-1.6.3.dist-info}/METADATA +1 -1
- {splunk_soar_sdk-1.6.1.dist-info → splunk_soar_sdk-1.6.3.dist-info}/RECORD +8 -8
- {splunk_soar_sdk-1.6.1.dist-info → splunk_soar_sdk-1.6.3.dist-info}/WHEEL +0 -0
- {splunk_soar_sdk-1.6.1.dist-info → splunk_soar_sdk-1.6.3.dist-info}/entry_points.txt +0 -0
- {splunk_soar_sdk-1.6.1.dist-info → splunk_soar_sdk-1.6.3.dist-info}/licenses/LICENSE +0 -0
soar_sdk/action_results.py
CHANGED
|
@@ -200,13 +200,15 @@ class ActionOutput(BaseModel):
|
|
|
200
200
|
field_type = get_args(field_type)[0]
|
|
201
201
|
datapath += ".*"
|
|
202
202
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
203
|
+
if get_origin(field_type) is Union or get_origin(field_type) is Optional:
|
|
204
|
+
type_args = [
|
|
205
|
+
arg for arg in get_args(field_type) if arg is not type(None)
|
|
206
|
+
]
|
|
207
|
+
if len(type_args) > 1:
|
|
208
|
+
raise TypeError(
|
|
209
|
+
f"Output field {field_name} is invalid: the only valid Union type is Optional, or Union[X, None]."
|
|
210
|
+
)
|
|
211
|
+
field_type = type_args[0]
|
|
210
212
|
|
|
211
213
|
if issubclass(field_type, ActionOutput):
|
|
212
214
|
# If the field is another ActionOutput, recursively call _to_json_schema
|
soar_sdk/app.py
CHANGED
|
@@ -177,7 +177,7 @@ class App:
|
|
|
177
177
|
# Decrypt sensitive fields in the asset configuration
|
|
178
178
|
asset_id = input_data.asset_id
|
|
179
179
|
for field in self.asset_cls.fields_requiring_decryption():
|
|
180
|
-
if
|
|
180
|
+
if self._raw_asset_config.get(field):
|
|
181
181
|
self._raw_asset_config[field] = platform_encryption_backend.decrypt(
|
|
182
182
|
self._raw_asset_config[field], str(asset_id)
|
|
183
183
|
)
|
|
@@ -22,6 +22,12 @@ if TYPE_CHECKING or not _soar_is_available:
|
|
|
22
22
|
@staticmethod
|
|
23
23
|
def decrypt(cipher: str, salt: str) -> str:
|
|
24
24
|
"""Simulate the behavior of encryption_helper.decrypt."""
|
|
25
|
+
|
|
26
|
+
if len(cipher) == 0:
|
|
27
|
+
# This isn't exactly what the platform does, but its close enough for our purpose
|
|
28
|
+
raise ValueError(
|
|
29
|
+
"Parameter validation failed: Invalid length for parameter SecretId, value: 0, valid min length: 1"
|
|
30
|
+
)
|
|
25
31
|
decoded = base64.b64decode(cipher.encode("utf-8")).decode("utf-8")
|
|
26
32
|
plain, decrypted_salt = decoded.split(":", 1)
|
|
27
33
|
if salt != decrypted_salt:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: splunk-soar-sdk
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.3
|
|
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,8 +1,8 @@
|
|
|
1
1
|
soar_sdk/__init__.py,sha256=RzAng-ARqpK01SY82lNy4uYJFVG0yW6Q3CccEqbToJ4,726
|
|
2
2
|
soar_sdk/abstract.py,sha256=jGXs2Fv5TRpnh5Duz3mWjY8_DAOpY4RSSzvw_z4XN4I,7950
|
|
3
|
-
soar_sdk/action_results.py,sha256=
|
|
3
|
+
soar_sdk/action_results.py,sha256=4uKVz-oUVJf9idMdTijUD28PdF6ZKNdrpOTkMCRD0Fs,10202
|
|
4
4
|
soar_sdk/actions_manager.py,sha256=wJCyfzkI_6OKZ-Kmll4vRJpGvYdL93Uw-JyEEGnKcw0,5779
|
|
5
|
-
soar_sdk/app.py,sha256=
|
|
5
|
+
soar_sdk/app.py,sha256=KhRpCUtbvF4g6Ecn9iSNv6Su5KMIB1VhfRdGxIPdP8A,32884
|
|
6
6
|
soar_sdk/app_cli_runner.py,sha256=fJoozhyAt7QUMuc02nE5RL_InpsjQBpr6U4rF9sey3E,11627
|
|
7
7
|
soar_sdk/app_client.py,sha256=0r3jIvMM8szCEHXOgRu07VaovKH96pZut5rn2GfYcsc,6275
|
|
8
8
|
soar_sdk/asset.py,sha256=deS8_B5hr7W2fED8_6wUpVriRgiQ5r8TkGVHiasIaro,10666
|
|
@@ -72,7 +72,7 @@ soar_sdk/shims/phantom/app.py,sha256=PpNj9FoXjyj6r5w9S2fpElKFS6EcBIqsnpaTSvnIzyI
|
|
|
72
72
|
soar_sdk/shims/phantom/base_connector.py,sha256=s8sHCXX2LbnsSjfbzRm4UMsHRZNsx-jcvjIT80kye-I,4490
|
|
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
|
-
soar_sdk/shims/phantom/encryption_helper.py,sha256=
|
|
75
|
+
soar_sdk/shims/phantom/encryption_helper.py,sha256=kiZNwBMgrhvVtNjKVP7ZswEn4DXxH8gTC-9tuxjVzTc,1386
|
|
76
76
|
soar_sdk/shims/phantom/install_info.py,sha256=DaU9heIZk-TmlqMubdzXM00ZMO_KqocVCz3UnY2_TvQ,740
|
|
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
|
|
@@ -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-1.6.
|
|
100
|
-
splunk_soar_sdk-1.6.
|
|
101
|
-
splunk_soar_sdk-1.6.
|
|
102
|
-
splunk_soar_sdk-1.6.
|
|
103
|
-
splunk_soar_sdk-1.6.
|
|
99
|
+
splunk_soar_sdk-1.6.3.dist-info/METADATA,sha256=0_WxMtlZ3BrXjEpcCJ5Yg8nVkQi4gfv9ProOkQPr1mw,7361
|
|
100
|
+
splunk_soar_sdk-1.6.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
101
|
+
splunk_soar_sdk-1.6.3.dist-info/entry_points.txt,sha256=CgBjo2ZWpYNkt9TgvToL26h2Tg1yt8FbvYTb5NVgNuc,51
|
|
102
|
+
splunk_soar_sdk-1.6.3.dist-info/licenses/LICENSE,sha256=gNCGrGhrSQb1PUzBOByVUN1tvaliwLZfna-QU2r2hQ8,11345
|
|
103
|
+
splunk_soar_sdk-1.6.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|