mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Cloud Security] Refactoring cloud-security-posture packages' folder structure (#196008)
## Summary Organized the team's packages under the same root folder ``` "@kbn/cloud-security-posture": "link:x-pack/packages/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", ``` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
96966c5113
commit
96eff23f50
74 changed files with 46 additions and 32 deletions
4
.github/CODEOWNERS
vendored
4
.github/CODEOWNERS
vendored
|
@ -90,8 +90,8 @@ x-pack/plugins/cloud_integrations/cloud_full_story @elastic/kibana-core
|
|||
x-pack/test/cloud_integration/plugins/saml_provider @elastic/kibana-core
|
||||
x-pack/plugins/cloud_integrations/cloud_links @elastic/kibana-core
|
||||
x-pack/plugins/cloud @elastic/kibana-core
|
||||
x-pack/packages/kbn-cloud-security-posture @elastic/kibana-cloud-security-posture
|
||||
x-pack/packages/kbn-cloud-security-posture-common @elastic/kibana-cloud-security-posture
|
||||
x-pack/packages/kbn-cloud-security-posture/public @elastic/kibana-cloud-security-posture
|
||||
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/plugins/cloud_security_posture @elastic/kibana-cloud-security-posture
|
||||
packages/shared-ux/code_editor/impl @elastic/appex-sharedux
|
||||
|
|
|
@ -218,8 +218,8 @@
|
|||
"@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",
|
||||
"@kbn/cloud-security-posture-common": "link:x-pack/packages/kbn-cloud-security-posture-common",
|
||||
"@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/code-editor": "link:packages/shared-ux/code_editor/impl",
|
||||
|
|
|
@ -174,10 +174,10 @@
|
|||
"@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"],
|
||||
"@kbn/cloud-security-posture/*": ["x-pack/packages/kbn-cloud-security-posture/*"],
|
||||
"@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": ["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"],
|
||||
|
|
|
@ -4,6 +4,20 @@ This package includes
|
|||
- Hooks that's used on Flyout component that's used in Alerts page on Security Solution Plugins as well as components on CSP plugin
|
||||
- Utilities and types thats used for the Hooks above as well as in CSP plugins
|
||||
|
||||
The code is under the `public` folder.
|
||||
|
||||
# @kbn/cloud-security-posture-common
|
||||
|
||||
Common types of `cloud-security-posture` plugin.
|
||||
|
||||
The code is under the `common` folder.
|
||||
|
||||
# @kbn/cloud-security-posture-graph
|
||||
|
||||
Reusable graph component to present entities' relationships and exploration.
|
||||
|
||||
The code is under the `graph` folder.
|
||||
|
||||
## Storybook
|
||||
|
||||
General look of the component can be checked visually running the following storybook:
|
||||
|
@ -11,6 +25,6 @@ General look of the component can be checked visually running the following stor
|
|||
|
||||
Note that all the interactions are mocked.
|
||||
|
||||
## Maintainers
|
||||
# Maintainers
|
||||
|
||||
Maintained by the Cloud Security Team
|
|
@ -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/packages/kbn-cloud-security-posture/common'],
|
||||
};
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "target/types",
|
||||
"types": [
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
## Motivation
|
||||
|
||||
The idea behind this package is to have a reusable graph component, embedding the features available to alerts flyout in
|
||||
The idea behind this package is to have a reusable graph component, embedding the features available to the alert's flyout in
|
||||
security solution plugin.
|
||||
|
||||
## How to use this
|
||||
|
||||
Standalone examples will follow. In the meantime checkout storybook to view the graphs progress.
|
||||
Standalone examples will follow. In the meantime check out storybook to view the graph's progress.
|
||||
|
||||
## The most important public api members
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
],
|
||||
"kbn_references": [
|
||||
"@kbn/cloud-security-posture-common",
|
||||
"@kbn/utility-types"
|
||||
"@kbn/utility-types",
|
||||
"@kbn/storybook"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
export * from './type';
|
||||
export * from './constants/component_constants';
|
||||
export * from './constants/navigation';
|
||||
export * from './src/types';
|
||||
export * from './src/constants/component_constants';
|
||||
export * from './src/constants/navigation';
|
||||
export type { NavFilter } from './src/hooks/use_navigate_findings';
|
||||
export { showErrorToast } from './src/utils/show_error_toast';
|
||||
export { encodeQuery, decodeQuery } from './src/utils/query_utils';
|
|
@ -7,6 +7,6 @@
|
|||
|
||||
module.exports = {
|
||||
preset: '@kbn/test',
|
||||
rootDir: '../../..',
|
||||
roots: ['<rootDir>/x-pack/packages/kbn-cloud-security-posture'],
|
||||
rootDir: '../../../..',
|
||||
roots: ['<rootDir>/x-pack/packages/kbn-cloud-security-posture/public'],
|
||||
};
|
|
@ -9,7 +9,7 @@ import React from 'react';
|
|||
import { EuiBadge, type EuiBadgeProps } from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { css } from '@emotion/react';
|
||||
import { statusColors } from '../../constants/component_constants';
|
||||
import { statusColors } from '../constants/component_constants';
|
||||
|
||||
interface Props {
|
||||
type?: 'passed' | 'failed';
|
|
@ -15,7 +15,7 @@ import type {
|
|||
LatestFindingsRequest,
|
||||
LatestFindingsResponse,
|
||||
UseCspOptions,
|
||||
} from '../../type';
|
||||
} from '../types';
|
||||
|
||||
import { useGetCspBenchmarkRulesStatesApi } from './use_get_benchmark_rules_state_api';
|
||||
import {
|
|
@ -14,7 +14,7 @@ import type {
|
|||
LatestFindingsRequest,
|
||||
LatestFindingsResponse,
|
||||
UseCspOptions,
|
||||
} from '../../type';
|
||||
} from '../types';
|
||||
import { useGetCspBenchmarkRulesStatesApi } from './use_get_benchmark_rules_state_api';
|
||||
import {
|
||||
buildMisconfigurationsFindingsQuery,
|
|
@ -14,7 +14,7 @@ import {
|
|||
} from '@kbn/cloud-security-posture-common';
|
||||
import type { CoreStart } from '@kbn/core/public';
|
||||
import { useKibana } from '@kbn/kibana-react-plugin/public';
|
||||
import { findingsNavigation } from '../../constants/navigation';
|
||||
import { findingsNavigation } from '../constants/navigation';
|
||||
import { useDataView } from './use_data_view';
|
||||
import { CspClientPluginStartDeps } from '../..';
|
||||
import { encodeQuery } from '../utils/query_utils';
|
|
@ -16,7 +16,7 @@ import {
|
|||
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import type { CspVulnerabilityFinding } from '@kbn/cloud-security-posture-common/schema/vulnerabilities/latest';
|
||||
import type { CoreStart } from '@kbn/core/public';
|
||||
import type { CspClientPluginStartDeps, UseCspOptions } from '../../type';
|
||||
import type { CspClientPluginStartDeps, UseCspOptions } from '../types';
|
||||
import { showErrorToast } from '../..';
|
||||
import { getVulnerabilitiesAggregationCount, getVulnerabilitiesQuery } from '../utils/hooks_utils';
|
||||
|
|
@ -16,7 +16,7 @@ import {
|
|||
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import type { CspVulnerabilityFinding } from '@kbn/cloud-security-posture-common/schema/vulnerabilities/latest';
|
||||
import type { CoreStart } from '@kbn/core/public';
|
||||
import type { CspClientPluginStartDeps, UseCspOptions } from '../../type';
|
||||
import type { CspClientPluginStartDeps, UseCspOptions } from '../types';
|
||||
import { showErrorToast } from '../..';
|
||||
import { getVulnerabilitiesAggregationCount, getVulnerabilitiesQuery } from '../utils/hooks_utils';
|
||||
|
|
@ -13,7 +13,7 @@ import {
|
|||
} from '@kbn/cloud-security-posture-common';
|
||||
import type { CspBenchmarkRulesStates } from '@kbn/cloud-security-posture-common/schema/rules/latest';
|
||||
import { buildMutedRulesFilter } from '@kbn/cloud-security-posture-common';
|
||||
import type { UseCspOptions } from '../../type';
|
||||
import type { UseCspOptions } from '../types';
|
||||
|
||||
const MISCONFIGURATIONS_SOURCE_FIELDS = ['result.*', 'rule.*', 'resource.*'];
|
||||
interface AggregationBucket {
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "target/types",
|
||||
},
|
||||
|
@ -35,6 +35,5 @@
|
|||
"@kbn/ui-theme",
|
||||
"@kbn/i18n-react",
|
||||
"@kbn/rison",
|
||||
"@kbn/storybook",
|
||||
]
|
||||
}
|
|
@ -10,7 +10,7 @@ import {
|
|||
KSPM_POLICY_TEMPLATE,
|
||||
CLOUD_SECURITY_POSTURE_BASE_PATH,
|
||||
} from '@kbn/cloud-security-posture-common';
|
||||
import { NAV_ITEMS_NAMES } from '@kbn/cloud-security-posture/constants/navigation';
|
||||
import { NAV_ITEMS_NAMES } from '@kbn/cloud-security-posture/src/constants/navigation';
|
||||
import { CNVM_POLICY_TEMPLATE } from '../../../common/constants';
|
||||
import type { CspBenchmarksPage, CspPage, CspPageNavigationItem } from './types';
|
||||
|
||||
|
|
|
@ -3639,7 +3639,7 @@
|
|||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@kbn/cloud-security-posture-common@link:x-pack/packages/kbn-cloud-security-posture-common":
|
||||
"@kbn/cloud-security-posture-common@link:x-pack/packages/kbn-cloud-security-posture/common":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
|
@ -3651,7 +3651,7 @@
|
|||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@kbn/cloud-security-posture@link:x-pack/packages/kbn-cloud-security-posture":
|
||||
"@kbn/cloud-security-posture@link:x-pack/packages/kbn-cloud-security-posture/public":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue