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

Sigma Aggregation rule fixes #622

Merged
merged 3 commits into from
Oct 4, 2023
Merged

Conversation

sbcd90
Copy link
Collaborator

@sbcd90 sbcd90 commented Sep 30, 2023

Description

Sigma Aggregation rule fixes

Issues Resolved

#458
#558

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.

@codecov
Copy link

codecov bot commented Sep 30, 2023

Codecov Report

Merging #622 (64e5f91) into main (3c9b23a) will increase coverage by 0.04%.
Report is 2 commits behind head on main.
The diff coverage is 62.50%.

@@             Coverage Diff              @@
##               main     #622      +/-   ##
============================================
+ Coverage     25.04%   25.09%   +0.04%     
- Complexity      943      947       +4     
============================================
  Files           255      255              
  Lines         11123    11142      +19     
  Branches       1242     1247       +5     
============================================
+ Hits           2786     2796      +10     
- Misses         8086     8094       +8     
- Partials        251      252       +1     
Files Coverage Δ
...ecurityanalytics/rules/backend/OSQueryBackend.java 66.81% <100.00%> (ø)
.../securityanalytics/rules/backend/QueryBackend.java 64.54% <100.00%> (+0.32%) ⬆️
...curityanalytics/rules/objects/SigmaDetections.java 100.00% <100.00%> (ø)
...a/org/opensearch/securityanalytics/model/Rule.java 0.00% <0.00%> (ø)
...tyanalytics/rules/aggregation/AggregationItem.java 94.73% <66.66%> (-5.27%) ⬇️
...opensearch/securityanalytics/util/RuleIndices.java 0.00% <0.00%> (ø)
...ch/securityanalytics/findings/FindingsService.java 35.89% <50.00%> (-0.59%) ⬇️
...lytics/transport/TransportIndexDetectorAction.java 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

@eirsep
Copy link
Member

eirsep commented Oct 2, 2023

plz update the desription describing the changes being made

@@ -588,13 +592,32 @@ public static String productIndexAvgAggRule(){
" category: test_category\n" +
" product: test_product\n" +
" detection:\n" +
" timeframe: 5m\n" +
Copy link
Member

Choose a reason for hiding this comment

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

do we need to add documentation or does sigma have a format which we support for timevalue?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@@ -814,7 +816,7 @@ private IndexMonitorRequest createBucketLevelMonitorRequest(
? new BoolQueryBuilder()
: QueryBuilders.boolQuery().must(searchSourceBuilder.query());
RangeQueryBuilder timeRangeFilter = QueryBuilders.rangeQuery(TIMESTAMP_FIELD_ALIAS)
.gt("{{period_end}}||-1h")
.gt("{{period_end}}||-" + aggItem.getTimeframe())
Copy link
Member

Choose a reason for hiding this comment

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

if timeframe is not set is there a default value

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok fixed this.

sbcd90 added 2 commits October 4, 2023 00:34
Signed-off-by: Subhobrata Dey <[email protected]>
Signed-off-by: Subhobrata Dey <[email protected]>
@sbcd90 sbcd90 merged commit b838dd8 into opensearch-project:main Oct 4, 2023
16 of 17 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 4, 2023
Signed-off-by: Subhobrata Dey <[email protected]>
(cherry picked from commit b838dd8)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 4, 2023
Signed-off-by: Subhobrata Dey <[email protected]>
(cherry picked from commit b838dd8)
sbcd90 pushed a commit that referenced this pull request Oct 4, 2023
sbcd90 pushed a commit that referenced this pull request Oct 4, 2023
riysaxen-amzn pushed a commit to riysaxen-amzn/security-analytics that referenced this pull request Feb 20, 2024
* [FEATURE] Improve "list" text area UX opensearch-project#589
Use expression builder instead of code editor

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Improve "list" text area UX opensearch-project#589
Use expression builder instead of code editor

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Improve "list" text area UX opensearch-project#589
Use expression builder instead of code editor

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Improve "list" text area UX opensearch-project#589
Use expression builder instead of code editor

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Change the order of the sections in the "Create detection rule" page opensearch-project#586

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Code review

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Code review

Signed-off-by: Jovan Cvetkovic <[email protected]>

* bugfix for tags validation

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Change the order of the sections in the "Create detection rule" page opensearch-project#586
[FEATURE] Improve the Create detection rules - selection panel fields error notifications opensearch-project#601
[FEATURE] Improve the Create detection rules - selection panel condition field is not marked as invalid after submission opensearch-project#613

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Change the order of the sections in the "Create detection rule" page opensearch-project#586
[FEATURE] Improve the Create detection rules - selection panel fields error notifications opensearch-project#601
[FEATURE] Improve the Create detection rules - selection panel condition field is not marked as invalid after submission opensearch-project#613

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Replace code editor with expression editor opensearch-project#602

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Replace code editor with expression editor opensearch-project#602

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Improve text area ux and add expression UI opensearch-project#603

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Cypress cases for detectors and rules, validate forms and fields

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Cypress cases for detectors and rules, validate forms and fields

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Cypress cases for detectors and rules, validate forms and fields

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Cypress cases for detectors and rules, validate forms and fields

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Cypress cases for detectors and rules, validate forms and fields

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Cypress cases for detectors and rules, validate forms and fields

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Cypress cases for detectors and rules, validate forms and fields

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Cypress cases for detectors and rules, validate forms and fields

Signed-off-by: Jovan Cvetkovic <[email protected]>

* Code review Change the order of the sections opensearch-project#622

Signed-off-by: Jovan Cvetkovic <[email protected]>

---------

Signed-off-by: Jovan Cvetkovic <[email protected]>
riysaxen-amzn pushed a commit to riysaxen-amzn/security-analytics that referenced this pull request Mar 25, 2024
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