Skip to content

Commit a44cedd

Browse files
committed
Force fitted strings in arguments for subflow
1 parent 1cea5fa commit a44cedd

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

azure-sentinel/1.0.0/api.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ actions:
243243
parameters:
244244
- name: query
245245
description: The query to run
246-
multiline: false
246+
multiline: true
247247
example: "SecurityEvent | where EventID == \"4688\" | where CommandLine contains \"-noni -ep bypass $\""
248248
required: true
249249
schema:

shuffle-subflow/1.0.0/src/app.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,27 @@ def run_subflow(self, user_apikey, workflow, argument, source_workflow="", sourc
3434
url = "%s/api/v1/workflows/%s/execute" % (self.url, workflow)
3535

3636
params = {}
37-
if len(source_workflow) > 0:
37+
if len(str(source_workflow)) > 0:
3838
params["source_workflow"] = source_workflow
3939
else:
4040
print("No source workflow")
4141

42-
if len(source_auth) > 0:
42+
if len(str(source_auth)) > 0:
4343
params["source_auth"] = source_auth
4444
else:
4545
print("No source auth")
4646

47-
if len(source_node) > 0:
47+
if len(str(source_node)) > 0:
4848
params["source_node"] = source_node
4949
else:
5050
print("No source node")
5151

52-
if len(source_execution) > 0:
52+
if len(str(source_execution)) > 0:
5353
params["source_execution"] = source_execution
5454
else:
5555
print("No source execution")
5656

57-
if len(startnode) > 0:
57+
if len(str(startnode)) > 0:
5858
params["start"] = startnode
5959
else:
6060
print("No startnode")
@@ -63,7 +63,7 @@ def run_subflow(self, user_apikey, workflow, argument, source_workflow="", sourc
6363
"Authorization": "Bearer %s" % user_apikey,
6464
}
6565

66-
if len(argument) == 0:
66+
if len(str(argument)) == 0:
6767
ret = requests.post(url, headers=headers, params=params)
6868
else:
6969
if not isinstance(argument, list) and not isinstance(argument, object) and not isinstance(argument, dict):
@@ -74,7 +74,7 @@ def run_subflow(self, user_apikey, workflow, argument, source_workflow="", sourc
7474

7575
try:
7676
ret = requests.post(url, headers=headers, params=params, json=argument)
77-
print(f"Successfully sent argument of length {len(argument)} as JSON")
77+
print(f"Successfully sent argument of length {len(str(argument))} as JSON")
7878
except:
7979
try:
8080
ret = requests.post(url, headers=headers, json=argument, params=params)

0 commit comments

Comments
 (0)