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

[Backport 2.5] Add throw for empty strings in rules with modifier contains, startwith, and endswith (#860) #888

Closed
wants to merge 1 commit into from

Conversation

jowg-amazon
Copy link
Collaborator

Manual backport of #860 to 2.5


Description

[Describe what this change achieves]

Issues Resolved

[List any issues this PR will resolve]

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.

…h, and endswith (opensearch-project#860)

* add validation for empty strings with contains, startswith and endswith modifiers

Signed-off-by: Joanne Wang <[email protected]>

* throw exception if empty string with contains, startswith, or endswith

Signed-off-by: Joanne Wang <[email protected]>

* change var name

Signed-off-by: Joanne Wang <[email protected]>

* add modifiers to log

Signed-off-by: Joanne Wang <[email protected]>

---------

Signed-off-by: Joanne Wang <[email protected]>
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 36.67%. Comparing base (5d9c869) to head (a33e174).

Files Patch % Lines
...ityanalytics/rules/objects/SigmaDetectionItem.java 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.5     #888      +/-   ##
============================================
- Coverage     36.68%   36.67%   -0.01%     
- Complexity      887      891       +4     
============================================
  Files           179      179              
  Lines          7060     7064       +4     
  Branches        864      866       +2     
============================================
+ Hits           2590     2591       +1     
- Misses         4233     4234       +1     
- Partials        237      239       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jowg-amazon jowg-amazon changed the title [Backport 2.5] Add throw for empty strings in rules with modifier contains, startwith, and endswith (860) [Backport 2.5] Add throw for empty strings in rules with modifier contains, startwith, and endswith (#860) Mar 7, 2024
@jowg-amazon
Copy link
Collaborator Author

closing in favor of #912

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

Successfully merging this pull request may close these issues.

1 participant