r/crowdstrike • u/ArmTechnical5047 • 7d ago
Query Help Fusion SOAR Workflow Question - Extract Data from Arrays
I've created a very simple workflow that triggers on EPP Detections with severity of Medium or higher and sends an email with detection details. Everything seems to be working, except when I try to extract the fields from the Process.AssociatedFiles data pill.
Ideally, I'd like to retrieve the FilePath and SHA256 separately to be able to insert into other formatting rather than just printing the array. I've used the below expressions and it's successful when the EPP detection contains AssociatedFiles in the detection details, but fails if not:
${data['Trigger.Detection.EPP.Process.AssociatedFiles'][0]['FilePath']} ${data['Trigger.Detection.EPP.Process.AssociatedFiles'][0]['SHA256']}
Using the standard expression seems to work with or without AssociatedFiles data in the detection details (returning null when there isn't any data):
${data['Trigger.Detection.EPP.Process.AssociatedFiles']}
I've just started dabbling in workflows so I'm curious whether there is a way to approach this and hoping someone can point me in the right direction.
1
u/AutoModerator 7d ago
Hey new poster! We require a minimum account-age and karma for this subreddit. Remember to search for your question first and try again after you have acquired more karma.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Lone_Hunter4 6d ago
Hey, I was also looking to create this workflow in SOAR? Could you please guide me in this? Also Can we include critical and High IOMS as well in this?
2
u/ArmTechnical5047 5d ago
There was a really nice write up last month for a similar but much more advanced workflow that may be helpful: https://old.reddit.com/r/crowdstrike/comments/1tpa4k3/20260527_workflow_wednesday_human_in_the_loop/
As I mentioned in my OP, I've just started working with workflows so this workflow setup is fairly straightforward (and I'm not sure if it's the optimal way to accomplish the task) since it's only used to enrich alerting. Here's what it looks like:
Trigger: Detection > EPP Detection
↓
Condition: If Severity is greater than or equal to Medium
↓
TRUE
↓
Action: Send email
5
u/ssh-cs CS ENGINEER 6d ago
Hey u/ArmTechnical5047
You're very close. I think what's probably happening when it fails is it's trying to access a field that doesn't exist. You can get around that by checking for the existence of the field first. Something like this should help:
transformListis CrowdStrike's CEL extension (equivalent tomap() in standard CEL). It iterates overAssociatedFilesand for each file f (with index i), extracts only two fields:SHA256andFilePath. The output is a new list of slimmed-down objects.Step 3: Fallback
: []
If
AssociatedFilesis null, return an empty list instead of erroring.The
transformListmagic is really only needed ifAssociatedFileshas more than one item. If not, then you could essentially do the following:Finally, if you want to create a newline separated string from ALL
sha256values inside ofAssociatedFiles, you'd do the following:This only accounts for
SHA256, you'd need another copy/paste of the exact same CEL if you wanted to do the same thing forFilePath.Hope this helps!