Repository navigation
[Nightshift][Detection] Stamp discovery detections from written events - #306694
crespocarlos wants to merge 9 commits into
Conversation
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ot YAML literals Co-authored-by: Cursor <cursoragent@cursor.com>
b6f93cc to
7e06f8f
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This comment has been minimized.
This comment has been minimized.
… stamp rules Co-authored-by: Cursor <cursoragent@cursor.com>
… guards Co-authored-by: Cursor <cursoragent@cursor.com>
🌯 Save a burrito@crespocarlos, if you're still iterating on this PR, consider converting it to draft: 4 CI builds were cancelled in the last few hours before they finished. Drafts don't run CI automatically, and you can comment |
⏳ Build in-progress, with failures
Failed CI StepsHistory
|
… definition Co-authored-by: Cursor <cursoragent@cursor.com>
|
/ci |
🧪 E2E: ✅ pass · 4 checks · 4 findings ·
|

closes https://github.com/elastic/nightshift-program/issues/2439
Summary
Discovery stamped detections as processed from the rule uuids the agent copied into
written_rule_uuids. About 1.4% of those matched no rule, so those detections went back into the queue each cycle with no error or log line.A new step,
significantEvents.resolveWrittenDetections, now works out the rules to stamp. It takes the batch detections whose events this run wrote, found throughdata.workflow_execution_id, and adds the agent-reported rules that exist in the batch. Reported rules that are not in the batch are dropped, warned about and sent in the_completedtelemetry asunknown_reported_rule_count.The stamping query and the
_mark_processedroute are unchanged.How to test
unknown_reported_rule_countis above 0.Checklist
Identify risks
resolve_written_detectionshason-failure: continue, unlikeclassify_detections. The agent has already written its events when it runs, so a failure should not skip stamping or the report.written_rule_countnow counts rules stamped as processed, not rules the agent reported. The field name is unchanged, so check any dashboards that read it.