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

[Cloud Security] Host Name Misconfiguration Datagrid & Refactor CSP Plugin PHASE 1 #192114

Merged
merged 6 commits into from
Sep 6, 2024

Conversation

animehart
Copy link
Contributor

Summary

In an attempt to make Reviewing easier and more accurate, the implementation of Misconfiguration Data grid on Host.name flyout in Alerts Page will be split into 2 Phases

Phase 1: Move Functions, Utils or Helpers, Hooks, constants to Package
Phase 2: Implementing the feature

This is Phase 1 of the process

This PR also include a small bug fix mentioned here #191677 (review)

…xt to do will be to remove all usage of the added constants and function on csp plugins and update the import to be from the package
@animehart
Copy link
Contributor Author

/ci

@animehart
Copy link
Contributor Author

/ci

@animehart animehart marked this pull request as ready for review September 4, 2024 23:59
@animehart animehart requested review from a team as code owners September 4, 2024 23:59
@animehart animehart added v8.16.0 Team:Cloud Security Cloud Security team related labels Sep 5, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

@animehart animehart added the release_note:skip Skip the PR/issue when compiling release notes label Sep 5, 2024
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 from Entity Analytics

@animehart animehart added the ci:project-deploy-security Create a Security Serverless Project label Sep 6, 2024
@animehart
Copy link
Contributor Author

/ci

1 similar comment
@animehart
Copy link
Contributor Author

/ci

Copy link
Contributor

@maxcold maxcold left a comment

Choose a reason for hiding this comment

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

lgtm, couple of small comments

@@ -6,14 +6,15 @@
*/

import { renderHook, act } from '@testing-library/react-hooks/dom';
import { useNavigateFindings, useNavigateVulnerabilities } from './use_navigate_findings';
import { useNavigateVulnerabilities } from './use_navigate_findings';
import { useNavigateFindings } from './use_navigate_findings';
Copy link
Contributor

Choose a reason for hiding this comment

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

seems like the change is done by mistake, two imports from the same file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Woops, you are right

@@ -38,8 +38,6 @@ export const DETECTION_RULE_RULES_API_CURRENT_VERSION = '2023-10-31';
export const CLOUD_SECURITY_POSTURE_PACKAGE_NAME = 'cloud_security_posture';

export const CDR_MISCONFIGURATIONS_DATA_VIEW_NAME = 'Latest Cloud Security Misconfigurations';
Copy link
Contributor

Choose a reason for hiding this comment

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

even if we don't need this const for shared code, I'd move it too to avoid confusion, as CDR related constants belong together

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good call

@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 6, 2024

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
cloudSecurityPosture 640 642 +2
securitySolution 5726 5730 +4
total +6

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/cloud-security-posture 22 63 +41
@kbn/cloud-security-posture-common 52 55 +3
total +44

Any counts in public APIs

Total count of every any typed public API. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats any for more detailed information.

id before after diff
@kbn/cloud-security-posture 0 1 +1

Async chunks

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

id before after diff
cloudSecurityPosture 494.2KB 494.2KB +54.0B
securitySolution 19.7MB 19.7MB +5.4KB
total +5.5KB

Page load bundle

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

id before after diff
cloudSecurityPosture 17.6KB 17.7KB +58.0B
Unknown metric groups

API count

id before after diff
@kbn/cloud-security-posture 22 63 +41
@kbn/cloud-security-posture-common 52 56 +4
cloudSecurityPosture 14 13 -1
total +44

ESLint disabled line counts

id before after diff
@kbn/cloud-security-posture 0 2 +2
cloudSecurityPosture 31 29 -2
total -0

Total ESLint disabled count

id before after diff
@kbn/cloud-security-posture 0 2 +2
cloudSecurityPosture 31 29 -2
total -0

History

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

@animehart animehart merged commit d177d11 into elastic:main Sep 6, 2024
41 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Sep 6, 2024
crespocarlos pushed a commit to crespocarlos/kibana that referenced this pull request Sep 11, 2024
…lugin PHASE 1 (elastic#192114)

## Summary

In an attempt to make Reviewing easier and more accurate, the
implementation of Misconfiguration Data grid on Host.name flyout in
Alerts Page will be split into 2 Phases

Phase 1: Move Functions, Utils or Helpers, Hooks, constants to Package
Phase 2: Implementing the feature

This is Phase 1 of the process

This PR also include a small bug fix mentioned here
elastic#191677 (review)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
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 ci:project-deploy-security Create a Security Serverless Project release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants