Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add field based rules support in correlation engine #740

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
*/
package org.opensearch.securityanalytics.correlation;

import kotlin.Pair;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.commons.lang3.tuple.Triple;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.lucene.search.join.ScoreMode;
Expand All @@ -15,6 +16,7 @@
import org.opensearch.action.search.SearchRequest;
import org.opensearch.action.search.SearchResponse;
import org.opensearch.client.Client;
import org.opensearch.cluster.routing.Preference;
import org.opensearch.common.xcontent.LoggingDeprecationHandler;
import org.opensearch.common.xcontent.XContentType;
import org.opensearch.commons.alerting.action.PublishFindingsRequest;
Expand All @@ -37,11 +39,13 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;


Expand Down Expand Up @@ -127,25 +131,34 @@
private void getValidDocuments(String detectorType, List<String> indices, List<CorrelationRule> correlationRules, List<String> relatedDocIds) {
MultiSearchRequest mSearchRequest = new MultiSearchRequest();
List<CorrelationRule> validCorrelationRules = new ArrayList<>();
List<String> validFields = new ArrayList<>();

Check warning on line 134 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L134

Added line #L134 was not covered by tests

for (CorrelationRule rule: correlationRules) {
Optional<CorrelationQuery> query = rule.getCorrelationQueries().stream()
.filter(correlationQuery -> correlationQuery.getCategory().equals(detectorType)).findFirst();

if (query.isPresent()) {
BoolQueryBuilder queryBuilder = QueryBuilders.boolQuery()
.filter(QueryBuilders.termsQuery("_id", relatedDocIds))
.must(QueryBuilders.queryStringQuery(query.get().getQuery()));
.filter(QueryBuilders.termsQuery("_id", relatedDocIds));

Check warning on line 142 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L142

Added line #L142 was not covered by tests

if (query.get().getField() != null) {
queryBuilder = queryBuilder.must(QueryBuilders.existsQuery(query.get().getField()));

Check warning on line 145 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L145

Added line #L145 was not covered by tests
} else {
queryBuilder = queryBuilder.must(QueryBuilders.queryStringQuery(query.get().getQuery()));

Check warning on line 147 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L147

Added line #L147 was not covered by tests
}
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
searchSourceBuilder.query(queryBuilder);
searchSourceBuilder.fetchSource(false);
if (query.get().getField() != null) {
searchSourceBuilder.fetchField(query.get().getField());

Check warning on line 153 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L153

Added line #L153 was not covered by tests
}
searchSourceBuilder.size(10000);
SearchRequest searchRequest = new SearchRequest();
searchRequest.indices(indices.toArray(new String[]{}));
searchRequest.source(searchSourceBuilder);

validCorrelationRules.add(rule);
validFields.add(query.get().getField());

Check warning on line 161 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L161

Added line #L161 was not covered by tests
mSearchRequest.add(searchRequest);
}
}
Expand All @@ -155,7 +168,7 @@
@Override
public void onResponse(MultiSearchResponse items) {
MultiSearchResponse.Item[] responses = items.getResponses();
List<CorrelationRule> filteredCorrelationRules = new ArrayList<>();
List<Triple<CorrelationRule, SearchHit[], String>> filteredCorrelationRules = new ArrayList<>();

Check warning on line 171 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L171

Added line #L171 was not covered by tests

int idx = 0;
for (MultiSearchResponse.Item response : responses) {
Expand All @@ -165,14 +178,17 @@
}

if (response.getResponse().getHits().getTotalHits().value > 0L) {
filteredCorrelationRules.add(validCorrelationRules.get(idx));
filteredCorrelationRules.add(Triple.of(validCorrelationRules.get(idx),
response.getResponse().getHits().getHits(), validFields.get(idx)));

Check warning on line 182 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L181-L182

Added lines #L181 - L182 were not covered by tests
}
++idx;
}

Map<String, List<CorrelationQuery>> categoryToQueriesMap = new HashMap<>();
for (CorrelationRule rule: filteredCorrelationRules) {
List<CorrelationQuery> queries = rule.getCorrelationQueries();
Map<String, Long> categoryToTimeWindowMap = new HashMap<>();

Check warning on line 188 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L188

Added line #L188 was not covered by tests
for (Triple<CorrelationRule, SearchHit[], String> rule: filteredCorrelationRules) {
List<CorrelationQuery> queries = rule.getLeft().getCorrelationQueries();
Long timeWindow = rule.getLeft().getCorrTimeWindow();

Check warning on line 191 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L190-L191

Added lines #L190 - L191 were not covered by tests

for (CorrelationQuery query: queries) {
List<CorrelationQuery> correlationQueries;
Expand All @@ -181,12 +197,36 @@
} else {
correlationQueries = new ArrayList<>();
}
correlationQueries.add(query);
if (categoryToTimeWindowMap.containsKey(query.getCategory())) {
categoryToTimeWindowMap.put(query.getCategory(), Math.max(timeWindow, categoryToTimeWindowMap.get(query.getCategory())));

Check warning on line 201 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L201

Added line #L201 was not covered by tests
} else {
categoryToTimeWindowMap.put(query.getCategory(), timeWindow);

Check warning on line 203 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L203

Added line #L203 was not covered by tests
}

if (query.getField() == null) {
correlationQueries.add(query);

Check warning on line 207 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L207

Added line #L207 was not covered by tests
} else {
SearchHit[] hits = rule.getMiddle();
StringBuilder qb = new StringBuilder(query.getField()).append(":(");

Check warning on line 210 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L209-L210

Added lines #L209 - L210 were not covered by tests
for (int i = 0; i < hits.length; ++i) {
String value = hits[i].field(rule.getRight()).getValue();
qb.append(value);

Check warning on line 213 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L212-L213

Added lines #L212 - L213 were not covered by tests
if (i < hits.length-1) {
qb.append(" OR ");

Check warning on line 215 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L215

Added line #L215 was not covered by tests
} else {
qb.append(")");

Check warning on line 217 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L217

Added line #L217 was not covered by tests
}
}
if (query.getQuery() != null) {
qb.append(" AND ").append(query.getQuery());

Check warning on line 221 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L221

Added line #L221 was not covered by tests
}
correlationQueries.add(new CorrelationQuery(query.getIndex(), qb.toString(), query.getCategory(), null));

Check warning on line 223 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L223

Added line #L223 was not covered by tests
}
categoryToQueriesMap.put(query.getCategory(), correlationQueries);
}
}
searchFindingsByTimestamp(detectorType, categoryToQueriesMap,
filteredCorrelationRules.stream().map(CorrelationRule::getId).collect(Collectors.toList()));
searchFindingsByTimestamp(detectorType, categoryToQueriesMap, categoryToTimeWindowMap,
filteredCorrelationRules.stream().map(Triple::getLeft).map(CorrelationRule::getId).collect(Collectors.toList()));

Check warning on line 229 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L228-L229

Added lines #L228 - L229 were not covered by tests
}

@Override
Expand All @@ -203,15 +243,15 @@
* this method searches for parent findings given the log category & correlation time window & collects all related docs
* for them.
*/
private void searchFindingsByTimestamp(String detectorType, Map<String, List<CorrelationQuery>> categoryToQueriesMap, List<String> correlationRules) {
private void searchFindingsByTimestamp(String detectorType, Map<String, List<CorrelationQuery>> categoryToQueriesMap, Map<String, Long> categoryToTimeWindowMap, List<String> correlationRules) {
long findingTimestamp = request.getFinding().getTimestamp().toEpochMilli();
MultiSearchRequest mSearchRequest = new MultiSearchRequest();
List<Pair<String, List<CorrelationQuery>>> categoryToQueriesPairs = new ArrayList<>();

for (Map.Entry<String, List<CorrelationQuery>> categoryToQueries: categoryToQueriesMap.entrySet()) {
RangeQueryBuilder queryBuilder = QueryBuilders.rangeQuery("timestamp")
.gte(findingTimestamp - corrTimeWindow)
.lte(findingTimestamp + corrTimeWindow);
.gte(findingTimestamp - categoryToTimeWindowMap.get(categoryToQueries.getKey()))
.lte(findingTimestamp + categoryToTimeWindowMap.get(categoryToQueries.getKey()));

Check warning on line 254 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L253-L254

Added lines #L253 - L254 were not covered by tests

SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
searchSourceBuilder.query(queryBuilder);
Expand All @@ -222,7 +262,7 @@
searchRequest.indices(DetectorMonitorConfig.getAllFindingsIndicesPattern(categoryToQueries.getKey()));
searchRequest.source(searchSourceBuilder);
mSearchRequest.add(searchRequest);
categoryToQueriesPairs.add(new Pair<>(categoryToQueries.getKey(), categoryToQueries.getValue()));
categoryToQueriesPairs.add(Pair.of(categoryToQueries.getKey(), categoryToQueries.getValue()));

Check warning on line 265 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L265

Added line #L265 was not covered by tests
}

if (!mSearchRequest.requests().isEmpty()) {
Expand All @@ -246,17 +286,17 @@
.map(Object::toString).collect(Collectors.toList()));
}

List<CorrelationQuery> correlationQueries = categoryToQueriesPairs.get(idx).getSecond();
List<CorrelationQuery> correlationQueries = categoryToQueriesPairs.get(idx).getValue();

Check warning on line 289 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L289

Added line #L289 was not covered by tests
List<String> indices = correlationQueries.stream().map(CorrelationQuery::getIndex).collect(Collectors.toList());
List<String> queries = correlationQueries.stream().map(CorrelationQuery::getQuery).collect(Collectors.toList());
relatedDocsMap.put(categoryToQueriesPairs.get(idx).getFirst(),
relatedDocsMap.put(categoryToQueriesPairs.get(idx).getKey(),

Check warning on line 292 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L292

Added line #L292 was not covered by tests
new DocSearchCriteria(
indices,
queries,
relatedDocIds));
++idx;
}
searchDocsWithFilterKeys(detectorType, relatedDocsMap, correlationRules);
searchDocsWithFilterKeys(detectorType, relatedDocsMap, categoryToTimeWindowMap, correlationRules);

Check warning on line 299 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L299

Added line #L299 was not covered by tests
}

@Override
Expand All @@ -272,7 +312,7 @@
/**
* Given the related docs from parent findings, this method filters only those related docs which match parent join criteria.
*/
private void searchDocsWithFilterKeys(String detectorType, Map<String, DocSearchCriteria> relatedDocsMap, List<String> correlationRules) {
private void searchDocsWithFilterKeys(String detectorType, Map<String, DocSearchCriteria> relatedDocsMap, Map<String, Long> categoryToTimeWindowMap, List<String> correlationRules) {
MultiSearchRequest mSearchRequest = new MultiSearchRequest();
List<String> categories = new ArrayList<>();

Expand All @@ -283,6 +323,7 @@
for (String query: docSearchCriteria.getValue().queries) {
queryBuilder = queryBuilder.should(QueryBuilders.queryStringQuery(query));
}
queryBuilder.minimumShouldMatch(1).boost(1.0f);

Check warning on line 326 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L326

Added line #L326 was not covered by tests

SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
searchSourceBuilder.query(queryBuilder);
Expand Down Expand Up @@ -319,7 +360,7 @@
filteredRelatedDocIds.put(categories.get(idx), docIds);
++idx;
}
getCorrelatedFindings(detectorType, filteredRelatedDocIds, correlationRules);
getCorrelatedFindings(detectorType, filteredRelatedDocIds, categoryToTimeWindowMap, correlationRules);

Check warning on line 363 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L363

Added line #L363 was not covered by tests
}

@Override
Expand All @@ -336,16 +377,16 @@
* Given the filtered related docs of the parent findings, this method gets the actual filtered parent findings for
* the finding to be correlated.
*/
private void getCorrelatedFindings(String detectorType, Map<String, List<String>> filteredRelatedDocIds, List<String> correlationRules) {
private void getCorrelatedFindings(String detectorType, Map<String, List<String>> filteredRelatedDocIds, Map<String, Long> categoryToTimeWindowMap, List<String> correlationRules) {
long findingTimestamp = request.getFinding().getTimestamp().toEpochMilli();
MultiSearchRequest mSearchRequest = new MultiSearchRequest();
List<String> categories = new ArrayList<>();

for (Map.Entry<String, List<String>> relatedDocIds: filteredRelatedDocIds.entrySet()) {
BoolQueryBuilder queryBuilder = QueryBuilders.boolQuery()
.filter(QueryBuilders.rangeQuery("timestamp")
.gte(findingTimestamp - corrTimeWindow)
.lte(findingTimestamp + corrTimeWindow))
.gte(findingTimestamp - categoryToTimeWindowMap.get(relatedDocIds.getKey()))
.lte(findingTimestamp + categoryToTimeWindowMap.get(relatedDocIds.getKey())))

Check warning on line 389 in src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/correlation/JoinEngine.java#L388-L389

Added lines #L388 - L389 were not covered by tests
.must(QueryBuilders.termsQuery("correlated_doc_ids", relatedDocIds.getValue()));

if (relatedDocIds.getKey().equals(detectorType)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,40 +22,53 @@
private static final String QUERY = "query";
private static final String CATEGORY = "category";

private static final String FIELD = "field";

private String index;

private String query;

private String category;

public CorrelationQuery(String index, String query, String category) {
private String field;

public CorrelationQuery(String index, String query, String category, String field) {

Check warning on line 35 in src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java#L35

Added line #L35 was not covered by tests
this.index = index;
this.query = query;
this.category = category;
this.field = field;

Check warning on line 39 in src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java#L39

Added line #L39 was not covered by tests
}

public CorrelationQuery(StreamInput sin) throws IOException {
this(sin.readString(), sin.readString(), sin.readString());
this(sin.readString(), sin.readOptionalString(), sin.readString(), sin.readOptionalString());

Check warning on line 43 in src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java#L43

Added line #L43 was not covered by tests
}

@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeString(index);
out.writeString(query);
out.writeOptionalString(query);

Check warning on line 49 in src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java#L49

Added line #L49 was not covered by tests
out.writeString(category);
out.writeOptionalString(field);

Check warning on line 51 in src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java#L51

Added line #L51 was not covered by tests
}

@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject();
builder.field(INDEX, index).field(QUERY, query).field(CATEGORY, category);
builder.field(INDEX, index).field(CATEGORY, category);

Check warning on line 57 in src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java#L57

Added line #L57 was not covered by tests
if (query != null) {
builder.field(QUERY, query);

Check warning on line 59 in src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java#L59

Added line #L59 was not covered by tests
}
if (field != null) {
builder.field(FIELD, field);

Check warning on line 62 in src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java#L62

Added line #L62 was not covered by tests
}
return builder.endObject();
}

public static CorrelationQuery parse(XContentParser xcp) throws IOException {
String index = null;
String query = null;
String category = null;
String field = null;

Check warning on line 71 in src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java#L71

Added line #L71 was not covered by tests

XContentParserUtils.ensureExpectedToken(XContentParser.Token.START_OBJECT, xcp.currentToken(), xcp);
while (xcp.nextToken() != XContentParser.Token.END_OBJECT) {
Expand All @@ -72,11 +85,14 @@
case CATEGORY:
category = xcp.text();
break;
case FIELD:
field = xcp.text();
break;

Check warning on line 90 in src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java#L89-L90

Added lines #L89 - L90 were not covered by tests
default:
xcp.skipChildren();
}
}
return new CorrelationQuery(index, query, category);
return new CorrelationQuery(index, query, category, field);

Check warning on line 95 in src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java#L95

Added line #L95 was not covered by tests
}

public static CorrelationQuery readFrom(StreamInput sin) throws IOException {
Expand All @@ -94,4 +110,8 @@
public String getCategory() {
return category;
}

public String getField() {
return field;

Check warning on line 115 in src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/org/opensearch/securityanalytics/model/CorrelationQuery.java#L115

Added line #L115 was not covered by tests
}
}
Loading
Loading