splunk-soar-sdk 3.7.0__py3-none-any.whl → 3.8.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.
- soar_sdk/action_results.py +1 -1
- soar_sdk/asset.py +12 -0
- {splunk_soar_sdk-3.7.0.dist-info → splunk_soar_sdk-3.8.1.dist-info}/METADATA +1 -1
- {splunk_soar_sdk-3.7.0.dist-info → splunk_soar_sdk-3.8.1.dist-info}/RECORD +7 -7
- {splunk_soar_sdk-3.7.0.dist-info → splunk_soar_sdk-3.8.1.dist-info}/WHEEL +0 -0
- {splunk_soar_sdk-3.7.0.dist-info → splunk_soar_sdk-3.8.1.dist-info}/entry_points.txt +0 -0
- {splunk_soar_sdk-3.7.0.dist-info → splunk_soar_sdk-3.8.1.dist-info}/licenses/LICENSE +0 -0
soar_sdk/action_results.py
CHANGED
soar_sdk/asset.py
CHANGED
|
@@ -34,6 +34,7 @@ def AssetField(
|
|
|
34
34
|
sensitive: bool = False,
|
|
35
35
|
alias: str | None = None,
|
|
36
36
|
category: FieldCategory = FieldCategory.CONNECTIVITY,
|
|
37
|
+
is_file: bool = False,
|
|
37
38
|
) -> Any: # noqa: ANN401
|
|
38
39
|
"""Define an asset configuration field with SOAR-specific metadata.
|
|
39
40
|
|
|
@@ -47,6 +48,8 @@ def AssetField(
|
|
|
47
48
|
sensitive: Marks the field as secret so it is encrypted and hidden from logs.
|
|
48
49
|
alias: Alternate name to emit in the manifest instead of the attribute name.
|
|
49
50
|
category: Grouping used to organize fields in the SOAR UI.
|
|
51
|
+
is_file: Marks the field as a file upload field. The field must be typed as
|
|
52
|
+
str and will receive the file contents as a string.
|
|
50
53
|
|
|
51
54
|
Returns:
|
|
52
55
|
A Pydantic ``Field`` carrying the metadata needed for manifest generation.
|
|
@@ -58,6 +61,8 @@ def AssetField(
|
|
|
58
61
|
json_schema_extra["value_list"] = value_list
|
|
59
62
|
if sensitive is not None:
|
|
60
63
|
json_schema_extra["sensitive"] = sensitive
|
|
64
|
+
if is_file:
|
|
65
|
+
json_schema_extra["is_file"] = True
|
|
61
66
|
|
|
62
67
|
# Use ... for required fields
|
|
63
68
|
field_default: Any = ... if default is None and required else default
|
|
@@ -222,6 +227,13 @@ class BaseAsset(BaseModel):
|
|
|
222
227
|
)
|
|
223
228
|
type_name = "password"
|
|
224
229
|
|
|
230
|
+
if json_schema_extra.get("is_file", False):
|
|
231
|
+
if field_type is not str:
|
|
232
|
+
raise TypeError(
|
|
233
|
+
f"File parameter {field_name} must be type str, not {field_type.__name__}"
|
|
234
|
+
)
|
|
235
|
+
type_name = "file"
|
|
236
|
+
|
|
225
237
|
if not (description := field.description):
|
|
226
238
|
description = cls._default_field_description(field_name)
|
|
227
239
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: splunk-soar-sdk
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.8.1
|
|
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,11 +1,11 @@
|
|
|
1
1
|
soar_sdk/__init__.py,sha256=RzAng-ARqpK01SY82lNy4uYJFVG0yW6Q3CccEqbToJ4,726
|
|
2
2
|
soar_sdk/abstract.py,sha256=GycJhTrSNDa7eDg8hOD7hJjIt5eHEykZhpza-jh_Veo,7787
|
|
3
|
-
soar_sdk/action_results.py,sha256=
|
|
3
|
+
soar_sdk/action_results.py,sha256=VUsk41l8XC1Dlz4o2XrTiUc2MWLUTIVe6YqpkREEjiY,11912
|
|
4
4
|
soar_sdk/actions_manager.py,sha256=8IYOi2k8i9LHXEhQVZ0Ig3IS1gD3iAmOJ9q0bi14g-o,7179
|
|
5
5
|
soar_sdk/app.py,sha256=2bUWx1BgWS9Kwkp0aUzVWM8LTdVUq1JI2eXR0LhwEMU,37092
|
|
6
6
|
soar_sdk/app_cli_runner.py,sha256=K1ATWyGs0iNgPfIjMthsN72laOXqXCFZNEXfuzAMOM4,11645
|
|
7
7
|
soar_sdk/app_client.py,sha256=hbe1R2QwXDmoS4959a-ay9oylD1Qk-oPJvJRnxvICz0,6281
|
|
8
|
-
soar_sdk/asset.py,sha256=
|
|
8
|
+
soar_sdk/asset.py,sha256=CUCFjUVAawrk3hyGvQn_qNApqJx8J4VxzD--iGEE2pc,12123
|
|
9
9
|
soar_sdk/asset_state.py,sha256=qh4n8IoabVObIZXRPyM0zznwC5LcJpbADcybmDdQABc,2318
|
|
10
10
|
soar_sdk/async_utils.py,sha256=Dz7RagIRjyIagA9vivHWSb18S96J2WOuDB8B5Zy64AE,1428
|
|
11
11
|
soar_sdk/colors.py,sha256=--i_iXqfyITUz4O95HMjfZQGbwFZ34bLmBhtfpXXqlQ,1095
|
|
@@ -116,8 +116,8 @@ soar_sdk/views/components/pie_chart.py,sha256=LVTeHVJN6nf2vjUs9y7PDBhS0U1fKW750l
|
|
|
116
116
|
soar_sdk/webhooks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
117
117
|
soar_sdk/webhooks/models.py,sha256=j3kbvYmcOlcj3gQYKtrv7iS-lDavMKYNLdCNMy_I2Hc,4542
|
|
118
118
|
soar_sdk/webhooks/routing.py,sha256=OjezhuAb8wzW0MnbGSnIWeAH3uJcu-Sb7s3w9zoiPVM,6873
|
|
119
|
-
splunk_soar_sdk-3.
|
|
120
|
-
splunk_soar_sdk-3.
|
|
121
|
-
splunk_soar_sdk-3.
|
|
122
|
-
splunk_soar_sdk-3.
|
|
123
|
-
splunk_soar_sdk-3.
|
|
119
|
+
splunk_soar_sdk-3.8.1.dist-info/METADATA,sha256=77J-AZGoWNo716WsgJyepjKsR9fxgZoJ-g_EdHBnjHI,7544
|
|
120
|
+
splunk_soar_sdk-3.8.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
121
|
+
splunk_soar_sdk-3.8.1.dist-info/entry_points.txt,sha256=CgBjo2ZWpYNkt9TgvToL26h2Tg1yt8FbvYTb5NVgNuc,51
|
|
122
|
+
splunk_soar_sdk-3.8.1.dist-info/licenses/LICENSE,sha256=gNCGrGhrSQb1PUzBOByVUN1tvaliwLZfna-QU2r2hQ8,11345
|
|
123
|
+
splunk_soar_sdk-3.8.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|