Security Orchestration and Automation (SOAR) in Cybersecurity - Time & Space Complexity
When using SOAR systems, it is important to understand how the time to process security tasks grows as the number of alerts or incidents increases.
We want to know how the system's work changes when handling more security events.
Analyze the time complexity of the following simplified SOAR workflow automation code.
for alert in alerts:
if alert.is_critical():
notify_team(alert)
enrich_data(alert)
log_alert(alert)
This code processes each alert by checking its severity, notifying the team if critical, enriching alert data, and logging it.
Identify the loops, recursion, array traversals that repeat.
- Primary operation: Looping through each alert in the list.
- How many times: Once for every alert received.
As the number of alerts grows, the system processes each alert one by one.
| Input Size (n) | Approx. Operations |
|---|---|
| 10 | About 10 alert checks and actions |
| 100 | About 100 alert checks and actions |
| 1000 | About 1000 alert checks and actions |
Pattern observation: The work grows directly with the number of alerts; doubling alerts doubles the work.
Time Complexity: O(n)
This means the time to process alerts grows in a straight line with the number of alerts.
[X] Wrong: "Processing one alert takes the same time no matter how many alerts there are."
[OK] Correct: Each alert adds more work, so total time increases as alerts increase.
Understanding how SOAR workflows scale helps you explain how automation handles growing security data efficiently.
"What if the enrich_data function itself loops through a list of threat intelligence sources for each alert? How would the time complexity change?"