File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
actions/detection_testing/infrastructures
objects/abstract_security_content_objects Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ class DetectionTestingManagerOutputDto:
8989 start_time : Union [datetime .datetime , None ] = None
9090 replay_index : str = "contentctl_testing_index"
9191 replay_host : str = "CONTENTCTL_HOST"
92- timeout_seconds : int = 60
92+ timeout_seconds : int = 120
9393 terminate : bool = False
9494
9595
Original file line number Diff line number Diff line change @@ -1055,3 +1055,30 @@ def get_summary(
10551055 # Return the summary
10561056
10571057 return summary_dict
1058+
1059+ @model_validator (mode = "after" )
1060+ def validate_data_source_output_fields (self ):
1061+ # Skip validation for Hunting and Correlation types, or non-production detections
1062+ if self .status != DetectionStatus .production or self .type in {
1063+ AnalyticsType .Hunting ,
1064+ AnalyticsType .Correlation ,
1065+ }:
1066+ return self
1067+
1068+ # Validate that all required output fields are present in the search
1069+ for data_source in self .data_source_objects :
1070+ if not data_source .output_fields :
1071+ continue
1072+
1073+ missing_fields = [
1074+ field for field in data_source .output_fields if field not in self .search
1075+ ]
1076+
1077+ if missing_fields :
1078+ raise ValueError (
1079+ f"Data source '{ data_source .name } ' has output fields "
1080+ f"{ missing_fields } that are not present in the search "
1081+ f"for detection '{ self .name } '"
1082+ )
1083+
1084+ return self
You can’t perform that action at this time.
0 commit comments