Skip to content

[Security Solution][Detections][Threshold Rules] Threshold Rule Bug Fixes#84918

Merged
madirey merged 25 commits intoelastic:masterfrom
madirey:threshold-fields
Dec 20, 2020
Merged

[Security Solution][Detections][Threshold Rules] Threshold Rule Bug Fixes#84918
madirey merged 25 commits intoelastic:masterfrom
madirey:threshold-fields

Conversation

@madirey
Copy link
Copy Markdown
Contributor

@madirey madirey commented Dec 3, 2020

Summary

Addresses:

Checklist

For maintainers

@madirey madirey requested review from a team as code owners December 3, 2020 16:00
@madirey madirey marked this pull request as draft December 3, 2020 16:04
Copy link
Copy Markdown
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

Only ES UI change was a fixed typo in a comment in the form lib. LGTM!

@spong spong added the Feature:Threshold Rule Security Solution Threshold rule type label Dec 4, 2020
@madirey madirey changed the title [Security Solution][Detections] Threshold Rule Bug Fixes [Security Solution][Detections][Threshold Rules] Threshold Rule Bug Fixes Dec 6, 2020
@peluja1012 peluja1012 added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Dec 8, 2020
@madirey madirey marked this pull request as ready for review December 18, 2020 00:30
Copy link
Copy Markdown
Contributor

@marshallmain marshallmain left a comment

Choose a reason for hiding this comment

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

Looks good except one small bug that could affect API users

} as unknown) as Filter);
const esFilter = await getFilter({
type,
filters: filters?.concat(bucketFilters),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

filters?.concat(bucketFilters) returns undefined if filters is undefined. Looks like filters ? filters.concat(bucketFilters) : bucketFilters would give the intended result? filters defaults to [] if not provided in the UI but it's optional in the API so it could be undefined here.

Suggested change
filters: filters?.concat(bucketFilters),
filters: filters ? filters.concat(bucketFilters) : bucketFilters,

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 8.5MB 8.5MB +564.0B

Distributable file count

id before after diff
default 47141 47902 +761

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@madirey madirey merged commit 0d9b40d into elastic:master Dec 20, 2020
@madirey madirey deleted the threshold-fields branch December 20, 2020 19:10
madirey added a commit to madirey/kibana that referenced this pull request Dec 20, 2020
…ixes (elastic#84918)

* Move threshold dupe detection logic to its own function

* Minor fixup

* Refactor and remove property injection for threshold signals

* Only show aggregatable fields for threshold rule grouping

* Add threshold rule kql filter to timeline

* Remove outdated getThresholdSignalQueryFields tests

* Filter aggregatable fields on client

* Revert "Only show aggregatable fields for threshold rule grouping"

This reverts commit 539fa49.

* Fix bug with incorrect calculation of threshold signal dupes when no threshold field present

* Revert "Add threshold rule kql filter to timeline"

This reverts commit 6482374.

* Add test skeleton

* Finish tests

* Address comment
madirey added a commit to madirey/kibana that referenced this pull request Dec 20, 2020
…ixes (elastic#84918)

* Move threshold dupe detection logic to its own function

* Minor fixup

* Refactor and remove property injection for threshold signals

* Only show aggregatable fields for threshold rule grouping

* Add threshold rule kql filter to timeline

* Remove outdated getThresholdSignalQueryFields tests

* Filter aggregatable fields on client

* Revert "Only show aggregatable fields for threshold rule grouping"

This reverts commit 539fa49.

* Fix bug with incorrect calculation of threshold signal dupes when no threshold field present

* Revert "Add threshold rule kql filter to timeline"

This reverts commit 6482374.

* Add test skeleton

* Finish tests

* Address comment
gmmorris added a commit to gmmorris/kibana that referenced this pull request Dec 21, 2020
* master: (48 commits)
  Fix request with disabled aggregation (elastic#85696)
  [Security Solution][Detections][Threshold Rules] Threshold Rule Bug Fixes (elastic#84918)
  Removed a possibility to define two different names for Alert types on API and UI level. (elastic#86236)
  Bump Node.js from version 14.15.2 to 14.15.3 (elastic#86593)
  [index patterns] Fleep app - Keep saved object field list until field caps provides fields (elastic#85370)
  [Security Solutions] fix timeline tabs + layout (elastic#86581)
  Upgrade to hapi version 20 (elastic#85406)
  App Services: Remove remaining uiActions, expressions, data, embeddable circular dependencies. (elastic#82791)
  Rename chartLibrary setting to legacyChartsLibrary (elastic#86529)
  [CI] TeamCity updates (elastic#85843)
  [Maps] Use Json for mvt-tests (elastic#86492)
  [Rollup Jobs] Added autofocus to cron editor (elastic#86324)
  [Monitoring][Alerting] CCR read exceptions alert (elastic#85908)
  [CI] Bump memory for main CI workers (elastic#86541)
  Explicitly set Elasticsearch heap size during CI and local development (elastic#86513)
  [App Search] Updates to results on the documents view (elastic#86181)
  [Discover] Change default sort handling  (elastic#85561)
  [App Search] Convert DocumentCreationModal to DocumentCreationFlyout (elastic#86508)
  [App Search] Sample Engines should have access to the Crawler (elastic#86502)
  Fixed duplication of create new modal (elastic#86489)
  ...
madirey added a commit that referenced this pull request Dec 21, 2020
…ixes (#84918) (#86606)

* Move threshold dupe detection logic to its own function

* Minor fixup

* Refactor and remove property injection for threshold signals

* Only show aggregatable fields for threshold rule grouping

* Add threshold rule kql filter to timeline

* Remove outdated getThresholdSignalQueryFields tests

* Filter aggregatable fields on client

* Revert "Only show aggregatable fields for threshold rule grouping"

This reverts commit 539fa49.

* Fix bug with incorrect calculation of threshold signal dupes when no threshold field present

* Revert "Add threshold rule kql filter to timeline"

This reverts commit 6482374.

* Add test skeleton

* Finish tests

* Address comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
yctercero pushed a commit that referenced this pull request Dec 21, 2020
…ixes (#84918) (#86607)

* Move threshold dupe detection logic to its own function

* Minor fixup

* Refactor and remove property injection for threshold signals

* Only show aggregatable fields for threshold rule grouping

* Add threshold rule kql filter to timeline

* Remove outdated getThresholdSignalQueryFields tests

* Filter aggregatable fields on client

* Revert "Only show aggregatable fields for threshold rule grouping"

This reverts commit 539fa49.

* Fix bug with incorrect calculation of threshold signal dupes when no threshold field present

* Revert "Add threshold rule kql filter to timeline"

This reverts commit 6482374.

* Add test skeleton

* Finish tests

* Address comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Threshold Rule Security Solution Threshold rule type release_note:enhancement Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.11.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants