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

fix for input validation of correlation rule names #428

Merged
merged 2 commits into from
May 8, 2023

Conversation

sbcd90
Copy link
Collaborator

@sbcd90 sbcd90 commented May 5, 2023

Description

fix for input validation of correlation rule names

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.

Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented May 5, 2023

Codecov Report

Merging #428 (a7d29f8) into main (98663af) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main     #428      +/-   ##
============================================
- Coverage     28.23%   28.19%   -0.05%     
+ Complexity      897      896       -1     
============================================
  Files           231      231              
  Lines          9318     9326       +8     
  Branches       1073     1074       +1     
============================================
- Hits           2631     2629       -2     
- Misses         6451     6460       +9     
- Partials        236      237       +1     
Impacted Files Coverage Δ
...yanalytics/action/IndexCorrelationRuleRequest.java 0.00% <0.00%> (ø)
...earch/securityanalytics/model/CorrelationRule.java 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

getsaurabh02
getsaurabh02 previously approved these changes May 6, 2023
lezzago
lezzago previously approved these changes May 8, 2023
@@ -25,6 +30,8 @@ public class IndexCorrelationRuleRequest extends ActionRequest {

private RestRequest.Method method;

private static final Pattern REGEX = Pattern.compile("[a-zA-Z0-9 _,-.]{5,50}");
Copy link
Member

Choose a reason for hiding this comment

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

Should we rename this variable to something more readable? Maybe: IS_VALID_RULE_NAME?

Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
@sbcd90 sbcd90 dismissed stale reviews from lezzago and getsaurabh02 via a7d29f8 May 8, 2023 16:51
@sbcd90 sbcd90 merged commit cc53260 into opensearch-project:main May 8, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 8, 2023
Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
(cherry picked from commit cc53260)
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 8, 2023
Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
(cherry picked from commit cc53260)
sbcd90 pushed a commit that referenced this pull request May 8, 2023
Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
sbcd90 pushed a commit that referenced this pull request May 8, 2023
Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
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.

None yet

4 participants