File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -180,3 +180,42 @@ def test_deferred_only_conversion(test_backend: TextQueryTestBackend):
180180 )
181181 == ['* | mappedA="foo.*bar"' ]
182182 )
183+
184+
185+ def test_deferred_conversion_correlation_rule_references (test_backend : TextQueryTestBackend ):
186+ assert (
187+ test_backend .convert (
188+ SigmaCollection .from_yaml (
189+ """
190+ title: Referenced Rule with Deferred
191+ name: rule_with_deferred
192+ status: test
193+ logsource:
194+ category: test_category
195+ product: test_product
196+ detection:
197+ sel:
198+ fieldA|re: foo.*bar
199+ fieldB: normalvalue
200+ condition: sel
201+ ---
202+ title: Correlation Rule
203+ status: test
204+ correlation:
205+ type: event_count
206+ rules:
207+ - rule_with_deferred
208+ group-by:
209+ - fieldC
210+ timespan: 5m
211+ condition:
212+ gte: 10
213+ """
214+ )
215+ )
216+ == [
217+ """fieldB="normalvalue" | mappedA="foo.*bar"
218+ | aggregate window=5min count() as event_count by fieldC
219+ | where event_count >= 10"""
220+ ]
221+ )
You can’t perform that action at this time.
0 commit comments