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

Fixes detectorType incompatibility with detector rules #524

Merged
merged 8 commits into from
Sep 1, 2023

Conversation

jowg-amazon
Copy link
Collaborator

@jowg-amazon jowg-amazon commented Aug 29, 2023

Description

Fixes detectors that have incompatible detector types with detector rules.

Issues Resolved

#518

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Joanne Wang added 2 commits August 29, 2023 22:55
Signed-off-by: jowg-amazon <jowg@amazon.com>
Signed-off-by: jowg-amazon <jowg@amazon.com>
Signed-off-by: jowg-amazon <jowg@amazon.com>
sbcd90
sbcd90 previously approved these changes Aug 30, 2023
@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Merging #524 (d95ed61) into main (8556254) will decrease coverage by 0.06%.
Report is 1 commits behind head on main.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##               main     #524      +/-   ##
============================================
- Coverage     28.20%   28.15%   -0.06%     
+ Complexity      941      937       -4     
============================================
  Files           236      236              
  Lines          9864     9864              
  Branches       1118     1118              
============================================
- Hits           2782     2777       -5     
- Misses         6841     6844       +3     
- Partials        241      243       +2     
Files Changed Coverage Δ
...lytics/transport/TransportIndexDetectorAction.java 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

Signed-off-by: jowg-amazon <jowg@amazon.com>
Signed-off-by: jowg-amazon <jowg@amazon.com>
Signed-off-by: jowg-amazon <jowg@amazon.com>
} catch (ResponseException ex) {
Assert.assertEquals(400, ex.getResponse().getStatusLine().getStatusCode());
assertTrue(ex.getMessage().contains("Detector cannot be created as no compatible rules were provided"));
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: if the request doesn't fail the test will not recognize that.
can you ådd a fail() inside the try block to validate that behaviour.

Signed-off-by: jowg-amazon <jowg@amazon.com>
Signed-off-by: jowg-amazon <jowg@amazon.com>
@sbcd90 sbcd90 merged commit b88f3db into opensearch-project:main Sep 1, 2023
11 of 15 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 1, 2023
Signed-off-by: jowg-amazon <jowg@amazon.com>
(cherry picked from commit b88f3db)
sbcd90 pushed a commit that referenced this pull request Sep 1, 2023
Signed-off-by: jowg-amazon <jowg@amazon.com>
sbcd90 pushed a commit to sbcd90/security-analytics that referenced this pull request Oct 12, 2023
@sbcd90 sbcd90 mentioned this pull request Oct 13, 2023
5 tasks
sbcd90 added a commit that referenced this pull request Oct 13, 2023
* Change ruleId if it exists

Signed-off-by: Ashish Agrawal <ashish81394@gmail.com>

* Fixes detectorType incompatibility with detector rules (#524)

Signed-off-by: jowg-amazon <jowg@amazon.com>
riysaxen-amzn pushed a commit to riysaxen-amzn/security-analytics that referenced this pull request Feb 20, 2024
* Correlation engine ux (opensearch-project#524)

* wip

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* completed rules page; added placeholder for findings flyout tabs

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* reverted change to show empty table

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* updated rule type

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* updated create correlation rule page

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* correlation page wip

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* Correlation store and API services

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* Correlation store and API services

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* Correlation store and API services

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* Correlation store and API services

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* Correlation store and API services

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* updated correlations page

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* updated store interfaces

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* fixed correlation store

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* added api for all correlations

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* added filter support for correlations

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* using apis; added validation

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* Implemented logic to populate correlations tables data.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* restricted to AND

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* log type clearable

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* code cleanup

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* fixed API issue

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* updated snapshots

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* ux improvements

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* code cleanup

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* removed redundant code

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* removed unwanted param

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* connected refresh

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

---------

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
Co-authored-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>
Co-authored-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit f565a923c6bfec1b8a69128d21e5d823a50cb142)

* Removed duplicate import for EuiSpacer (opensearch-project#538) (opensearch-project#540)

* removed duplicate import



* updated snapshots



---------

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* Pinned babel traverse and core (opensearch-project#539) (opensearch-project#544)

* pinned babel traverse and core



* removed cyclic dependency



* added types for vis



* refactored code



---------

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

---------

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Co-authored-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.7 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.7 2.7
# Navigate to the new working tree
cd .worktrees/backport-2.7
# Create a new branch
git switch --create backport/backport-524-to-2.7
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b88f3dbbffd3e348b55e27273e6e3bca8c3f9471
# Push it to GitHub
git push --set-upstream origin backport/backport-524-to-2.7
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.7

Then, create a pull request where the base branch is 2.7 and the compare/head branch is backport/backport-524-to-2.7.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.5 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.5 2.5
# Navigate to the new working tree
cd .worktrees/backport-2.5
# Create a new branch
git switch --create backport/backport-524-to-2.5
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b88f3dbbffd3e348b55e27273e6e3bca8c3f9471
# Push it to GitHub
git push --set-upstream origin backport/backport-524-to-2.5
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.5

Then, create a pull request where the base branch is 2.5 and the compare/head branch is backport/backport-524-to-2.5.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.7 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.7 2.7
# Navigate to the new working tree
cd .worktrees/backport-2.7
# Create a new branch
git switch --create backport/backport-524-to-2.7
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b88f3dbbffd3e348b55e27273e6e3bca8c3f9471
# Push it to GitHub
git push --set-upstream origin backport/backport-524-to-2.7
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.7

Then, create a pull request where the base branch is 2.7 and the compare/head branch is backport/backport-524-to-2.7.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.5 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.5 2.5
# Navigate to the new working tree
cd .worktrees/backport-2.5
# Create a new branch
git switch --create backport/backport-524-to-2.5
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b88f3dbbffd3e348b55e27273e6e3bca8c3f9471
# Push it to GitHub
git push --set-upstream origin backport/backport-524-to-2.5
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.5

Then, create a pull request where the base branch is 2.5 and the compare/head branch is backport/backport-524-to-2.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants