[BugFix] Windows/System: Populate Scheduled Task Enabled When Omitted - #20965
Conversation
✅ Elastic Docs Style Checker (Vale)No issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
|
Pinging @elastic/sec-windows-platform (Team:Security-Windows Platform) |
There was a problem hiding this comment.
Pull request overview
This PR fixes scheduled task normalization in the Windows forwarded and System security pipelines by treating an omitted Settings/Enabled element as effectively enabled (true), matching Task Scheduler defaults, and updates docs/tests accordingly.
Changes:
- Default
winlog.scheduled_task.settings.enabledtotruewhenSettingsexists butEnabledis omitted (while preserving explicit values and ignoring invalid ones). - Update field documentation to describe effective enabled semantics and omission/invalid handling.
- Update existing pipeline test expectations and bump package versions + changelogs.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/windows/manifest.yml | Bumps Windows package version to 3.9.3. |
| packages/windows/data_stream/forwarded/fields/winlog.yml | Updates field description for effective enabled semantics. |
| packages/windows/data_stream/forwarded/elasticsearch/ingest_pipeline/security_scheduled_task.yml | Implements Settings/Enabled defaulting behavior when omitted. |
| packages/windows/data_stream/forwarded/_dev/test/pipeline/test-security-4700-scheduled-task-trigger-defaults.json-expected.json | Updates expected output to include settings.enabled: true. |
| packages/windows/data_stream/forwarded/_dev/test/pipeline/test-security-4700-scheduled-task-enabled.json-expected.json | Updates expected output to include settings.enabled: true. |
| packages/windows/data_stream/forwarded/_dev/test/pipeline/test-security-4698-scheduled-task-trigger-boolean-lexical.json-expected.json | Updates expected output to include settings.enabled: true. |
| packages/windows/changelog.yml | Adds 3.9.3 changelog entry for the bugfix. |
| packages/system/manifest.yml | Bumps System package version to 2.23.3. |
| packages/system/docs/README.md | Updates the exported field documentation row for settings.enabled. |
| packages/system/data_stream/security/fields/winlog.yml | Updates field description for effective enabled semantics. |
| packages/system/data_stream/security/elasticsearch/ingest_pipeline/scheduled_task.yml | Implements Settings/Enabled defaulting behavior when omitted. |
| packages/system/data_stream/security/_dev/test/pipeline/test-4700-scheduled-task-trigger-defaults.json-expected.json | Updates expected output to include settings.enabled: true. |
| packages/system/data_stream/security/_dev/test/pipeline/test-4700-scheduled-task-enabled.json-expected.json | Updates expected output to include settings.enabled: true. |
| packages/system/data_stream/security/_dev/test/pipeline/test-4698-scheduled-task-trigger-boolean-lexical.json-expected.json | Updates expected output to include settings.enabled: true. |
| packages/system/changelog.yml | Adds 2.23.3 changelog entry for the bugfix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: w0rk3r <26856693+w0rk3r@users.noreply.github.com>
🚀 Benchmarks reportTo see the full report comment with |
|
/test |
|
✅ All changelog entries have the correct PR link. |
💚 Build Succeeded
History
cc @w0rk3r |
belimawr
left a comment
There was a problem hiding this comment.
Approving the changes in the files that belong to the data-plane team.
|
Tick the box to add this pull request to the merge queue (same as
|
|
Package system - 2.23.3 containing this change is available at https://epr.elastic.co/package/system/2.23.3/ |
|
Package windows - 3.9.3 containing this change is available at https://epr.elastic.co/package/windows/3.9.3/ |
Proposed commit message
Summary
Follow-up to #19193.
Task Scheduler defaults
Settings/Enabledtotruewhen the element is omitted. The current pipelines only populatewinlog.scheduled_task.settings.enabledwhen the value is explicit, so real scheduled task events can leave the effective state unknown even though Windows treats the task as enabled.This PR:
winlog.scheduled_task.settings.enabled: truewhenSettingsexists andEnabledis omitted.trueandfalsevalues unchanged.Settingsis absent orEnabledis invalid.securityand Windowsforwardeddata streams.The existing captured 4698 and 4700 fixtures omit
Settings/Enabledand now assert the effective value. Their rawTaskContentremains unchanged.Validation
securityand Windowsforwardedpipeline suites.Settings/Enabled.Checklist
changelog.ymlfile.