-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return list of cx friendly 4xx errors for indexing custom rules (#862)
* Return list of cx friendly 4xx errors for indexing custom rules Signed-off-by: Megha Goyal <[email protected]> * Fixing integ tests Signed-off-by: Megha Goyal <[email protected]> * Addressing CR comments Signed-off-by: Megha Goyal <[email protected]> * Fix integ tests Signed-off-by: Megha Goyal <[email protected]> * Fix unit tests Signed-off-by: Megha Goyal <[email protected]> * CR comments Signed-off-by: Megha Goyal <[email protected]> * Return RuntimeException to fix compilation errors Signed-off-by: Megha Goyal <[email protected]> * Fix unit tests for Sigma title changes in main Signed-off-by: Megha Goyal <[email protected]> --------- Signed-off-by: Megha Goyal <[email protected]>
- Loading branch information
Showing
14 changed files
with
248 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/org/opensearch/securityanalytics/rules/exceptions/CompositeSigmaErrors.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package org.opensearch.securityanalytics.rules.exceptions; | ||
|
||
import org.opensearch.OpenSearchException; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class CompositeSigmaErrors extends RuntimeException { | ||
private final List<SigmaError> errorList; | ||
|
||
public CompositeSigmaErrors() { | ||
this.errorList = new ArrayList<>(); | ||
} | ||
|
||
public void addError(SigmaError error) { | ||
errorList.add(error); | ||
} | ||
|
||
public List<SigmaError> getErrors() { | ||
return errorList; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.