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

[Security Solution] Create new host flyout #173392

Merged
merged 16 commits into from
Jan 4, 2024
Merged

Conversation

machadoum
Copy link
Member

@machadoum machadoum commented Dec 14, 2023

Summary

Create the Expandable Host flyout with the risk inputs panel.

Screenshot 2023-12-22 at 16 56 12

What is included

  • Host panel creation
  • Left risk inputs panel
  • Refactor user panel component to be reused by Host
  • Risk score section

What is not included

  • Asset integration section
  • Asset criticality

How to test it?

  • Enable experimental flag newHostDetailsFlyout
  • Create alerts with host.name field
  • Open the alerts page and click on the host.name field
  • It should not display the expandable risk input panel
  • Enable Risk engine
  • make sure it generates data for the host
  • Open the flyout once more and check if the expandable risk input panel opens

@machadoum machadoum self-assigned this Dec 14, 2023
@machadoum machadoum added Team:Entity Analytics Security Entity Analytics Team Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! AET Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. technical debt Improvement of the software architecture and operational architecture release_note:skip Skip the PR/issue when compiling release notes and removed Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! labels Dec 18, 2023
@machadoum machadoum changed the title [Security Solution] Co-locate Frontend Entity Analytics Code [Security Solution] Create new host flyout and show a 'Risk Summary' view Dec 18, 2023
* Refactor user flyout components to be reused by hosts
@machadoum machadoum changed the title [Security Solution] Create new host flyout and show a 'Risk Summary' view [Security Solution] Create new host flyout Dec 22, 2023
@machadoum machadoum marked this pull request as ready for review January 2, 2024 13:40
@machadoum machadoum requested review from a team as code owners January 2, 2024 13:40
@machadoum machadoum removed the technical debt Improvement of the software architecture and operational architecture label Jan 2, 2024
Copy link
Contributor

@PhilippeOberti PhilippeOberti left a comment

Choose a reason for hiding this comment

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

LGTM for the Threat Hunting Investigations team

Copy link
Contributor

@semd semd left a comment

Choose a reason for hiding this comment

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

Explore code LGTM

@oatkiller oatkiller requested a review from dr3nkrypted January 3, 2024 18:37
@hop-dev
Copy link
Contributor

hop-dev commented Jan 4, 2024

@elasticmachine merge upstream

Copy link
Contributor

@tiansivive tiansivive left a comment

Choose a reason for hiding this comment

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

LGTM, other than some minor nits

But since I worked on this feature, someone else from @elastic/security-entity-analytics should also take a look for final approval

[mlCapabilities]
);

if (!hostData.details) return [];
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: I've been constantly reminded in reviews that standard practice is to never return without braces in if checks 😆

Copy link
Member Author

Choose a reason for hiding this comment

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

Sergi also asked me to fix that. I am updating it everywhere. But I think it is weird that we have a code style preference that isn't included in the code style CI check (prettier).

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree we should either have a lint rule for this or not care, I quite like it without the braces 😅

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I definitely agree, I asked the same, about having a lint rule.
I much prefer it without the braces, but if it's standard practice, we should have rule because I will definitely keep forgetting about it

@machadoum machadoum enabled auto-merge (squash) January 4, 2024 13:55
@machadoum machadoum merged commit effd9e7 into elastic:main Jan 4, 2024
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #75 / transform - feature controls "after all" hook in "transform - feature controls"

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 4842 4858 +16

Async chunks

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

id before after diff
securitySolution 11.3MB 11.3MB +12.3KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolution 64.2KB 64.2KB +24.0B

History

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

cc @machadoum @tiansivive

@kibanamachine kibanamachine added v8.13.0 backport:skip This commit does not require backporting labels Jan 4, 2024
machadoum added a commit that referenced this pull request Jan 11, 2024
## Summary

issue: #173392

Flaky test runner runs: 
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4773
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4841


* Add cypress test to the new User and Host flyouts.
* Fix function using the wrong host risk score index
* Fix some cypress flakiness

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Kibana Machine <[email protected]>
delanni pushed a commit to delanni/kibana that referenced this pull request Jan 11, 2024
## Summary

issue: elastic#173392

Flaky test runner runs: 
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4773
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4841


* Add cypress test to the new User and Host flyouts.
* Fix function using the wrong host risk score index
* Fix some cypress flakiness

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Entity Analytics Security Entity Analytics Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants