Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-cloud-security-posture (#202862)

This commit is contained in:
Gerard Soldevila 2024-12-16 18:56:03 +01:00 committed by GitHub
parent ce8be96afe
commit f508ad2bf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
843 changed files with 1533 additions and 1469 deletions

View file

@ -365,7 +365,7 @@ const getPipeline = (filename: string, removeSteps = true) => {
if (
(await doAnyChangesMatch([
/^x-pack\/packages\/kbn-cloud-security-posture/,
/^x-pack\/plugins\/cloud_security_posture/,
/^x-pack\/solutions\/security\/plugins\/cloud_security_posture/,
/^x-pack\/plugins\/security_solution/,
/^x-pack\/test\/security_solution_cypress/,
])) ||

View file

@ -1965,7 +1965,7 @@ module.exports = {
* Cloud Security Team overrides
*/
{
files: ['x-pack/plugins/cloud_security_posture/**/*.{js,mjs,ts,tsx}'],
files: ['x-pack/solutions/security/plugins/cloud_security_posture/**/*.{js,mjs,ts,tsx}'],
plugins: ['testing-library'],
rules: {
'testing-library/await-async-utils': 'error',

16
.github/CODEOWNERS vendored
View file

@ -778,9 +778,6 @@ x-pack/packages/ai-infra/product-doc-artifact-builder @elastic/appex-ai-infra
x-pack/packages/kbn-ai-assistant @elastic/search-kibana
x-pack/packages/kbn-alerting-comparators @elastic/response-ops
x-pack/packages/kbn-alerting-state-types @elastic/response-ops
x-pack/packages/kbn-cloud-security-posture/common @elastic/kibana-cloud-security-posture
x-pack/packages/kbn-cloud-security-posture/graph @elastic/kibana-cloud-security-posture
x-pack/packages/kbn-cloud-security-posture/public @elastic/kibana-cloud-security-posture
x-pack/packages/kbn-random-sampling @elastic/kibana-visualizations
x-pack/packages/kbn-synthetics-private-location @elastic/obs-ux-management-team
x-pack/packages/maps/vector_tile_utils @elastic/kibana-presentation
@ -837,6 +834,7 @@ x-pack/platform/packages/shared/ai-infra/inference-common @elastic/appex-ai-infr
x-pack/platform/packages/shared/ai-infra/product-doc-common @elastic/appex-ai-infra
x-pack/platform/packages/shared/index-lifecycle-management/index_lifecycle_management_common_shared @elastic/kibana-management
x-pack/platform/packages/shared/index-management/index_management_shared_types @elastic/kibana-management
x-pack/platform/packages/shared/kbn-cloud-security-posture/common @elastic/kibana-cloud-security-posture
x-pack/platform/packages/shared/kbn-data-forge @elastic/obs-ux-management-team
x-pack/platform/packages/shared/kbn-elastic-assistant @elastic/security-generative-ai
x-pack/platform/packages/shared/kbn-elastic-assistant-common @elastic/security-generative-ai
@ -882,17 +880,14 @@ x-pack/platform/plugins/shared/osquery @elastic/security-defend-workflows
x-pack/platform/plugins/shared/searchprofiler @elastic/kibana-management
x-pack/plugins/actions @elastic/response-ops
x-pack/plugins/alerting @elastic/response-ops
x-pack/plugins/asset_inventory @elastic/kibana-cloud-security-posture
x-pack/plugins/banners @elastic/appex-sharedux
x-pack/plugins/canvas @elastic/kibana-presentation
x-pack/plugins/cases @elastic/response-ops
x-pack/plugins/cloud @elastic/kibana-core
x-pack/plugins/cloud_defend @elastic/kibana-cloud-security-posture
x-pack/plugins/cloud_integrations/cloud_chat @elastic/kibana-core
x-pack/plugins/cloud_integrations/cloud_experiments @elastic/kibana-core
x-pack/plugins/cloud_integrations/cloud_full_story @elastic/kibana-core
x-pack/plugins/cloud_integrations/cloud_links @elastic/kibana-core
x-pack/plugins/cloud_security_posture @elastic/kibana-cloud-security-posture
x-pack/plugins/custom_branding @elastic/appex-sharedux
x-pack/plugins/dashboard_enhanced @elastic/kibana-presentation
x-pack/plugins/data_quality @elastic/obs-ux-logs-team
@ -912,7 +907,6 @@ x-pack/plugins/global_search_providers @elastic/appex-sharedux
x-pack/plugins/graph @elastic/kibana-visualizations
x-pack/plugins/index_management @elastic/kibana-management
x-pack/plugins/ingest_pipelines @elastic/kibana-management
x-pack/plugins/kubernetes_security @elastic/kibana-cloud-security-posture
x-pack/plugins/lens @elastic/kibana-visualizations
x-pack/plugins/licensing @elastic/kibana-core
x-pack/plugins/lists @elastic/security-detection-engine
@ -956,7 +950,6 @@ x-pack/plugins/security_solution_ess @elastic/security-solution
x-pack/plugins/security_solution_serverless @elastic/security-solution
x-pack/plugins/serverless @elastic/appex-sharedux
x-pack/plugins/serverless_search @elastic/search-kibana
x-pack/plugins/session_view @elastic/kibana-cloud-security-posture
x-pack/plugins/spaces @elastic/kibana-security
x-pack/plugins/stack_alerts @elastic/response-ops
x-pack/plugins/stack_connectors @elastic/response-ops
@ -994,12 +987,19 @@ x-pack/solutions/security/packages/ecs_data_quality_dashboard @elastic/security-
x-pack/solutions/security/packages/expandable-flyout @elastic/security-threat-hunting-investigations
x-pack/solutions/security/packages/features @elastic/security-threat-hunting-explore
x-pack/solutions/security/packages/index-adapter @elastic/security-threat-hunting
x-pack/solutions/security/packages/kbn-cloud-security-posture/graph @elastic/kibana-cloud-security-posture
x-pack/solutions/security/packages/kbn-cloud-security-posture/public @elastic/kibana-cloud-security-posture
x-pack/solutions/security/packages/navigation @elastic/security-threat-hunting-explore
x-pack/solutions/security/packages/side_nav @elastic/security-threat-hunting-explore
x-pack/solutions/security/packages/storybook/config @elastic/security-threat-hunting-explore
x-pack/solutions/security/packages/upselling @elastic/security-threat-hunting-explore
x-pack/solutions/security/plugins/asset_inventory @elastic/kibana-cloud-security-posture
x-pack/solutions/security/plugins/cloud_defend @elastic/kibana-cloud-security-posture
x-pack/solutions/security/plugins/cloud_security_posture @elastic/kibana-cloud-security-posture
x-pack/solutions/security/plugins/ecs_data_quality_dashboard @elastic/security-threat-hunting-explore
x-pack/solutions/security/plugins/elastic_assistant @elastic/security-generative-ai
x-pack/solutions/security/plugins/kubernetes_security @elastic/kibana-cloud-security-posture
x-pack/solutions/security/plugins/session_view @elastic/kibana-cloud-security-posture
x-pack/solutions/security/plugins/threat_intelligence @elastic/security-threat-hunting-investigations
x-pack/solutions/security/plugins/timelines @elastic/security-threat-hunting-investigations
x-pack/test

View file

@ -74,7 +74,7 @@ paths-ignore:
- scripts
- test
- x-pack/plugins/canvas/scripts
- x-pack/plugins/cloud_security_posture/common/scripts
- x-pack/solutions/security/plugins/cloud_security_posture/common/scripts
- x-pack/solutions/security/plugins/elastic_assistant/scripts
- x-pack/plugins/event_log/scripts
- x-pack/plugins/fleet/scripts

View file

@ -119,7 +119,12 @@
"searchIndexDocuments": "packages/kbn-search-index-documents",
"searchResponseWarnings": "packages/kbn-search-response-warnings",
"searchTypes": "packages/kbn-search-types",
"securitySolutionPackages": "x-pack/solutions/security/packages",
"securitySolutionPackages": [
"x-pack/solutions/security/packages"
],
"sharedPlatformPackages": [
"x-pack/platform/packages/shared/kbn-cloud-security-posture"
],
"serverlessPackages": "packages/serverless",
"sse": ["src/platform/packages/shared/kbn-sse-utils"],
"coloring": "packages/kbn-coloring/src",

View file

@ -470,7 +470,7 @@ The plugin exposes the static DefaultEditorController class to consume.
|WARNING: Missing README.
|{kib-repo}blob/{branch}/x-pack/plugins/asset_inventory/README.md[assetInventory]
|{kib-repo}blob/{branch}/x-pack/solutions/security/plugins/asset_inventory/README.md[assetInventory]
|Centralized asset inventory experience within the Elastic Security solution. A central place for users to view and manage all their assets from different environments.
@ -499,7 +499,7 @@ It was removed, but the plugin was left behind to register no longer used config
|Static migration page where self-managed users can see text/copy about migrating to Elastic Cloud
|{kib-repo}blob/{branch}/x-pack/plugins/cloud_defend/README.md[cloudDefend]
|{kib-repo}blob/{branch}/x-pack/solutions/security/plugins/cloud_defend/README.md[cloudDefend]
|This plugin currently only exists to provide custom fleet policy UX for a set of new BPF LSM features. The first feature being container "drift prevention".
@ -516,7 +516,7 @@ This plugin no-longer exposes any evaluation APIs. Refer to <DocLink id="kibFeat
|Adds all the links to the Elastic Cloud console.
|{kib-repo}blob/{branch}/x-pack/plugins/cloud_security_posture/README.md[cloudSecurityPosture]
|{kib-repo}blob/{branch}/x-pack/solutions/security/plugins/cloud_security_posture/README.md[cloudSecurityPosture]
|Cloud Posture automates the identification and remediation of risks across cloud infrastructures
@ -673,7 +673,7 @@ the infrastructure monitoring use-case within Kibana.
|undefined
|{kib-repo}blob/{branch}/x-pack/plugins/kubernetes_security/README.md[kubernetesSecurity]
|{kib-repo}blob/{branch}/x-pack/solutions/security/plugins/kubernetes_security/README.md[kubernetesSecurity]
|This plugin provides interactive visualizations of your Kubernetes workload and session data.
@ -890,7 +890,7 @@ This plugin is only enabled when the application is built for serverless project
|This plugin contains configuration and code used to create a Serverless Search project. It leverages universal configuration and other APIs in the serverless plugin to configure Kibana.
|{kib-repo}blob/{branch}/x-pack/plugins/session_view/README.md[sessionView]
|{kib-repo}blob/{branch}/x-pack/solutions/security/plugins/session_view/README.md[sessionView]
|Session View is meant to provide a visualization into what is going on in a particular Linux environment where the agent is running. It looks likes a terminal emulator; however, it is a tool for introspecting process activity and understanding user and service behaviour in your Linux servers and infrastructure. It is a time-ordered series of process executions displayed in a tree over time.

View file

@ -192,7 +192,7 @@
"@kbn/apm-utils": "link:packages/kbn-apm-utils",
"@kbn/app-link-test-plugin": "link:test/plugin_functional/plugins/app_link_test",
"@kbn/application-usage-test-plugin": "link:x-pack/test/usage_collection/plugins/application_usage_test",
"@kbn/asset-inventory-plugin": "link:x-pack/plugins/asset_inventory",
"@kbn/asset-inventory-plugin": "link:x-pack/solutions/security/plugins/asset_inventory",
"@kbn/audit-log-plugin": "link:x-pack/test/security_api_integration/plugins/audit_log",
"@kbn/avc-banner": "link:src/platform/packages/shared/kbn-avc-banner",
"@kbn/banners-plugin": "link:x-pack/plugins/banners",
@ -212,16 +212,16 @@
"@kbn/cloud": "link:packages/cloud",
"@kbn/cloud-chat-plugin": "link:x-pack/plugins/cloud_integrations/cloud_chat",
"@kbn/cloud-data-migration-plugin": "link:x-pack/platform/plugins/private/cloud_integrations/cloud_data_migration",
"@kbn/cloud-defend-plugin": "link:x-pack/plugins/cloud_defend",
"@kbn/cloud-defend-plugin": "link:x-pack/solutions/security/plugins/cloud_defend",
"@kbn/cloud-experiments-plugin": "link:x-pack/plugins/cloud_integrations/cloud_experiments",
"@kbn/cloud-full-story-plugin": "link:x-pack/plugins/cloud_integrations/cloud_full_story",
"@kbn/cloud-integration-saml-provider-plugin": "link:x-pack/test/cloud_integration/plugins/saml_provider",
"@kbn/cloud-links-plugin": "link:x-pack/plugins/cloud_integrations/cloud_links",
"@kbn/cloud-plugin": "link:x-pack/plugins/cloud",
"@kbn/cloud-security-posture": "link:x-pack/packages/kbn-cloud-security-posture/public",
"@kbn/cloud-security-posture-common": "link:x-pack/packages/kbn-cloud-security-posture/common",
"@kbn/cloud-security-posture-graph": "link:x-pack/packages/kbn-cloud-security-posture/graph",
"@kbn/cloud-security-posture-plugin": "link:x-pack/plugins/cloud_security_posture",
"@kbn/cloud-security-posture": "link:x-pack/solutions/security/packages/kbn-cloud-security-posture/public",
"@kbn/cloud-security-posture-common": "link:x-pack/platform/packages/shared/kbn-cloud-security-posture/common",
"@kbn/cloud-security-posture-graph": "link:x-pack/solutions/security/packages/kbn-cloud-security-posture/graph",
"@kbn/cloud-security-posture-plugin": "link:x-pack/solutions/security/plugins/cloud_security_posture",
"@kbn/code-editor": "link:packages/shared-ux/code_editor/impl",
"@kbn/code-editor-mock": "link:packages/shared-ux/code_editor/mocks",
"@kbn/coloring": "link:packages/kbn-coloring",
@ -607,7 +607,7 @@
"@kbn/kibana-react-plugin": "link:src/plugins/kibana_react",
"@kbn/kibana-usage-collection-plugin": "link:src/plugins/kibana_usage_collection",
"@kbn/kibana-utils-plugin": "link:src/plugins/kibana_utils",
"@kbn/kubernetes-security-plugin": "link:x-pack/plugins/kubernetes_security",
"@kbn/kubernetes-security-plugin": "link:x-pack/solutions/security/plugins/kubernetes_security",
"@kbn/langchain": "link:x-pack/platform/packages/shared/kbn-langchain",
"@kbn/language-documentation": "link:src/platform/packages/private/kbn-language-documentation",
"@kbn/lens-config-builder-example-plugin": "link:x-pack/examples/lens_config_builder_example",
@ -873,7 +873,7 @@
"@kbn/serverless-security-settings": "link:packages/serverless/settings/security_project",
"@kbn/serverless-types": "link:packages/serverless/types",
"@kbn/session-notifications-plugin": "link:test/plugin_functional/plugins/session_notifications",
"@kbn/session-view-plugin": "link:x-pack/plugins/session_view",
"@kbn/session-view-plugin": "link:x-pack/solutions/security/plugins/session_view",
"@kbn/set-map": "link:packages/kbn-set-map",
"@kbn/share-examples-plugin": "link:examples/share_examples",
"@kbn/share-plugin": "link:src/plugins/share",

View file

@ -22,7 +22,7 @@ export enum SecurityPageName {
caseCreate = 'cases_create', // must match `CasesDeepLinkId.casesCreate`
/*
* Warning: Computed values are not permitted in an enum with string valued members
* All cloud security posture page names must match `CloudSecurityPosturePageId` in x-pack/plugins/cloud_security_posture/public/common/navigation/types.ts
* All cloud security posture page names must match `CloudSecurityPosturePageId` in x-pack/solutions/security/plugins/cloud_security_posture/public/common/navigation/types.ts
*/
cloudSecurityPostureBenchmarks = 'cloud_security_posture-benchmarks',
cloudSecurityPostureDashboard = 'cloud_security_posture-dashboard',
@ -30,7 +30,7 @@ export enum SecurityPageName {
cloudSecurityPostureRules = 'cloud_security_posture-rules',
/*
* Warning: Computed values are not permitted in an enum with string valued members
* All cloud defend page names must match `CloudDefendPageId` in x-pack/plugins/cloud_defend/public/common/navigation/types.ts
* All cloud defend page names must match `CloudDefendPageId` in x-pack/solutions/security/plugins/cloud_defend/public/common/navigation/types.ts
*/
cloudDefend = 'cloud_defend',
cloudDefendPolicies = 'cloud_defend-policies',

View file

@ -98,8 +98,8 @@
"@kbn/app-link-test-plugin/*": ["test/plugin_functional/plugins/app_link_test/*"],
"@kbn/application-usage-test-plugin": ["x-pack/test/usage_collection/plugins/application_usage_test"],
"@kbn/application-usage-test-plugin/*": ["x-pack/test/usage_collection/plugins/application_usage_test/*"],
"@kbn/asset-inventory-plugin": ["x-pack/plugins/asset_inventory"],
"@kbn/asset-inventory-plugin/*": ["x-pack/plugins/asset_inventory/*"],
"@kbn/asset-inventory-plugin": ["x-pack/solutions/security/plugins/asset_inventory"],
"@kbn/asset-inventory-plugin/*": ["x-pack/solutions/security/plugins/asset_inventory/*"],
"@kbn/audit-log-plugin": ["x-pack/test/security_api_integration/plugins/audit_log"],
"@kbn/audit-log-plugin/*": ["x-pack/test/security_api_integration/plugins/audit_log/*"],
"@kbn/avc-banner": ["src/platform/packages/shared/kbn-avc-banner"],
@ -164,8 +164,8 @@
"@kbn/cloud-chat-plugin/*": ["x-pack/plugins/cloud_integrations/cloud_chat/*"],
"@kbn/cloud-data-migration-plugin": ["x-pack/platform/plugins/private/cloud_integrations/cloud_data_migration"],
"@kbn/cloud-data-migration-plugin/*": ["x-pack/platform/plugins/private/cloud_integrations/cloud_data_migration/*"],
"@kbn/cloud-defend-plugin": ["x-pack/plugins/cloud_defend"],
"@kbn/cloud-defend-plugin/*": ["x-pack/plugins/cloud_defend/*"],
"@kbn/cloud-defend-plugin": ["x-pack/solutions/security/plugins/cloud_defend"],
"@kbn/cloud-defend-plugin/*": ["x-pack/solutions/security/plugins/cloud_defend/*"],
"@kbn/cloud-experiments-plugin": ["x-pack/plugins/cloud_integrations/cloud_experiments"],
"@kbn/cloud-experiments-plugin/*": ["x-pack/plugins/cloud_integrations/cloud_experiments/*"],
"@kbn/cloud-full-story-plugin": ["x-pack/plugins/cloud_integrations/cloud_full_story"],
@ -176,14 +176,14 @@
"@kbn/cloud-links-plugin/*": ["x-pack/plugins/cloud_integrations/cloud_links/*"],
"@kbn/cloud-plugin": ["x-pack/plugins/cloud"],
"@kbn/cloud-plugin/*": ["x-pack/plugins/cloud/*"],
"@kbn/cloud-security-posture": ["x-pack/packages/kbn-cloud-security-posture/public"],
"@kbn/cloud-security-posture/*": ["x-pack/packages/kbn-cloud-security-posture/public/*"],
"@kbn/cloud-security-posture-common": ["x-pack/packages/kbn-cloud-security-posture/common"],
"@kbn/cloud-security-posture-common/*": ["x-pack/packages/kbn-cloud-security-posture/common/*"],
"@kbn/cloud-security-posture-graph": ["x-pack/packages/kbn-cloud-security-posture/graph"],
"@kbn/cloud-security-posture-graph/*": ["x-pack/packages/kbn-cloud-security-posture/graph/*"],
"@kbn/cloud-security-posture-plugin": ["x-pack/plugins/cloud_security_posture"],
"@kbn/cloud-security-posture-plugin/*": ["x-pack/plugins/cloud_security_posture/*"],
"@kbn/cloud-security-posture": ["x-pack/solutions/security/packages/kbn-cloud-security-posture/public"],
"@kbn/cloud-security-posture/*": ["x-pack/solutions/security/packages/kbn-cloud-security-posture/public/*"],
"@kbn/cloud-security-posture-common": ["x-pack/platform/packages/shared/kbn-cloud-security-posture/common"],
"@kbn/cloud-security-posture-common/*": ["x-pack/platform/packages/shared/kbn-cloud-security-posture/common/*"],
"@kbn/cloud-security-posture-graph": ["x-pack/solutions/security/packages/kbn-cloud-security-posture/graph"],
"@kbn/cloud-security-posture-graph/*": ["x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/*"],
"@kbn/cloud-security-posture-plugin": ["x-pack/solutions/security/plugins/cloud_security_posture"],
"@kbn/cloud-security-posture-plugin/*": ["x-pack/solutions/security/plugins/cloud_security_posture/*"],
"@kbn/code-editor": ["packages/shared-ux/code_editor/impl"],
"@kbn/code-editor/*": ["packages/shared-ux/code_editor/impl/*"],
"@kbn/code-editor-mock": ["packages/shared-ux/code_editor/mocks"],
@ -1132,8 +1132,8 @@
"@kbn/kibana-usage-collection-plugin/*": ["src/plugins/kibana_usage_collection/*"],
"@kbn/kibana-utils-plugin": ["src/plugins/kibana_utils"],
"@kbn/kibana-utils-plugin/*": ["src/plugins/kibana_utils/*"],
"@kbn/kubernetes-security-plugin": ["x-pack/plugins/kubernetes_security"],
"@kbn/kubernetes-security-plugin/*": ["x-pack/plugins/kubernetes_security/*"],
"@kbn/kubernetes-security-plugin": ["x-pack/solutions/security/plugins/kubernetes_security"],
"@kbn/kubernetes-security-plugin/*": ["x-pack/solutions/security/plugins/kubernetes_security/*"],
"@kbn/langchain": ["x-pack/platform/packages/shared/kbn-langchain"],
"@kbn/langchain/*": ["x-pack/platform/packages/shared/kbn-langchain/*"],
"@kbn/language-documentation": ["src/platform/packages/private/kbn-language-documentation"],
@ -1726,8 +1726,8 @@
"@kbn/serverless-types/*": ["packages/serverless/types/*"],
"@kbn/session-notifications-plugin": ["test/plugin_functional/plugins/session_notifications"],
"@kbn/session-notifications-plugin/*": ["test/plugin_functional/plugins/session_notifications/*"],
"@kbn/session-view-plugin": ["x-pack/plugins/session_view"],
"@kbn/session-view-plugin/*": ["x-pack/plugins/session_view/*"],
"@kbn/session-view-plugin": ["x-pack/solutions/security/plugins/session_view"],
"@kbn/session-view-plugin/*": ["x-pack/solutions/security/plugins/session_view/*"],
"@kbn/set-map": ["packages/kbn-set-map"],
"@kbn/set-map/*": ["packages/kbn-set-map/*"],
"@kbn/share-examples-plugin": ["examples/share_examples"],

View file

@ -20,11 +20,11 @@
"xpack.canvas": "plugins/canvas",
"xpack.cases": "plugins/cases",
"xpack.cloud": "plugins/cloud",
"xpack.cloudDefend": "plugins/cloud_defend",
"xpack.cloudDefend": "solutions/security/plugins/cloud_defend",
"xpack.cloudLinks": "plugins/cloud_integrations/cloud_links",
"xpack.cloudDataMigration": "platform/plugins/private/cloud_integrations/cloud_data_migration",
"xpack.csp": [
"plugins/cloud_security_posture",
"solutions/security/plugins/cloud_security_posture",
"packages/kbn-cloud-security-posture-common",
"packages/kbn-cloud-security-posture"
],
@ -70,7 +70,7 @@
"xpack.inventory": "plugins/observability_solution/inventory",
"xpack.investigate": "solutions/observability/plugins/investigate",
"xpack.investigateApp": "solutions/observability/plugins/investigate_app",
"xpack.kubernetesSecurity": "plugins/kubernetes_security",
"xpack.kubernetesSecurity": "solutions/security/plugins/kubernetes_security",
"xpack.lens": "plugins/lens",
"xpack.licenseApiGuard": "platform/plugins/private/license_api_guard",
"xpack.licenseMgmt": "platform/plugins/shared/license_management",
@ -149,7 +149,7 @@
"xpack.securitySolution": "plugins/security_solution",
"xpack.securitySolutionEss": "plugins/security_solution_ess",
"xpack.securitySolutionServerless": "plugins/security_solution_serverless",
"xpack.sessionView": "plugins/session_view",
"xpack.sessionView": "solutions/security/plugins/session_view",
"xpack.streams": [
"solutions/observability/plugins/streams_app"
],

View file

@ -1,9 +0,0 @@
# @kbn/cloud-security-posture-common
This package provides common code consumed in both the browser, i.e. the
`packages/kbn-cloud-security-posture` package and `plugins/cloud_security_posture` plugin, and on the server, i.e. the
`plugins/cloud_security_posture` plugin.
## Maintainers
Maintained by the Cloud Security Team

View file

@ -0,0 +1,9 @@
# @kbn/cloud-security-posture-common
This package provides common code consumed in both the browser, i.e. the
`packages/kbn-cloud-security-posture` package and `solutions/security/plugins/cloud_security_posture` plugin, and on the server, i.e. the
`solutions/security/plugins/cloud_security_posture` plugin.
## Maintainers
Maintained by the Cloud Security Team

View file

@ -7,6 +7,6 @@
module.exports = {
preset: '@kbn/test',
rootDir: '../../../..',
roots: ['<rootDir>/x-pack/packages/kbn-cloud-security-posture/common'],
rootDir: '../../../../../..',
roots: ['<rootDir>/x-pack/platform/packages/shared/kbn-cloud-security-posture/common'],
};

View file

@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [

View file

@ -9,9 +9,12 @@ import { QueryDslQueryContainer } from '@kbn/data-views-plugin/common/types';
import { i18n } from '@kbn/i18n';
import type { CspBenchmarkRulesStates } from '../schema/rules/latest';
export const defaultErrorMessage = i18n.translate('xpack.csp.common.utils.helpers.unknownError', {
defaultMessage: 'Unknown Error',
});
export const defaultErrorMessage = i18n.translate(
'sharedPlatformPackages.csp.common.utils.helpers.unknownError',
{
defaultMessage: 'Unknown Error',
}
);
export const extractErrorMessage = (e: unknown, fallbackMessage?: string): string => {
if (e instanceof Error) return e.message;

View file

@ -14644,7 +14644,7 @@
"xpack.csp.cnvmDashboardTable.section.topVulnerableResources.column.vulnerabilities": "Vulnérabilités",
"xpack.csp.cnvmDashboardTable.section.topVulnerableResources.column.vulnerabilityCount": "Vulnérabilités",
"xpack.csp.common.component.multiSelectFilter.searchWord": "Recherche",
"xpack.csp.common.utils.helpers.unknownError": "Erreur inconnue",
"sharedPlatformPackages.csp.common.utils.helpers.unknownError": "Erreur inconnue",
"xpack.csp.compactFormattedNumber.naTitle": "S. O.",
"xpack.csp.complianceScoreBar.tooltipTitle": "{failed} échecs et {passed} réussites de résultats",
"xpack.csp.complianceScoreChart.counterButtonLink.failedFindingsTooltip": "Échec des résultats",
@ -14659,9 +14659,9 @@
"xpack.csp.createPackagePolicy.customAssetsTab.rulesViewLabel": "Afficher les règles CSP",
"xpack.csp.createPackagePolicy.customAssetsTab.vulnerabilityDashboardViewLabel": "Afficher le tableau de bord CNVM",
"xpack.csp.createPackagePolicy.customAssetsTab.vulnerabilityFindingsViewLabel": "Afficher les résultats des vulnérabilités",
"xpack.csp.cspEvaluationBadge.failLabel": "Échec",
"xpack.csp.cspEvaluationBadge.naLabel": "S. O.",
"xpack.csp.cspEvaluationBadge.passLabel": "Réussite",
"securitySolutionPackages.csp.cspEvaluationBadge.failLabel": "Échec",
"securitySolutionPackages.csp.cspEvaluationBadge.naLabel": "S. O.",
"securitySolutionPackages.csp.cspEvaluationBadge.passLabel": "Réussite",
"xpack.csp.cspIntegration.gcpCloudCredentials.cloudFormationSupportedMessage": "La fonctionnalité Lancer Cloud Shell pour obtenir les informations d'identification de façon automatisée nest pas pris en charge dans la version d'intégration actuelle. Veuillez effectuer une mise à niveau vers la dernière version pour activer Lancer Cloud Shell pour les informations d'identification automatisées.",
"xpack.csp.cspmIntegration.awsOption.benchmarkTitle": "CIS AWS",
"xpack.csp.cspmIntegration.awsOption.nameTitle": "AWS",
@ -14745,7 +14745,7 @@
"xpack.csp.findings.distributionBar.totalPassedLabel": "Réussite des résultats",
"xpack.csp.findings.errorCallout.pageSearchErrorTitle": "Une erreur sest produite lors de la récupération des résultats de recherche.",
"xpack.csp.findings.errorCallout.showErrorButtonLabel": "Afficher le message d'erreur",
"xpack.csp.findings.findingsErrorToast.searchFailedTitle": "Échec de la recherche",
"securitySolutionPackages.csp.findings.findingsErrorToast.searchFailedTitle": "Échec de la recherche",
"xpack.csp.findings.findingsFlyout.calloutTitle": "Certains champs ne sont pas fournis par {vendor}",
"xpack.csp.findings.findingsFlyout.flyoutDescriptionList.resourceId": "ID ressource",
"xpack.csp.findings.findingsFlyout.flyoutDescriptionList.resourceName": "Nom de ressource",
@ -14915,11 +14915,10 @@
"xpack.csp.kspmIntegration.integration.shortNameTitle": "KSPM",
"xpack.csp.kspmIntegration.vanillaOption.benchmarkTitle": "CIS Kubernetes",
"xpack.csp.kspmIntegration.vanillaOption.nameTitle": "Autogéré",
"xpack.csp.navigation.dashboardNavItemLabel": "Niveau de sécurité du cloud",
"xpack.csp.navigation.findingsNavItemLabel": "Résultats",
"xpack.csp.navigation.myBenchmarksNavItemLabel": "Benchmarks",
"xpack.csp.navigation.rulesNavItemLabel": "Règles",
"xpack.csp.navigation.vulnerabilityDashboardNavItemLabel": "Gestion des vulnérabilités natives du cloud",
"securitySolutionPackages.csp.navigation.dashboardNavItemLabel": "Niveau de sécurité du cloud",
"securitySolutionPackages.csp.navigation.findingsNavItemLabel": "Résultats",
"securitySolutionPackages.csp.navigation.rulesNavItemLabel": "Règles",
"securitySolutionPackages.csp.navigation.vulnerabilityDashboardNavItemLabel": "Gestion des vulnérabilités natives du cloud",
"xpack.csp.noFindingsStates.indexing.indexingButtonTitle": "Évaluation du niveau en cours",
"xpack.csp.noFindingsStates.indexing.indexingDescription": "En attente de la collecte et de l'indexation des données. Revenez plus tard pour voir vos résultats",
"xpack.csp.noFindingsStates.indexTimeout.indexTimeoutDescription": "La collecte des résultats prend plus de temps que prévu. {docs}.",

View file

@ -14511,7 +14511,7 @@
"xpack.csp.cnvmDashboardTable.section.topVulnerableResources.column.vulnerabilities": "脆弱性",
"xpack.csp.cnvmDashboardTable.section.topVulnerableResources.column.vulnerabilityCount": "脆弱性",
"xpack.csp.common.component.multiSelectFilter.searchWord": "検索",
"xpack.csp.common.utils.helpers.unknownError": "不明なエラー",
"sharedPlatformPackages.csp.common.utils.helpers.unknownError": "不明なエラー",
"xpack.csp.compactFormattedNumber.naTitle": "N/A",
"xpack.csp.complianceScoreBar.tooltipTitle": "{failed}が失敗し、{passed}が調査結果に合格しました",
"xpack.csp.complianceScoreChart.counterButtonLink.failedFindingsTooltip": "失敗した調査結果",
@ -14526,9 +14526,9 @@
"xpack.csp.createPackagePolicy.customAssetsTab.rulesViewLabel": "CSPルールを表示",
"xpack.csp.createPackagePolicy.customAssetsTab.vulnerabilityDashboardViewLabel": "CNVMダッシュボードを表示",
"xpack.csp.createPackagePolicy.customAssetsTab.vulnerabilityFindingsViewLabel": "脆弱性の調査結果を表示",
"xpack.csp.cspEvaluationBadge.failLabel": "失敗",
"xpack.csp.cspEvaluationBadge.naLabel": "N/A",
"xpack.csp.cspEvaluationBadge.passLabel": "合格",
"securitySolutionPackages.csp.cspEvaluationBadge.failLabel": "失敗",
"securitySolutionPackages.csp.cspEvaluationBadge.naLabel": "N/A",
"securitySolutionPackages.csp.cspEvaluationBadge.passLabel": "合格",
"xpack.csp.cspIntegration.gcpCloudCredentials.cloudFormationSupportedMessage": "Launch Cloud ShellLaunch Cloud Formation for Automated Credentialsは、現在の統合バージョンではサポートされていません。Launch Cloud Shell for Automated Credentialsを有効化するには、最新バージョンにアップグレードしてください。",
"xpack.csp.cspmIntegration.awsOption.benchmarkTitle": "CIS AWS",
"xpack.csp.cspmIntegration.awsOption.nameTitle": "AWS",
@ -14611,7 +14611,7 @@
"xpack.csp.findings.distributionBar.totalPassedLabel": "合格した調査結果",
"xpack.csp.findings.errorCallout.pageSearchErrorTitle": "検索結果の取得中にエラーが発生しました",
"xpack.csp.findings.errorCallout.showErrorButtonLabel": "エラーメッセージを表示",
"xpack.csp.findings.findingsErrorToast.searchFailedTitle": "検索失敗",
"securitySolutionPackages.csp.findings.findingsErrorToast.searchFailedTitle": "検索失敗",
"xpack.csp.findings.findingsFlyout.calloutTitle": "一部のフィールドは{vendor}によって提供されていません",
"xpack.csp.findings.findingsFlyout.flyoutDescriptionList.resourceId": "リソースID",
"xpack.csp.findings.findingsFlyout.flyoutDescriptionList.resourceName": "リソース名",
@ -14780,11 +14780,10 @@
"xpack.csp.kspmIntegration.integration.shortNameTitle": "KSPM",
"xpack.csp.kspmIntegration.vanillaOption.benchmarkTitle": "CIS Kubernetes",
"xpack.csp.kspmIntegration.vanillaOption.nameTitle": "自己管理",
"xpack.csp.navigation.dashboardNavItemLabel": "クラウドセキュリティ態勢",
"xpack.csp.navigation.findingsNavItemLabel": "調査結果",
"xpack.csp.navigation.myBenchmarksNavItemLabel": "ベンチマーク",
"xpack.csp.navigation.rulesNavItemLabel": "ルール",
"xpack.csp.navigation.vulnerabilityDashboardNavItemLabel": "Cloud Native Vulnerability Management",
"securitySolutionPackages.csp.navigation.dashboardNavItemLabel": "クラウドセキュリティ態勢",
"securitySolutionPackages.csp.navigation.findingsNavItemLabel": "調査結果",
"securitySolutionPackages.csp.navigation.rulesNavItemLabel": "ルール",
"securitySolutionPackages.csp.navigation.vulnerabilityDashboardNavItemLabel": "Cloud Native Vulnerability Management",
"xpack.csp.noFindingsStates.indexing.indexingButtonTitle": "態勢評価中",
"xpack.csp.noFindingsStates.indexing.indexingDescription": "データの収集とインデックス作成を待機しています。結果を表示するには、しばらくたってから確認してください",
"xpack.csp.noFindingsStates.indexTimeout.indexTimeoutDescription": "調査結果の収集に想定よりも時間がかかっています。{docs}。",

View file

@ -14238,7 +14238,7 @@
"xpack.csp.cnvmDashboardTable.section.topVulnerableResources.column.vulnerabilities": "漏洞",
"xpack.csp.cnvmDashboardTable.section.topVulnerableResources.column.vulnerabilityCount": "漏洞",
"xpack.csp.common.component.multiSelectFilter.searchWord": "搜索",
"xpack.csp.common.utils.helpers.unknownError": "未知错误",
"sharedPlatformPackages.csp.common.utils.helpers.unknownError": "未知错误",
"xpack.csp.compactFormattedNumber.naTitle": "不可用",
"xpack.csp.complianceScoreBar.tooltipTitle": "{failed} 个失败和 {passed} 个通过的结果",
"xpack.csp.complianceScoreChart.counterButtonLink.failedFindingsTooltip": "失败的结果",
@ -14253,9 +14253,9 @@
"xpack.csp.createPackagePolicy.customAssetsTab.rulesViewLabel": "查看 CSP 规则",
"xpack.csp.createPackagePolicy.customAssetsTab.vulnerabilityDashboardViewLabel": "查看 CNVM 仪表板",
"xpack.csp.createPackagePolicy.customAssetsTab.vulnerabilityFindingsViewLabel": "查看漏洞结果",
"xpack.csp.cspEvaluationBadge.failLabel": "失败",
"xpack.csp.cspEvaluationBadge.naLabel": "不可用",
"xpack.csp.cspEvaluationBadge.passLabel": "通过",
"securitySolutionPackages.csp.cspEvaluationBadge.failLabel": "失败",
"securitySolutionPackages.csp.cspEvaluationBadge.naLabel": "不可用",
"securitySolutionPackages.csp.cspEvaluationBadge.passLabel": "通过",
"xpack.csp.cspIntegration.gcpCloudCredentials.cloudFormationSupportedMessage": "当前集成版本不支持为自动化凭据启动 Cloud Shell。请升级到最新版本以启用为自动化凭据启动 Cloud Shell。",
"xpack.csp.cspmIntegration.awsOption.benchmarkTitle": "CIS AWS",
"xpack.csp.cspmIntegration.awsOption.nameTitle": "AWS",
@ -14339,7 +14339,7 @@
"xpack.csp.findings.distributionBar.totalPassedLabel": "通过的结果",
"xpack.csp.findings.errorCallout.pageSearchErrorTitle": "检索搜索结果时遇到问题",
"xpack.csp.findings.errorCallout.showErrorButtonLabel": "显示错误消息",
"xpack.csp.findings.findingsErrorToast.searchFailedTitle": "搜索失败",
"securitySolutionPackages.csp.findings.findingsErrorToast.searchFailedTitle": "搜索失败",
"xpack.csp.findings.findingsFlyout.calloutTitle": "{vendor} 未提供某些字段",
"xpack.csp.findings.findingsFlyout.flyoutDescriptionList.resourceId": "资源 ID",
"xpack.csp.findings.findingsFlyout.flyoutDescriptionList.resourceName": "资源名称",
@ -14509,11 +14509,10 @@
"xpack.csp.kspmIntegration.integration.shortNameTitle": "KSPM",
"xpack.csp.kspmIntegration.vanillaOption.benchmarkTitle": "CIS Kubernetes",
"xpack.csp.kspmIntegration.vanillaOption.nameTitle": "自管型",
"xpack.csp.navigation.dashboardNavItemLabel": "云安全态势",
"xpack.csp.navigation.findingsNavItemLabel": "结果",
"xpack.csp.navigation.myBenchmarksNavItemLabel": "基准",
"xpack.csp.navigation.rulesNavItemLabel": "规则",
"xpack.csp.navigation.vulnerabilityDashboardNavItemLabel": "云原生漏洞管理",
"securitySolutionPackages.csp.navigation.dashboardNavItemLabel": "云安全态势",
"securitySolutionPackages.csp.navigation.findingsNavItemLabel": "结果",
"securitySolutionPackages.csp.navigation.rulesNavItemLabel": "规则",
"securitySolutionPackages.csp.navigation.vulnerabilityDashboardNavItemLabel": "云原生漏洞管理",
"xpack.csp.noFindingsStates.indexing.indexingButtonTitle": "正进行态势评估",
"xpack.csp.noFindingsStates.indexing.indexingDescription": "正在等待要收集和索引的数据。请稍后返回检查以查看结果",
"xpack.csp.noFindingsStates.indexTimeout.indexTimeoutDescription": "收集结果所需的时间长于预期。{docs}。",

View file

@ -10955,718 +10955,6 @@
}
}
},
"cloud_defend": {
"properties": {
"indices": {
"properties": {
"alerts": {
"properties": {
"doc_count": {
"type": "long"
},
"deleted": {
"type": "long"
},
"size_in_bytes": {
"type": "long"
},
"last_doc_timestamp": {
"type": "date"
}
}
},
"file": {
"properties": {
"doc_count": {
"type": "long"
},
"deleted": {
"type": "long"
},
"size_in_bytes": {
"type": "long"
},
"last_doc_timestamp": {
"type": "date"
}
}
},
"process": {
"properties": {
"doc_count": {
"type": "long"
},
"deleted": {
"type": "long"
},
"size_in_bytes": {
"type": "long"
},
"last_doc_timestamp": {
"type": "date"
}
}
},
"latestPackageVersion": {
"type": "keyword"
},
"packageStatus": {
"properties": {
"status": {
"type": "keyword"
},
"installedPackagePolicies": {
"type": "long"
},
"healthyAgents": {
"type": "long"
}
}
}
}
},
"pods_stats": {
"type": "array",
"items": {
"properties": {
"account_id": {
"type": "keyword"
},
"container_image_name": {
"type": "keyword"
},
"container_image_tag": {
"type": "keyword"
},
"pod_name": {
"type": "keyword"
},
"total_doc_count": {
"type": "long"
},
"process_doc_count": {
"type": "long"
},
"file_doc_count": {
"type": "long"
},
"alert_doc_count": {
"type": "long"
}
}
}
},
"accounts_stats": {
"type": "array",
"items": {
"properties": {
"account_id": {
"type": "keyword"
},
"cloud_provider": {
"type": "keyword"
},
"kubernetes_version": {
"type": "keyword"
},
"total_doc_count": {
"type": "long"
},
"file_doc_count": {
"type": "long"
},
"process_doc_count": {
"type": "long"
},
"alert_doc_count": {
"type": "long"
},
"agents_count": {
"type": "short"
},
"nodes_count": {
"type": "short"
},
"pods_count": {
"type": "short"
}
}
}
},
"installation_stats": {
"type": "array",
"items": {
"properties": {
"package_policy_id": {
"type": "keyword"
},
"package_version": {
"type": "keyword"
},
"agent_policy_id": {
"type": "keyword"
},
"created_at": {
"type": "date"
},
"agent_count": {
"type": "long"
},
"policy_yaml": {
"type": "keyword"
},
"selectors": {
"type": "array",
"items": {
"properties": {
"type": {
"type": "keyword"
},
"name": {
"type": "keyword"
},
"operation": {
"type": "array",
"items": {
"type": "keyword"
}
},
"containerImageFullName": {
"type": "array",
"items": {
"type": "keyword"
}
},
"containerImageName": {
"type": "array",
"items": {
"type": "keyword"
}
},
"containerImageTag": {
"type": "array",
"items": {
"type": "keyword"
}
},
"kubernetesClusterId": {
"type": "array",
"items": {
"type": "keyword"
}
},
"kubernetesClusterName": {
"type": "array",
"items": {
"type": "keyword"
}
},
"kubernetesNamespace": {
"type": "array",
"items": {
"type": "keyword"
}
},
"kubernetesPodLabel": {
"type": "array",
"items": {
"type": "keyword"
}
},
"kubernetesPodName": {
"type": "array",
"items": {
"type": "keyword"
}
},
"targetFilePath": {
"type": "array",
"items": {
"type": "keyword"
}
},
"ignoreVolumeFiles": {
"type": "boolean"
},
"ignoreVolumeMounts": {
"type": "boolean"
},
"processExecutable": {
"type": "array",
"items": {
"type": "keyword"
}
},
"processName": {
"type": "array",
"items": {
"type": "keyword"
}
},
"sessionLeaderInteractive": {
"type": "boolean"
}
}
}
},
"responses": {
"type": "array",
"items": {
"properties": {
"type": {
"type": "keyword"
},
"match": {
"type": "array",
"items": {
"type": "keyword"
}
},
"exclude": {
"type": "array",
"items": {
"type": "keyword"
}
},
"actions": {
"type": "array",
"items": {
"type": "keyword"
}
}
}
}
}
}
}
}
}
},
"cloud_security_posture": {
"properties": {
"indices": {
"properties": {
"findings": {
"properties": {
"doc_count": {
"type": "long"
},
"deleted": {
"type": "long"
},
"size_in_bytes": {
"type": "long"
},
"last_doc_timestamp": {
"type": "date"
}
}
},
"latest_findings": {
"properties": {
"doc_count": {
"type": "long"
},
"deleted": {
"type": "long"
},
"size_in_bytes": {
"type": "long"
},
"last_doc_timestamp": {
"type": "date"
}
}
},
"vulnerabilities": {
"properties": {
"doc_count": {
"type": "long"
},
"deleted": {
"type": "long"
},
"size_in_bytes": {
"type": "long"
},
"last_doc_timestamp": {
"type": "date"
}
}
},
"latest_vulnerabilities": {
"properties": {
"doc_count": {
"type": "long"
},
"deleted": {
"type": "long"
},
"size_in_bytes": {
"type": "long"
},
"last_doc_timestamp": {
"type": "date"
}
}
},
"score": {
"properties": {
"doc_count": {
"type": "long"
},
"deleted": {
"type": "long"
},
"size_in_bytes": {
"type": "long"
},
"last_doc_timestamp": {
"type": "date"
}
}
},
"latestPackageVersion": {
"type": "keyword"
},
"cspm": {
"properties": {
"status": {
"type": "keyword"
},
"installedPackagePolicies": {
"type": "long"
},
"healthyAgents": {
"type": "long"
}
}
},
"kspm": {
"properties": {
"status": {
"type": "keyword"
},
"installedPackagePolicies": {
"type": "long"
},
"healthyAgents": {
"type": "long"
}
}
},
"vuln_mgmt": {
"properties": {
"status": {
"type": "keyword"
},
"installedPackagePolicies": {
"type": "long"
},
"healthyAgents": {
"type": "long"
}
}
}
}
},
"resources_stats": {
"type": "array",
"items": {
"properties": {
"account_id": {
"type": "keyword"
},
"resource_type": {
"type": "keyword"
},
"resource_type_doc_count": {
"type": "long"
},
"resource_sub_type": {
"type": "keyword"
},
"resource_sub_type_doc_count": {
"type": "long"
},
"passed_findings_count": {
"type": "long"
},
"failed_findings_count": {
"type": "long"
}
}
}
},
"accounts_stats": {
"type": "array",
"items": {
"properties": {
"account_id": {
"type": "keyword"
},
"posture_score": {
"type": "long"
},
"latest_findings_doc_count": {
"type": "long"
},
"benchmark_id": {
"type": "keyword"
},
"benchmark_name": {
"type": "keyword"
},
"benchmark_version": {
"type": "keyword"
},
"kubernetes_version": {
"type": "keyword"
},
"passed_findings_count": {
"type": "long"
},
"failed_findings_count": {
"type": "long"
},
"agents_count": {
"type": "short"
},
"nodes_count": {
"type": "short"
},
"pods_count": {
"type": "short"
}
}
}
},
"rules_stats": {
"type": "array",
"items": {
"properties": {
"account_id": {
"type": "keyword"
},
"rule_id": {
"type": "keyword"
},
"rule_name": {
"type": "keyword"
},
"rule_section": {
"type": "keyword"
},
"rule_version": {
"type": "keyword"
},
"rule_number": {
"type": "keyword"
},
"posture_type": {
"type": "keyword"
},
"benchmark_id": {
"type": "keyword"
},
"benchmark_name": {
"type": "keyword"
},
"benchmark_version": {
"type": "keyword"
},
"passed_findings_count": {
"type": "long"
},
"failed_findings_count": {
"type": "long"
}
}
}
},
"installation_stats": {
"type": "array",
"items": {
"properties": {
"package_policy_id": {
"type": "keyword"
},
"feature": {
"type": "keyword"
},
"package_version": {
"type": "keyword"
},
"agent_policy_id": {
"type": "keyword"
},
"deployment_mode": {
"type": "keyword"
},
"created_at": {
"type": "date"
},
"agent_count": {
"type": "long"
},
"is_agentless": {
"type": "boolean"
},
"account_type": {
"type": "keyword"
},
"is_setup_automatic": {
"type": "boolean"
},
"setup_access_option": {
"type": "keyword"
}
}
}
},
"alerts_stats": {
"type": "array",
"items": {
"properties": {
"posture_type": {
"type": "keyword"
},
"rules_count": {
"type": "long"
},
"alerts_count": {
"type": "long"
},
"alerts_open_count": {
"type": "long"
},
"alerts_closed_count": {
"type": "long"
},
"alerts_acknowledged_count": {
"type": "long"
}
}
}
},
"cloud_account_stats": {
"type": "array",
"items": {
"properties": {
"account_id": {
"type": "keyword"
},
"cloud_provider": {
"type": "keyword"
},
"product": {
"type": "keyword"
},
"package_policy_id": {
"type": "keyword"
},
"latest_doc_count": {
"type": "long"
},
"latest_doc_updated_timestamp": {
"type": "date"
},
"posture_management_stats": {
"properties": {
"posture_score": {
"type": "long"
},
"benchmark_name": {
"type": "keyword"
},
"benchmark_version": {
"type": "keyword"
},
"passed_findings_count": {
"type": "long"
},
"failed_findings_count": {
"type": "long"
}
}
},
"posture_management_stats_enabled_rules": {
"properties": {
"posture_score": {
"type": "long"
},
"benchmark_name": {
"type": "keyword"
},
"benchmark_version": {
"type": "keyword"
},
"passed_findings_count": {
"type": "long"
},
"failed_findings_count": {
"type": "long"
}
}
},
"kspm_stats": {
"properties": {
"kubernetes_version": {
"type": "keyword"
},
"agents_count": {
"type": "short"
},
"nodes_count": {
"type": "short"
},
"pods_count": {
"type": "short"
}
}
},
"has_muted_rules": {
"type": "boolean"
}
}
}
},
"muted_rules_stats": {
"type": "array",
"items": {
"properties": {
"id": {
"type": "keyword"
},
"name": {
"type": "keyword"
},
"section": {
"type": "keyword"
},
"benchmark_id": {
"type": "keyword"
},
"benchmark_name": {
"type": "keyword"
},
"benchmark_version": {
"type": "keyword"
},
"rule_number": {
"type": "keyword"
},
"posture_type": {
"type": "keyword"
},
"version": {
"type": "keyword"
}
}
}
}
}
},
"connectors": {
"properties": {
"connectors": {

View file

@ -1,3 +1,716 @@
{
"properties": {}
"properties": {
"cloud_defend": {
"properties": {
"indices": {
"properties": {
"alerts": {
"properties": {
"doc_count": {
"type": "long"
},
"deleted": {
"type": "long"
},
"size_in_bytes": {
"type": "long"
},
"last_doc_timestamp": {
"type": "date"
}
}
},
"file": {
"properties": {
"doc_count": {
"type": "long"
},
"deleted": {
"type": "long"
},
"size_in_bytes": {
"type": "long"
},
"last_doc_timestamp": {
"type": "date"
}
}
},
"process": {
"properties": {
"doc_count": {
"type": "long"
},
"deleted": {
"type": "long"
},
"size_in_bytes": {
"type": "long"
},
"last_doc_timestamp": {
"type": "date"
}
}
},
"latestPackageVersion": {
"type": "keyword"
},
"packageStatus": {
"properties": {
"status": {
"type": "keyword"
},
"installedPackagePolicies": {
"type": "long"
},
"healthyAgents": {
"type": "long"
}
}
}
}
},
"pods_stats": {
"type": "array",
"items": {
"properties": {
"account_id": {
"type": "keyword"
},
"container_image_name": {
"type": "keyword"
},
"container_image_tag": {
"type": "keyword"
},
"pod_name": {
"type": "keyword"
},
"total_doc_count": {
"type": "long"
},
"process_doc_count": {
"type": "long"
},
"file_doc_count": {
"type": "long"
},
"alert_doc_count": {
"type": "long"
}
}
}
},
"accounts_stats": {
"type": "array",
"items": {
"properties": {
"account_id": {
"type": "keyword"
},
"cloud_provider": {
"type": "keyword"
},
"kubernetes_version": {
"type": "keyword"
},
"total_doc_count": {
"type": "long"
},
"file_doc_count": {
"type": "long"
},
"process_doc_count": {
"type": "long"
},
"alert_doc_count": {
"type": "long"
},
"agents_count": {
"type": "short"
},
"nodes_count": {
"type": "short"
},
"pods_count": {
"type": "short"
}
}
}
},
"installation_stats": {
"type": "array",
"items": {
"properties": {
"package_policy_id": {
"type": "keyword"
},
"package_version": {
"type": "keyword"
},
"agent_policy_id": {
"type": "keyword"
},
"created_at": {
"type": "date"
},
"agent_count": {
"type": "long"
},
"policy_yaml": {
"type": "keyword"
},
"selectors": {
"type": "array",
"items": {
"properties": {
"type": {
"type": "keyword"
},
"name": {
"type": "keyword"
},
"operation": {
"type": "array",
"items": {
"type": "keyword"
}
},
"containerImageFullName": {
"type": "array",
"items": {
"type": "keyword"
}
},
"containerImageName": {
"type": "array",
"items": {
"type": "keyword"
}
},
"containerImageTag": {
"type": "array",
"items": {
"type": "keyword"
}
},
"kubernetesClusterId": {
"type": "array",
"items": {
"type": "keyword"
}
},
"kubernetesClusterName": {
"type": "array",
"items": {
"type": "keyword"
}
},
"kubernetesNamespace": {
"type": "array",
"items": {
"type": "keyword"
}
},
"kubernetesPodLabel": {
"type": "array",
"items": {
"type": "keyword"
}
},
"kubernetesPodName": {
"type": "array",
"items": {
"type": "keyword"
}
},
"targetFilePath": {
"type": "array",
"items": {
"type": "keyword"
}
},
"ignoreVolumeFiles": {
"type": "boolean"
},
"ignoreVolumeMounts": {
"type": "boolean"
},
"processExecutable": {
"type": "array",
"items": {
"type": "keyword"
}
},
"processName": {
"type": "array",
"items": {
"type": "keyword"
}
},
"sessionLeaderInteractive": {
"type": "boolean"
}
}
}
},
"responses": {
"type": "array",
"items": {
"properties": {
"type": {
"type": "keyword"
},
"match": {
"type": "array",
"items": {
"type": "keyword"
}
},
"exclude": {
"type": "array",
"items": {
"type": "keyword"
}
},
"actions": {
"type": "array",
"items": {
"type": "keyword"
}
}
}
}
}
}
}
}
}
},
"cloud_security_posture": {
"properties": {
"indices": {
"properties": {
"findings": {
"properties": {
"doc_count": {
"type": "long"
},
"deleted": {
"type": "long"
},
"size_in_bytes": {
"type": "long"
},
"last_doc_timestamp": {
"type": "date"
}
}
},
"latest_findings": {
"properties": {
"doc_count": {
"type": "long"
},
"deleted": {
"type": "long"
},
"size_in_bytes": {
"type": "long"
},
"last_doc_timestamp": {
"type": "date"
}
}
},
"vulnerabilities": {
"properties": {
"doc_count": {
"type": "long"
},
"deleted": {
"type": "long"
},
"size_in_bytes": {
"type": "long"
},
"last_doc_timestamp": {
"type": "date"
}
}
},
"latest_vulnerabilities": {
"properties": {
"doc_count": {
"type": "long"
},
"deleted": {
"type": "long"
},
"size_in_bytes": {
"type": "long"
},
"last_doc_timestamp": {
"type": "date"
}
}
},
"score": {
"properties": {
"doc_count": {
"type": "long"
},
"deleted": {
"type": "long"
},
"size_in_bytes": {
"type": "long"
},
"last_doc_timestamp": {
"type": "date"
}
}
},
"latestPackageVersion": {
"type": "keyword"
},
"cspm": {
"properties": {
"status": {
"type": "keyword"
},
"installedPackagePolicies": {
"type": "long"
},
"healthyAgents": {
"type": "long"
}
}
},
"kspm": {
"properties": {
"status": {
"type": "keyword"
},
"installedPackagePolicies": {
"type": "long"
},
"healthyAgents": {
"type": "long"
}
}
},
"vuln_mgmt": {
"properties": {
"status": {
"type": "keyword"
},
"installedPackagePolicies": {
"type": "long"
},
"healthyAgents": {
"type": "long"
}
}
}
}
},
"resources_stats": {
"type": "array",
"items": {
"properties": {
"account_id": {
"type": "keyword"
},
"resource_type": {
"type": "keyword"
},
"resource_type_doc_count": {
"type": "long"
},
"resource_sub_type": {
"type": "keyword"
},
"resource_sub_type_doc_count": {
"type": "long"
},
"passed_findings_count": {
"type": "long"
},
"failed_findings_count": {
"type": "long"
}
}
}
},
"accounts_stats": {
"type": "array",
"items": {
"properties": {
"account_id": {
"type": "keyword"
},
"posture_score": {
"type": "long"
},
"latest_findings_doc_count": {
"type": "long"
},
"benchmark_id": {
"type": "keyword"
},
"benchmark_name": {
"type": "keyword"
},
"benchmark_version": {
"type": "keyword"
},
"kubernetes_version": {
"type": "keyword"
},
"passed_findings_count": {
"type": "long"
},
"failed_findings_count": {
"type": "long"
},
"agents_count": {
"type": "short"
},
"nodes_count": {
"type": "short"
},
"pods_count": {
"type": "short"
}
}
}
},
"rules_stats": {
"type": "array",
"items": {
"properties": {
"account_id": {
"type": "keyword"
},
"rule_id": {
"type": "keyword"
},
"rule_name": {
"type": "keyword"
},
"rule_section": {
"type": "keyword"
},
"rule_version": {
"type": "keyword"
},
"rule_number": {
"type": "keyword"
},
"posture_type": {
"type": "keyword"
},
"benchmark_id": {
"type": "keyword"
},
"benchmark_name": {
"type": "keyword"
},
"benchmark_version": {
"type": "keyword"
},
"passed_findings_count": {
"type": "long"
},
"failed_findings_count": {
"type": "long"
}
}
}
},
"installation_stats": {
"type": "array",
"items": {
"properties": {
"package_policy_id": {
"type": "keyword"
},
"feature": {
"type": "keyword"
},
"package_version": {
"type": "keyword"
},
"agent_policy_id": {
"type": "keyword"
},
"deployment_mode": {
"type": "keyword"
},
"created_at": {
"type": "date"
},
"agent_count": {
"type": "long"
},
"is_agentless": {
"type": "boolean"
},
"account_type": {
"type": "keyword"
},
"is_setup_automatic": {
"type": "boolean"
},
"setup_access_option": {
"type": "keyword"
}
}
}
},
"alerts_stats": {
"type": "array",
"items": {
"properties": {
"posture_type": {
"type": "keyword"
},
"rules_count": {
"type": "long"
},
"alerts_count": {
"type": "long"
},
"alerts_open_count": {
"type": "long"
},
"alerts_closed_count": {
"type": "long"
},
"alerts_acknowledged_count": {
"type": "long"
}
}
}
},
"cloud_account_stats": {
"type": "array",
"items": {
"properties": {
"account_id": {
"type": "keyword"
},
"cloud_provider": {
"type": "keyword"
},
"product": {
"type": "keyword"
},
"package_policy_id": {
"type": "keyword"
},
"latest_doc_count": {
"type": "long"
},
"latest_doc_updated_timestamp": {
"type": "date"
},
"posture_management_stats": {
"properties": {
"posture_score": {
"type": "long"
},
"benchmark_name": {
"type": "keyword"
},
"benchmark_version": {
"type": "keyword"
},
"passed_findings_count": {
"type": "long"
},
"failed_findings_count": {
"type": "long"
}
}
},
"posture_management_stats_enabled_rules": {
"properties": {
"posture_score": {
"type": "long"
},
"benchmark_name": {
"type": "keyword"
},
"benchmark_version": {
"type": "keyword"
},
"passed_findings_count": {
"type": "long"
},
"failed_findings_count": {
"type": "long"
}
}
},
"kspm_stats": {
"properties": {
"kubernetes_version": {
"type": "keyword"
},
"agents_count": {
"type": "short"
},
"nodes_count": {
"type": "short"
},
"pods_count": {
"type": "short"
}
}
},
"has_muted_rules": {
"type": "boolean"
}
}
}
},
"muted_rules_stats": {
"type": "array",
"items": {
"properties": {
"id": {
"type": "keyword"
},
"name": {
"type": "keyword"
},
"section": {
"type": "keyword"
},
"benchmark_id": {
"type": "keyword"
},
"benchmark_name": {
"type": "keyword"
},
"benchmark_version": {
"type": "keyword"
},
"rule_number": {
"type": "keyword"
},
"posture_type": {
"type": "keyword"
},
"version": {
"type": "keyword"
}
}
}
}
}
}
}
}

View file

@ -7,12 +7,14 @@
module.exports = {
preset: '@kbn/test',
roots: ['<rootDir>/x-pack/packages/kbn-cloud-security-posture/graph'],
rootDir: '../../../..',
roots: ['<rootDir>/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph'],
rootDir: '../../../../../..',
transform: {
'^.+\\.(js|tsx?)$':
'<rootDir>/x-pack/packages/kbn-cloud-security-posture/storybook/config/babel_with_emotion.ts',
},
setupFiles: ['jest-canvas-mock'],
setupFilesAfterEnv: ['<rootDir>/x-pack/packages/kbn-cloud-security-posture/graph/setup_tests.ts'],
setupFilesAfterEnv: [
'<rootDir>/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/setup_tests.ts',
],
};

View file

@ -88,11 +88,11 @@ const Template: Story<NodeViewModel> = (args: NodeViewModel) => {
const initialEdges = [
{
id: 'source-' + args.id,
id: `source-${args.id}`,
source: 'source',
target: args.id,
data: {
id: 'source-' + args.id,
id: `source-${args.id}`,
source: 'source',
sourceShape: 'rectangle',
target: args.id,
@ -103,11 +103,11 @@ const Template: Story<NodeViewModel> = (args: NodeViewModel) => {
type: 'default',
},
{
id: args.id + '-target',
id: `${args.id}-target`,
source: args.id,
target: 'target',
data: {
id: args.id + '-target',
id: `${args.id}-target`,
source: args.id,
sourceShape: 'label',
target: 'target',

View file

@ -6,9 +6,8 @@
*/
import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { ThemeProvider } from '@emotion/react';
import { ThemeProvider, css } from '@emotion/react';
import { Story } from '@storybook/react';
import { css } from '@emotion/react';
import { EuiListGroup, EuiHorizontalRule } from '@elastic/eui';
import type { EntityNodeViewModel, NodeProps } from '..';
import { Graph } from '..';
@ -77,6 +76,7 @@ const useExpandButtonPopover = () => {
closePopover();
}, [closePopover]);
// eslint-disable-next-line react/display-name
const PopoverComponent = memo(() => (
<GraphPopover
panelPaddingSize="s"
@ -130,6 +130,7 @@ const useExpandButtonPopover = () => {
const useNodePopover = () => {
const { id, state, actions } = useGraphPopover('node-popover');
// eslint-disable-next-line react/display-name
const PopoverComponent = memo(() => (
<GraphPopover
panelPaddingSize="s"
@ -137,6 +138,7 @@ const useNodePopover = () => {
isOpen={state.isOpen}
anchorElement={state.anchorElement}
closePopover={actions.closePopover}
// eslint-disable-next-line react/jsx-no-literals
>
TODO
</GraphPopover>
@ -160,17 +162,21 @@ const Template: Story = () => {
const popovers = [expandNodePopover, nodePopover];
const isPopoverOpen = popovers.some((popover) => popover.state.isOpen);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const popoverOpenWrapper = (cb: Function, ...args: any[]) => {
[expandNodePopover.actions.closePopover, nodePopover.actions.closePopover].forEach(
(closePopover) => {
closePopover();
}
);
// eslint-disable-next-line prefer-spread
cb.apply(null, args);
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const expandButtonClickHandler = (...args: any[]) =>
popoverOpenWrapper(expandNodePopover.onNodeExpandButtonClick, ...args);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const nodeClickHandler = (...args: any[]) => popoverOpenWrapper(nodePopover.onNodeClick, ...args);
const nodes: EntityNodeViewModel[] = useMemo(

View file

@ -47,25 +47,34 @@ export const GraphNodeExpandPopover: React.FC<GraphNodeExpandPopoverProps> = mem
<EuiListGroup gutterSize="none" bordered={false} flush={true}>
<ExpandPopoverListItem
iconType="users"
label={i18n.translate('xpack.csp.graph.graphNodeExpandPopover.showActionsByEntity', {
defaultMessage: 'Show actions by this entity',
})}
label={i18n.translate(
'securitySolutionPackages.csp.graph.graphNodeExpandPopover.showActionsByEntity',
{
defaultMessage: 'Show actions by this entity',
}
)}
onClick={onShowActionsByEntityClick}
data-test-subj={GRAPH_NODE_POPOVER_SHOW_ACTIONS_BY_ITEM_ID}
/>
<ExpandPopoverListItem
iconType="storage"
label={i18n.translate('xpack.csp.graph.graphNodeExpandPopover.showActionsOnEntity', {
defaultMessage: 'Show actions on this entity',
})}
label={i18n.translate(
'securitySolutionPackages.csp.graph.graphNodeExpandPopover.showActionsOnEntity',
{
defaultMessage: 'Show actions on this entity',
}
)}
onClick={onShowActionsOnEntityClick}
data-test-subj={GRAPH_NODE_POPOVER_SHOW_ACTIONS_ON_ITEM_ID}
/>
<ExpandPopoverListItem
iconType="visTagCloud"
label={i18n.translate('xpack.csp.graph.graphNodeExpandPopover.showRelatedEvents', {
defaultMessage: 'Show related events',
})}
label={i18n.translate(
'securitySolutionPackages.csp.graph.graphNodeExpandPopover.showRelatedEvents',
{
defaultMessage: 'Show related events',
}
)}
onClick={onShowRelatedEntitiesClick}
data-test-subj={GRAPH_NODE_POPOVER_SHOW_RELATED_ITEM_ID}
/>

View file

@ -60,6 +60,8 @@ export const useGraphNodeExpandPopover = ({
// PopoverComponent is a memoized component that renders the GraphNodeExpandPopover
// It handles the display of the popover and the actions that can be performed on the node
// eslint-disable-next-line react/display-name
const PopoverComponent = memo(() => (
<GraphNodeExpandPopover
isOpen={state.isOpen}

View file

@ -73,6 +73,7 @@ describe('GraphLargeStackedEdgeCases story', () => {
// Same label can appear more than once in the graph, so we skip them if already scanned
if (labelElements.has(id!)) {
// eslint-disable-next-line no-continue
continue;
}
labelElements.add(id!);

View file

@ -6,10 +6,9 @@
*/
import React from 'react';
import { ThemeProvider } from '@emotion/react';
import { ThemeProvider, css } from '@emotion/react';
import { Story } from '@storybook/react';
import { Writable } from '@kbn/utility-types';
import { css } from '@emotion/react';
import type {
EdgeViewModel,
LabelNodeViewModel,
@ -515,7 +514,7 @@ GraphLargeStackedEdgeCases.args = {
id: 'a(oktauser)-b(hackeruser)',
source: 'oktauser',
target: 'hackeruser',
label: 'CreateUser' + idx,
label: `CreateUser${idx}`,
color: 'primary',
shape: 'label',
})),
@ -525,7 +524,7 @@ GraphLargeStackedEdgeCases.args = {
id: 'a(siem-windows)-b(user)',
source: 'siem-windows',
target: 'user',
label: 'User login to OKTA' + idx,
label: `User login to OKTA${idx}`,
color: 'danger',
shape: 'label',
})),

View file

@ -60,6 +60,7 @@ export const mockReactFlow = () => {
},
});
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(global.SVGElement as any).prototype.getBBox = () => ({
x: 0,
y: 0,

View file

@ -5,6 +5,8 @@
* 2.0.
*/
/* eslint-disable react/jsx-no-literals */
import React from 'react';
import { ThemeProvider } from '@emotion/react';
import { Story } from '@storybook/react';

View file

@ -24,6 +24,7 @@ import { NodeExpandButton } from './node_expand_button';
const NODE_WIDTH = 99;
const NODE_HEIGHT = 98;
// eslint-disable-next-line react/display-name
export const DiamondNode: React.FC<NodeProps> = memo((props: NodeProps) => {
const { id, color, icon, label, interactive, expandButtonClick, nodeClick } =
props.data as EntityNodeViewModel;
@ -80,7 +81,7 @@ export const DiamondNode: React.FC<NodeProps> = memo((props: NodeProps) => {
style={HandleStyleOverride}
/>
</NodeShapeContainer>
<NodeLabel>{Boolean(label) ? label : id}</NodeLabel>
<NodeLabel>{label ? label : id}</NodeLabel>
</>
);
});

View file

@ -10,6 +10,7 @@ import { Handle, NodeResizeControl, Position } from '@xyflow/react';
import { HandleStyleOverride } from './styles';
import type { NodeProps } from '../types';
// eslint-disable-next-line react/display-name
export const EdgeGroupNode: React.FC<NodeProps> = memo((props: NodeProps) => {
// Handles order horizontally is: in > inside > out > outside
return (

View file

@ -24,6 +24,7 @@ import { NodeExpandButton } from './node_expand_button';
const NODE_WIDTH = 90;
const NODE_HEIGHT = 90;
// eslint-disable-next-line react/display-name
export const EllipseNode: React.FC<NodeProps> = memo((props: NodeProps) => {
const { id, color, icon, label, interactive, expandButtonClick, nodeClick } =
props.data as EntityNodeViewModel;
@ -80,7 +81,7 @@ export const EllipseNode: React.FC<NodeProps> = memo((props: NodeProps) => {
style={HandleStyleOverride}
/>
</NodeShapeContainer>
<NodeLabel>{Boolean(label) ? label : id}</NodeLabel>
<NodeLabel>{label ? label : id}</NodeLabel>
</>
);
});

View file

@ -10,6 +10,7 @@ import awsEc2Icon from '../../assets/icons/aws_ec2.svg';
import awsS3Icon from '../../assets/icons/aws_s3.svg';
import oktaIcon from '../../assets/icons/okta.svg';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const icons: Record<string, any> = {
aws: awsIcon,
aws_ec2: awsEc2Icon,

View file

@ -24,6 +24,7 @@ import { NodeExpandButton } from './node_expand_button';
const NODE_WIDTH = 87;
const NODE_HEIGHT = 96;
// eslint-disable-next-line react/display-name
export const HexagonNode: React.FC<NodeProps> = memo((props: NodeProps) => {
const { id, color, icon, label, interactive, expandButtonClick, nodeClick } =
props.data as EntityNodeViewModel;
@ -80,7 +81,7 @@ export const HexagonNode: React.FC<NodeProps> = memo((props: NodeProps) => {
style={HandleStyleOverride}
/>
</NodeShapeContainer>
<NodeLabel>{Boolean(label) ? label : id}</NodeLabel>
<NodeLabel>{label ? label : id}</NodeLabel>
</>
);
});

View file

@ -10,6 +10,7 @@ import { Handle, Position } from '@xyflow/react';
import { LabelNodeContainer, LabelShape, HandleStyleOverride, LabelShapeOnHover } from './styles';
import type { LabelNodeViewModel, NodeProps } from '../types';
// eslint-disable-next-line react/display-name
export const LabelNode: React.FC<NodeProps> = memo((props: NodeProps) => {
const { id, color, label, interactive } = props.data as LabelNodeViewModel;
@ -17,7 +18,7 @@ export const LabelNode: React.FC<NodeProps> = memo((props: NodeProps) => {
<LabelNodeContainer>
{interactive && <LabelShapeOnHover color={color} />}
<LabelShape color={color} textAlign="center">
{Boolean(label) ? label : id}
{label ? label : id}
</LabelShape>
<Handle
type="target"

View file

@ -29,6 +29,7 @@ const PentagonShapeOnHover = styled(NodeShapeOnHoverSvg)`
const NODE_WIDTH = 91;
const NODE_HEIGHT = 88;
// eslint-disable-next-line react/display-name
export const PentagonNode: React.FC<NodeProps> = memo((props: NodeProps) => {
const { id, color, icon, label, interactive, expandButtonClick, nodeClick } =
props.data as EntityNodeViewModel;
@ -85,7 +86,7 @@ export const PentagonNode: React.FC<NodeProps> = memo((props: NodeProps) => {
style={HandleStyleOverride}
/>
</NodeShapeContainer>
<NodeLabel>{Boolean(label) ? label : id}</NodeLabel>
<NodeLabel>{label ? label : id}</NodeLabel>
</>
);
});

View file

@ -24,6 +24,7 @@ import { NodeExpandButton } from './node_expand_button';
const NODE_WIDTH = 81;
const NODE_HEIGHT = 80;
// eslint-disable-next-line react/display-name
export const RectangleNode: React.FC<NodeProps> = memo((props: NodeProps) => {
const { id, color, icon, label, interactive, expandButtonClick, nodeClick } =
props.data as EntityNodeViewModel;
@ -80,7 +81,7 @@ export const RectangleNode: React.FC<NodeProps> = memo((props: NodeProps) => {
style={HandleStyleOverride}
/>
</NodeShapeContainer>
<NodeLabel>{Boolean(label) ? label : id}</NodeLabel>
<NodeLabel>{label ? label : id}</NodeLabel>
</>
);
});

View file

@ -8,6 +8,7 @@
import React, { memo } from 'react';
import type { HoverShapeProps, ShapeProps } from './types';
// eslint-disable-next-line react/display-name
export const DiamondHoverShape: React.FC<HoverShapeProps> = memo(({ stroke }) => (
<path
opacity="0.5"
@ -17,6 +18,7 @@ export const DiamondHoverShape: React.FC<HoverShapeProps> = memo(({ stroke }) =>
/>
));
// eslint-disable-next-line react/display-name
export const DiamondShape: React.FC<ShapeProps> = memo(({ stroke, fill }) => (
<path
d="M34.1967 3.01041C37.1256 0.0814755 41.8744 0.0814755 44.8033 3.01041L75.4896 33.6967C78.4185 36.6256 78.4185 41.3744 75.4896 44.3033L44.8033 74.9896C41.8744 77.9185 37.1256 77.9185 34.1967 74.9896L3.51041 44.3033C0.581475 41.3744 0.581475 36.6256 3.51041 33.6967L34.1967 3.01041Z"

View file

@ -8,10 +8,12 @@
import React, { memo } from 'react';
import type { HoverShapeProps, ShapeProps } from './types';
// eslint-disable-next-line react/display-name
export const EllipseHoverShape: React.FC<HoverShapeProps> = memo(({ stroke }) => (
<circle opacity="0.5" cx="45" cy="45" r="44.5" stroke={stroke} strokeDasharray="2 2" />
));
// eslint-disable-next-line react/display-name
export const EllipseShape: React.FC<ShapeProps> = memo(({ stroke, fill }) => (
<circle cx="36" cy="36" r="35.5" fill={fill} stroke={stroke} />
));

View file

@ -8,6 +8,7 @@
import React, { memo } from 'react';
import type { HoverShapeProps, ShapeProps } from './types';
// eslint-disable-next-line react/display-name
export const HexagonHoverShape: React.FC<HoverShapeProps> = memo(({ stroke }) => (
<path
opacity="0.5"
@ -17,6 +18,7 @@ export const HexagonHoverShape: React.FC<HoverShapeProps> = memo(({ stroke }) =>
/>
));
// eslint-disable-next-line react/display-name
export const HexagonShape: React.FC<ShapeProps> = memo(({ stroke, fill }) => (
<path
d="M31.75 1.74241C34.0705 0.402668 36.9295 0.402668 39.25 1.74241L65.891 17.1236C68.2115 18.4634 69.641 20.9393 69.641 23.6188V54.3812C69.641 57.0607 68.2115 59.5366 65.891 60.8764L39.25 76.2576C36.9295 77.5973 34.0705 77.5973 31.75 76.2576L5.10898 60.8764C2.78847 59.5366 1.35898 57.0607 1.35898 54.3812V23.6188C1.35898 20.9393 2.78847 18.4634 5.10898 17.1236L31.75 1.74241Z"

View file

@ -8,6 +8,7 @@
import React, { memo } from 'react';
import type { HoverShapeProps, ShapeProps } from './types';
// eslint-disable-next-line react/display-name
export const PentagonHoverShape: React.FC<HoverShapeProps> = memo(({ stroke }) => (
<path
opacity="0.5"
@ -17,6 +18,7 @@ export const PentagonHoverShape: React.FC<HoverShapeProps> = memo(({ stroke }) =
/>
));
// eslint-disable-next-line react/display-name
export const PentagonShape: React.FC<ShapeProps> = memo(({ stroke, fill }) => (
<path
d="M33.0916 2.82091C35.7203 0.911085 39.2797 0.911086 41.9084 2.82092L70.5461 23.6274C73.1747 25.5373 74.2747 28.9225 73.2706 32.0127L62.332 65.6783C61.3279 68.7685 58.4483 70.8607 55.1991 70.8607H19.8009C16.5517 70.8607 13.6721 68.7685 12.668 65.6783L1.72938 32.0127C0.725323 28.9225 1.82526 25.5373 4.45392 23.6274L33.0916 2.82091Z"

View file

@ -8,6 +8,7 @@
import React, { memo } from 'react';
import type { HoverShapeProps, ShapeProps } from './types';
// eslint-disable-next-line react/display-name
export const RectangleHoverShape: React.FC<HoverShapeProps> = memo(({ stroke }) => (
<rect
opacity="0.5"
@ -21,6 +22,7 @@ export const RectangleHoverShape: React.FC<HoverShapeProps> = memo(({ stroke })
/>
));
// eslint-disable-next-line react/display-name
export const RectangleShape: React.FC<ShapeProps> = memo(({ stroke, fill }) => (
<rect x="1" y="0.5" width="63" height="63" rx="7.5" fill={fill} stroke={stroke} />
));

View file

@ -13,8 +13,7 @@ import type {
EdgeDataModel,
NodeShape,
} from '@kbn/cloud-security-posture-common/types/graph/latest';
import type { Node, NodeProps as xyNodeProps } from '@xyflow/react';
import type { Edge, EdgeProps as xyEdgeProps } from '@xyflow/react';
import type { Node, NodeProps as xyNodeProps, Edge, EdgeProps as xyEdgeProps } from '@xyflow/react';
export interface Size {
width: number;

Some files were not shown because too many files have changed in this diff Show more