I'm interested in suggestions on how to tackle this. I know how I would implement it in Python, but not really sure best practice for SOAR.
Let's say I have an Action called "Lookup Host" If it ...
See more...
I'm interested in suggestions on how to tackle this. I know how I would implement it in Python, but not really sure best practice for SOAR.
Let's say I have an Action called "Lookup Host" If it runs successfully, it returns a dict with some data [{"hostname": "test1", "device_id": "abc123"}] but we might actually not have data on this host, so it will return empty: [] I need to ensure that we have data, otherwise later playbook actions won't complete. Would we use a decision here - like "If result != []: continue, else: exit playbook" Here's is loosely what I want to do, but in Python Code:
result = LookupHost(hostname="test1")
if result:
# Have a result, so can continue
run_second_action()
else:
# no data found, exit
exit(0)