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
… (#1435)

Signed-off-by: Riya Saxena <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent ebb88aa commit 4fed55a
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 4fed55a

Please sign in to comment.