Splunk SOAR (f.k.a. Phantom)

How to set the run_automation flag as a parameter?

dennis_rhodes
New Member

Hey All, I have a Splunk search that sends 50 Splunk Events into 1 Phantom container with 50 artifacts (one for each Splunk Event). However, the playbook kicks off for each artifact created, is there a way to pass the run_automation flag as False when running my search?

Labels (2)
0 Karma

ansusabu
Communicator

You can give a custom python script in the Rest API app, which creates container in phantom. Here is the pseudo code:

  # Acquire some container/artifact data to post
  container = get_container()
  artifacts = get_artifact_list_for_container(container)

  # post your container
  do_post_container(container)
  # Set run_automation to false on all but the last one
  for artifact in artifacts[:-1]:
    artifact["run_automation"] = False
    do_post_artifact(artifact)
  do_post_artifact(artifacts[-1])

You can view this code at the last part of https://my.phantom.us/4.2/docs/rest/overview

0 Karma

WalshyB
SplunkTrust
SplunkTrust

From my understanding, this is not possible but it happens because when it needs to trigger a playbook, it spots a time difference between artifact 1's creation and e.g. artifact 5's so it causes another trigger.

If you use event forwarding, it will not separate them into multiple artifacts, like "send to phantom" does for multi-value fields. This would stop it running multiple times but would then need a custom function in a playbook to separate again with the run_automation flag set to false.

I would be interested in knowing a way around this if in the time this question has been up, you've found a solution 🙂

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...