contexa-core Enterprise

SOAR Overview

Security Orchestration, Automation and Response (SOAR). An AI-driven incident response system that processes security incidents through a tool-execution pipeline with configurable approval workflows and execution modes.

Overview

Contexa SOAR bridges the gap between AI-driven threat detection and automated incident response. When the tiered evaluation pipeline produces a critical security decision (e.g., Layer 2 detects a BLOCK-worthy threat), the SOAR system orchestrates the response: selecting appropriate tools, managing approval workflows, executing response actions, and maintaining audit trails.

The SOAR architecture follows the AI Lab pattern: a SoarLab receives a SoarRequest containing the incident context, processes it through the LLM-powered pipeline, determines which @SoarTool-annotated methods to invoke, and manages the approval flow before execution.

Security Incident
SoarRequest
SoarLab
Tool Selection
Approval Workflow
Tool Execution
SoarResponse

SoarLab

The SOAR processing lab. Implements the AI Lab interface to provide reactive incident processing.

public interface SoarLab
processAsync Mono<?>

Processes a SOAR request through the AI pipeline asynchronously. Analyzes the incident, selects appropriate tools, manages approval workflows, and executes the response plan.

request SoarRequest The SOAR request containing incident context and processing parameters.

SoarContext

The rich context object that tracks the full lifecycle of a SOAR session. Extends DomainContext and maintains incident details, session state, conversation history, approval requests, tool execution results, and LLM interaction state.

public class SoarContext extends DomainContext
FieldTypeDescription
incidentIdStringUnique identifier for the security incident.
threatTypeStringClassification of the threat (e.g., "UNAUTHORIZED_ACCESS").
severityStringIncident severity level.
descriptionStringHuman-readable incident description.
affectedAssetsList<String>List of affected system assets.
currentStatusStringCurrent incident status.
organizationIdStringThe organization context.
sessionStateSessionStateCurrent session lifecycle state (NEW, INITIALIZED, ACTIVE, ANALYZING, INVESTIGATING, WAITING_APPROVAL, EXECUTING, etc.).
executionModeSoarExecutionModeHow the SOAR pipeline processes this context (SYNC, ASYNC, AUTO).
threatLevelThreatLevelAssessed threat level (CRITICAL, HIGH, MEDIUM, LOW, INFO, UNKNOWN).
riskScoredoubleNumeric risk assessment.
conversationHistoryList<Message>Full LLM conversation history for this session.
approvalRequestsList<ApprovalRequest>All approval requests generated during processing.
approvedToolsSet<String>Tools that have been approved for execution.
humanApprovalNeededbooleanWhether human approval is currently required.
emergencyModebooleanWhether emergency mode is active (bypasses normal approval flows).
transitionTo void

Transitions the session to a new state.

approveTool void

Marks a tool as approved for execution in this session.

addToolExecutionResult void

Records the result of a tool execution for audit and context tracking.

SoarRequest

The request object that initiates SOAR processing. Extends AIRequest<SoarContext> and wraps the context with template and diagnosis type configuration.

public class SoarRequest extends AIRequest<SoarContext>
Java
SoarRequest request = SoarRequest.builder()
    .context(soarContext)
    .incidentId("INC-2024-001")
    .threatType("UNAUTHORIZED_ACCESS")
    .description("Suspicious login from unrecognized IP range")
    .initialQuery("Investigate and contain the unauthorized access attempt")
    .sessionId("session-abc-123")
    .userId("admin-user")
    .build();

SoarExecutionMode

public enum SoarExecutionMode
ValueCodeDescription
SYNCsyncSynchronous approval processing with blocking wait. The caller blocks until approval is received or times out.
ASYNCasyncAsynchronous approval processing with persistence. Approval requests are stored and can be resolved later.
AUTOautoAutomatic mode selection based on context. Low-risk tools use SYNC; high-risk tools use ASYNC with mandatory approval.

SoarIncident

Represents a security incident with full lifecycle tracking from detection through resolution.

public class SoarIncident

IncidentStatus

ValueDescription
NEWIncident just created.
INVESTIGATINGUnder active investigation.
IN_PROGRESSResponse actions in progress.
CONTAINEDThreat contained but not eradicated.
MITIGATEDImpact mitigated.
ERADICATEDThreat fully removed.
RECOVEREDSystems recovered to normal operation.
RESOLVEDIncident resolved.
CLOSEDIncident closed after post-mortem.
FALSE_POSITIVEConfirmed as false positive.

IncidentType

ValueDescription
MALWAREMalware infection.
RANSOMWARERansomware attack.
PHISHINGPhishing attempt.
DATA_BREACHData breach or exfiltration.
UNAUTHORIZED_ACCESSUnauthorized access attempt.
DOS_ATTACKDenial of Service attack.
INSIDER_THREATInsider threat activity.
VULNERABILITYVulnerability exploitation.
COMPLIANCE_VIOLATIONCompliance policy violation.
OTHERUncategorized incident.

Related