Skip to content

Commit cb4090a

Browse files
refactor(sig-events): rename verdict to status, simplify triage workflow
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 514f5cb commit cb4090a

14 files changed

Lines changed: 143 additions & 300 deletions

File tree

src/platform/packages/shared/kbn-workflows/managed/definitions/sig_events/discovery.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ steps:
405405
continue: true
406406

407407
- name: get_active_events
408-
# No verdict filter — ES filters BEFORE collapse; post-filtered in compute_active_events_context.
408+
# No status filter — ES filters BEFORE collapse; post-filtered in compute_active_events_context.
409409
type: elasticsearch.request
410410
with:
411411
method: POST
@@ -421,7 +421,7 @@ steps:
421421
includes:
422422
- discovery_slug
423423
- title
424-
- verdict
424+
- status
425425
query:
426426
bool:
427427
filter:
@@ -436,8 +436,8 @@ steps:
436436
- name: compute_active_events_context
437437
type: data.set
438438
with:
439-
promoted_events: "${{ steps.get_active_events.output.hits.hits | where: '_source.verdict', 'promoted' | map: '_source' | default: [] }}"
440-
acknowledged_events: "${{ steps.get_active_events.output.hits.hits | where: '_source.verdict', 'acknowledged' | map: '_source' | default: [] }}"
439+
promoted_events: "${{ steps.get_active_events.output.hits.hits | where: '_source.status', 'promoted' | map: '_source' | default: [] }}"
440+
acknowledged_events: "${{ steps.get_active_events.output.hits.hits | where: '_source.status', 'acknowledged' | map: '_source' | default: [] }}"
441441

442442
- name: run_investigator_agent
443443
# TODO: agent-id and connector-id are config fields and are NOT rendered through Liquid by the
@@ -633,7 +633,7 @@ steps:
633633
is_not_group: "${{ foreach.item.grouped_discovery_ids == null or foreach.item.grouped_discovery_ids.size == 0 }}"
634634

635635
- name: get_active_event_for_slug
636-
# No verdict filter — post-filtered in compute_active_event_for_slug.
636+
# No status filter — post-filtered in compute_active_event_for_slug.
637637
type: elasticsearch.request
638638
with:
639639
method: POST
@@ -647,7 +647,7 @@ steps:
647647
order: desc
648648
_source:
649649
includes:
650-
- verdict
650+
- status
651651
query:
652652
bool:
653653
filter:
@@ -663,9 +663,9 @@ steps:
663663
with:
664664
has_active_event: >-
665665
${{ steps.get_active_event_for_slug.output.hits.total.value > 0
666-
and steps.get_active_event_for_slug.output.hits.hits[0]._source.verdict == consts.VERDICT_PROMOTED
666+
and steps.get_active_event_for_slug.output.hits.hits[0]._source.status == consts.STATUS_PROMOTED
667667
or steps.get_active_event_for_slug.output.hits.total.value > 0
668-
and steps.get_active_event_for_slug.output.hits.hits[0]._source.verdict == consts.VERDICT_ACKNOWLEDGED }}
668+
and steps.get_active_event_for_slug.output.hits.hits[0]._source.status == consts.STATUS_ACKNOWLEDGED }}
669669
670670
- name: check_recent_finding
671671
if: "${{ foreach.item.detections != null and foreach.item.detections.size > 0 }}"

src/platform/packages/shared/kbn-workflows/managed/definitions/sig_events/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ export const SIGEVENTS_DISCOVERY_WORKFLOW = {
4646
export const SIGEVENTS_ORCHESTRATOR_WORKFLOW = {
4747
id: SIGEVENTS_ORCHESTRATOR_WORKFLOW_ID,
4848
pluginId: 'streams',
49-
version: 8,
49+
version: 9,
5050
yaml: ORCHESTRATOR_YAML,
5151
management: SIGEVENTS_WORKFLOW_MANAGEMENT,
5252
} as const satisfies ManagedWorkflowDefinition;
5353

5454
export const SIGEVENTS_TRIAGE_WORKFLOW = {
5555
id: SIGEVENTS_TRIAGE_WORKFLOW_ID,
5656
pluginId: 'streams',
57-
version: 5,
57+
version: 6,
5858
yaml: TRIAGE_YAML,
5959
management: SIGEVENTS_WORKFLOW_MANAGEMENT,
6060
} as const satisfies ManagedWorkflowDefinition;

0 commit comments

Comments
 (0)