[Security Solution] Apply same defaults values in extractDiffableCommonFields
as in convertCreateAPIToInternalSchema
#180165
Labels
Feature:Prebuilt Detection Rules
Security Solution Prebuilt Detection Rules area
refactoring
Team:Detection Rule Management
Security Detection Rule Management Team
Team:Detections and Resp
Security Detection Response Team
Team: SecuritySolution
Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Epics: https://github.com/elastic/security-team/issues/1974 (internal), #179907
Summary
The default values for the fields defined in the functions
extractDiffableCommonFields
andconvertCreateAPIToInternalSchema
are different for some fields. (Seenote
as an example).This has caused some fields to be returned as having diffs in the
/upgrade/_review
endpoint when they shouldn't have had. As a workaround for this, we implemented normalization in the frontend code that displays the diffs. But this shouldn't be necessary and the data should be consistent server-side.In
extractDiffableCommonFields
, apply the same default values to the rule as inconvertCreateAPIToInternalSchema
, which means reuse the existing code.Create reusable code that ensures that the defaults provided by
extractDiffableCommonFields
andconvertCreateAPIToInternalSchema
do not diverge over time. (comment).The text was updated successfully, but these errors were encountered: