patch fix for 2503 update addressing separate bugs (#2528)
This commit is contained in:
@@ -1022,7 +1022,7 @@ class TOMLRuleContents(BaseRuleContents, MarshmallowDataclassMixin):
|
||||
"""Check for compatibility between restricted fields and the min_stack_version of the rule."""
|
||||
default_min_stack = get_min_supported_stack_version()
|
||||
if self.metadata.min_stack_version is not None:
|
||||
min_stack = Version.parse(self.metadata.min_stack_version)
|
||||
min_stack = Version.parse(self.metadata.min_stack_version, optional_minor_and_patch=True)
|
||||
else:
|
||||
min_stack = default_min_stack
|
||||
restricted = self.data.get_restricted_fields
|
||||
|
||||
@@ -617,8 +617,8 @@ class TestRuleTiming(BaseRuleTest):
|
||||
has_event_ingested = rule.contents.data.timestamp_override == 'event.ingested'
|
||||
indexes = rule.contents.data.get('index', [])
|
||||
beats_indexes = parse_beats_from_index(indexes)
|
||||
min_stack_is_less_than_82 = Version.parse(rule.contents.metadata.min_stack_version or '7.13.0') \
|
||||
< Version.parse("8.2.0")
|
||||
min_stack_is_less_than_82 = Version.parse(rule.contents.metadata.min_stack_version or '7.13.0',
|
||||
optional_minor_and_patch=True) < Version.parse("8.2.0")
|
||||
config = rule.contents.data.get('note') or ''
|
||||
rule_str = self.rule_str(rule, trailer=None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user