Skip to content

Commit 0fa8c0f

Browse files
Prevent double validation on view rule
1 parent b3df752 commit 0fa8c0f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

detection_rules/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
from .generic_loader import GenericCollection
3333
from .misc import (
3434
add_client,
35+
getdefault,
3536
nested_set,
3637
parse_user_config,
3738
raise_client_error,
@@ -464,6 +465,7 @@ def view_rule(
464465
and isinstance(rule.contents.data, ESQLRuleData)
465466
and isinstance(rule.contents.data.validator, ESQLValidator)
466467
and isinstance(rule.contents.metadata, RuleMeta)
468+
and not getdefault("remote_esql_validation")()
467469
):
468470
rule.contents.data.validator.validate(rule.contents.data, rule.contents.metadata, force_remote_validation=True)
469471

0 commit comments

Comments
 (0)