Normalize stateless check fields - #35404
Merged
Merged
Conversation
9 tasks
MAnDumu
force-pushed
the
bug/35281-sca-stateless-check-fields
branch
from
April 13, 2026 11:09
77b977f to
a039df3
Compare
jpcerrone
reviewed
Apr 15, 2026
Nicogp
reviewed
Apr 21, 2026
Nicogp
reviewed
Apr 21, 2026
Nicogp
reviewed
Apr 21, 2026
Nicogp
reviewed
Apr 21, 2026
9 tasks
MAnDumu
marked this pull request as ready for review
April 22, 2026 00:07
MAnDumu
force-pushed
the
bug/35281-sca-stateless-check-fields
branch
from
April 22, 2026 02:31
ecbdc10 to
9a423c1
Compare
jpcerrone
previously approved these changes
Apr 22, 2026
- normalize check.mitre.* to arrays in stateless events - map legacy check.title/policy.title to name - normalize changed_fields to use check.name/policy.name - extend SCAEventHandlerTest coverage
…result_for_a_given_id
MAnDumu
force-pushed
the
bug/35281-sca-stateless-check-fields
branch
from
April 22, 2026 15:27
10fa627 to
acee776
Compare
…ard compatible). All YAMLs and tests use 'name'. Validated with gtests. Requirements parsing and logic are not broken.
MAnDumu
force-pushed
the
bug/35281-sca-stateless-check-fields
branch
from
April 23, 2026 16:31
8c064a5 to
9f52d1f
Compare
Nicogp
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request addresses missing and inconsistent normalized SCA fields in stateless events, as identified in issue #35281.
It implements normalization for legacy
titlefields and improves MITRE field normalization in stateless SCA payloads to keep consistency with current schema expectations.Closes #35281
During validation, this PR also incorporated Windows SCA integration stabilization and Windows CI workflow behavior fixes required to make the normalization changes consistently verifiable in CI. These additions are part of the final delivered scope.
Proposed Changes
titletoname:check.title->check.namerequirements.title->requirements.namepolicy.title->policy.namechanged_fieldsgeneration to report normalized paths:check.titleis reported ascheck.namerequirements.titleis reported asrequirements.namepolicy.titleis reported aspolicy.namemitre.tactic,mitre.technique, andmitre.subtechniquefrom string CSV values to arraysnameandtitleAdditional scope included in this PR
titlefields to canonicalnamefields where applicable.Results and Evidence
Automated test evidence:
ctest -R SCAEventHandlerTest --output-on-failure100% tests passed, 0 tests failedAdditional checks covered by new tests:
title->namenormalization in check, requirements and policy payloadsnamepriority when bothnameandtitleare presentchanged_fieldsnormalization tocheck.nameandpolicy.nameMITRE subfield normalization to arrays
Final CI validation includes successful Windows runs after the stabilization updates.
Comparative evidence uses representative indexed SCA events (summary vs check shapes) captured from the available environment data.
Artifacts Affected
Configuration Changes
Documentation Updates
Tests Introduced
New unit tests in
src/wazuh_modules/sca/sca_impl/tests/sca_event_handler_test.cpp:ProcessStateless_NormalizesTitleInChangedFieldsNormalizeCheck_TitleToNameNormalizeCheck_NameHasPriorityOverTitleNormalizePolicy_TitleToNameNormalizePolicy_NameHasPriorityOverTitleAlso includes MITRE normalization test coverage extensions in the same test suite.
Diff between jsons stateful and stateless
Review Checklist
title/namenormalization is covered in implementation and tests