Skip to content

Commit

Permalink
fixes the duplicate alerts generated by Aggregation Sigma Roles (#1424)
Browse files Browse the repository at this point in the history
* De-dupe Alerts generated by Aggregation Sigma Rules fix

Signed-off-by: Riya Saxena <[email protected]>

* De-dupe Alerts generated by Aggregation Sigma Rules fix

Signed-off-by: Riya Saxena <[email protected]>

* De-dupe Alerts generated by Aggregation Sigma Rules fix

Signed-off-by: Riya Saxena <[email protected]>

* tests fix

Signed-off-by: Riya Saxena <[email protected]>

* tests fix

Signed-off-by: Riya Saxena <[email protected]>

---------

Signed-off-by: Riya Saxena <[email protected]>
(cherry picked from commit 4845337)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Dec 18, 2024
1 parent b233559 commit f00dbe0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ private Monitor buildThreatIntelMonitor(IndexThreatIntelMonitorRequest request)
DocLevelMonitorInput docLevelMonitorInput = new DocLevelMonitorInput(
String.format("threat intel input for monitor named %s", request.getMonitor().getName()),
request.getMonitor().getIndices(),
Collections.emptyList() // no percolate queries
Collections.emptyList(), // no percolate queries
true
);
List<PerIocTypeScanInput> perIocTypeScanInputs = request.getMonitor().getPerIocTypeScanInputList().stream().map(
it -> new PerIocTypeScanInput(it.getIocType(), it.getIndexToFieldsMap())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ private IndexMonitorRequest createDocLevelMonitorRequest(List<Pair<String, Rule>
docLevelQueries.add(docLevelQuery);
}
docLevelQueries.addAll(threatIntelQueries);
DocLevelMonitorInput docLevelMonitorInput = new DocLevelMonitorInput(detector.getName(), detector.getInputs().get(0).getIndices(), docLevelQueries);
DocLevelMonitorInput docLevelMonitorInput = new DocLevelMonitorInput(detector.getName(), detector.getInputs().get(0).getIndices(), docLevelQueries, true);
docLevelMonitorInputs.add(docLevelMonitorInput);

List<DocumentLevelTrigger> triggers = new ArrayList<>();
Expand Down Expand Up @@ -877,7 +877,7 @@ private IndexMonitorRequest createDocLevelMonitorMatchAllRequest(
);
docLevelQueries.add(docLevelQuery);

DocLevelMonitorInput docLevelMonitorInput = new DocLevelMonitorInput(detector.getName(), detector.getInputs().get(0).getIndices(), docLevelQueries);
DocLevelMonitorInput docLevelMonitorInput = new DocLevelMonitorInput(detector.getName(), detector.getInputs().get(0).getIndices(), docLevelQueries, false);
docLevelMonitorInputs.add(docLevelMonitorInput);

List<DocumentLevelTrigger> triggers = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public void testThreatInputSerde() throws IOException {
bytes,
new DocLevelMonitorInput("threat intel input",
List.of("index1", "index2"),
emptyList()
emptyList(),
true
)
)
),
Expand Down

0 comments on commit f00dbe0

Please sign in to comment.