[8.x] Sustainable Kibana Architecture: Move modules owned by @elastic/security-defend-workflows (#202840) (#204232)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Sustainable Kibana Architecture: Move modules owned by
`@elastic/security-defend-workflows`
(#202840)](https://github.com/elastic/kibana/pull/202840)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2024-12-13T11:08:36Z","message":"Sustainable
Kibana Architecture: Move modules owned by
`@elastic/security-defend-workflows`
(#202840)","sha":"42af4e60a42380a27e10927fa62af15dfd239c57","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","Team:Defend
Workflows","backport:prev-minor"],"number":202840,"url":"https://github.com/elastic/kibana/pull/202840","mergeCommit":{"message":"Sustainable
Kibana Architecture: Move modules owned by
`@elastic/security-defend-workflows`
(#202840)","sha":"42af4e60a42380a27e10927fa62af15dfd239c57"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202840","number":202840,"mergeCommit":{"message":"Sustainable
Kibana Architecture: Move modules owned by
`@elastic/security-defend-workflows`
(#202840)","sha":"42af4e60a42380a27e10927fa62af15dfd239c57"}}]}]
BACKPORT-->
This commit is contained in:
Gerard Soldevila 2024-12-13 20:52:54 +01:00 committed by GitHub
parent 8cdb16672a
commit 5ee2c6a488
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
508 changed files with 94 additions and 92 deletions

View file

@ -350,7 +350,7 @@ const getPipeline = (filename: string, removeSteps = true) => {
if (
((await doAnyChangesMatch([
/^x-pack\/plugins\/osquery/,
/^x-pack\/platform\/plugins\/shared\/osquery/,
/^x-pack\/test\/osquery_cypress/,
/^x-pack\/plugins\/security_solution/,
])) ||

View file

@ -18,7 +18,7 @@ buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" "true
source .buildkite/scripts/pipelines/security_solution_quality_gate/prepare_vault_entries.sh
cd x-pack/plugins/osquery
cd x-pack/platform/plugins/shared/osquery
set +e
export BK_ANALYTICS_API_KEY=$(vault_get security-solution-quality-gate serverless-cypress-defend-workflows)

View file

@ -6,5 +6,5 @@ source .buildkite/scripts/common/util.sh
echo --- Osquery OpenAPI Code Generation
(cd x-pack/plugins/osquery && yarn openapi:generate)
(cd x-pack/platform/plugins/shared/osquery && yarn openapi:generate)
check_for_changed_files "yarn openapi:generate" true

View file

@ -10,7 +10,7 @@ export JOB=kibana-osquery-cypress
echo "--- Osquery Cypress tests"
cd x-pack/plugins/osquery
cd x-pack/platform/plugins/shared/osquery
set +e
yarn cypress:run; status=$?; yarn junit:merge || :; exit $status

View file

@ -12,4 +12,4 @@ buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" 'fals
echo "--- Osquery Cypress tests, burning changed specs (Chrome)"
yarn --cwd x-pack/plugins/osquery cypress:changed-specs-only
yarn --cwd x-pack/platform/plugins/shared/osquery cypress:changed-specs-only

View file

@ -10,7 +10,7 @@ export JOB=kibana-osquery-cypress-serverless
echo "--- Security Osquery Serverless Cypress"
cd x-pack/plugins/osquery
cd x-pack/platform/plugins/shared/osquery
set +e
yarn cypress:serverless:run; status=$?; yarn junit:merge || :; exit $status

View file

@ -31,6 +31,6 @@ echo -e "\n[Security Solution OpenAPI Bundling] Elastic Assistant API\n"
(cd x-pack/packages/kbn-elastic-assistant-common && yarn openapi:bundle)
echo -e "\n[Security Solution OpenAPI Bundling] Osquery API\n"
(cd x-pack/plugins/osquery && yarn openapi:bundle)
(cd x-pack/platform/plugins/shared/osquery && yarn openapi:bundle)
check_for_changed_files "yarn openapi:bundle" true

View file

@ -1786,7 +1786,7 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
],
plugins: ['react', '@typescript-eslint'],
files: ['x-pack/plugins/osquery/**/*.{js,mjs,ts,tsx}'],
files: ['x-pack/platform/plugins/shared/osquery/**/*.{js,mjs,ts,tsx}'],
rules: {
'padding-line-between-statements': [
'error',
@ -1812,7 +1812,7 @@ module.exports = {
},
{
// typescript and javascript for front end react performance
files: ['x-pack/plugins/osquery/public/**/!(*.test).{js,mjs,ts,tsx}'],
files: ['x-pack/platform/plugins/shared/osquery/public/**/!(*.test).{js,mjs,ts,tsx}'],
plugins: ['react', 'react-perf'],
rules: {
'react-perf/jsx-no-new-object-as-prop': 'error',
@ -2010,7 +2010,7 @@ module.exports = {
'src/dev/build/tasks/install_chromium.ts', // is importing "@kbn/screenshotting-plugin" (platform/private)
// @kbn/osquery-plugin could be categorised as Security, but @kbn/infra-plugin (observability) depends on it!
'x-pack/plugins/osquery/**',
'x-pack/platform/plugins/shared/osquery/**',
// For now, we keep the exception to let tests depend on anythying.
// Ideally, we need to classify the solution specific ones to reduce CI times

4
.github/CODEOWNERS vendored
View file

@ -53,7 +53,7 @@ test/plugin_functional/plugins/app_link_test @elastic/kibana-core
x-pack/test/usage_collection/plugins/application_usage_test @elastic/kibana-core
x-pack/plugins/asset_inventory @elastic/kibana-cloud-security-posture
x-pack/test/security_api_integration/plugins/audit_log @elastic/kibana-security
packages/kbn-avc-banner @elastic/security-defend-workflows
src/platform/packages/shared/kbn-avc-banner @elastic/security-defend-workflows
packages/kbn-axe-config @elastic/kibana-qa
packages/kbn-babel-preset @elastic/kibana-operations
packages/kbn-babel-register @elastic/kibana-operations
@ -687,7 +687,7 @@ packages/kbn-openapi-generator @elastic/security-detection-rule-management
packages/kbn-optimizer @elastic/kibana-operations
packages/kbn-optimizer-webpack-helpers @elastic/kibana-operations
src/platform/packages/shared/kbn-osquery-io-ts-types @elastic/security-asset-management
x-pack/plugins/osquery @elastic/security-defend-workflows
x-pack/platform/plugins/shared/osquery @elastic/security-defend-workflows
examples/partial_results_example @elastic/kibana-data-discovery
x-pack/plugins/painless_lab @elastic/kibana-management
packages/kbn-panel-loader @elastic/kibana-presentation

View file

@ -81,7 +81,7 @@ paths-ignore:
- x-pack/plugins/lists/scripts
- x-pack/plugins/lists/server/scripts
- x-pack/plugins/observability_solution/*/scripts
- x-pack/plugins/osquery/scripts
- x-pack/platform/plugins/shared/osquery/scripts
- x-pack/plugins/rule_registry/scripts
- x-pack/plugins/security_solution/scripts
- x-pack/solutions/security/plugins/threat_intelligence/scripts

4
.gitignore vendored
View file

@ -98,8 +98,8 @@ npm-debug.log*
# transpiled cypress config
x-pack/plugins/fleet/cypress.config.d.ts
x-pack/plugins/fleet/cypress.config.js
x-pack/plugins/osquery/cypress.config.d.ts
x-pack/plugins/osquery/cypress.config.js
x-pack/platform/plugins/shared/osquery/cypress.config.d.ts
x-pack/platform/plugins/shared/osquery/cypress.config.js
x-pack/plugins/enterprise_search/cypress.config.d.ts
x-pack/plugins/enterprise_search/cypress.config.js
x-pack/plugins/security_solution/public/management/cypress.config.d.ts

View file

@ -7,7 +7,7 @@
"alertingTypes": "packages/kbn-alerting-types",
"apmOss": "src/plugins/apm_oss",
"autocomplete": "packages/kbn-securitysolution-autocomplete/src",
"avcBanner": "packages/kbn-avc-banner/src",
"avcBanner": "src/platform/packages/shared/kbn-avc-banner/src",
"bfetch": "src/plugins/bfetch",
"bfetchError": "packages/kbn-bfetch-error",
"cases": ["packages/kbn-cases-components"],

View file

@ -771,7 +771,7 @@ Elastic.
|A plugin that contains components and utilities shared by all Observability plugins.
|{kib-repo}blob/{branch}/x-pack/plugins/osquery/README.md[osquery]
|{kib-repo}blob/{branch}/x-pack/platform/plugins/shared/osquery/README.md[osquery]
|This plugin adds extended support to Security Solution Fleet Osquery integration

View file

@ -32,7 +32,7 @@ const { REPO_ROOT } = require('@kbn/repo-info');
`${REPO_ROOT}/packages/kbn-securitysolution-exceptions-common/docs/openapi/ess/*.schema.yaml`,
`${REPO_ROOT}/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/ess/*.schema.yaml`,
`${REPO_ROOT}/x-pack/packages/kbn-elastic-assistant-common/docs/openapi/ess/*.schema.yaml`,
`${REPO_ROOT}/x-pack/plugins/osquery/docs/openapi/ess/*.schema.yaml`,
`${REPO_ROOT}/x-pack/platform/plugins/shared/osquery/docs/openapi/ess/*.schema.yaml`,
],
outputFilePath: `${REPO_ROOT}/oas_docs/output/kibana.yaml`,
options: {

View file

@ -192,7 +192,7 @@
"@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/audit-log-plugin": "link:x-pack/test/security_api_integration/plugins/audit_log",
"@kbn/avc-banner": "link:packages/kbn-avc-banner",
"@kbn/avc-banner": "link:src/platform/packages/shared/kbn-avc-banner",
"@kbn/banners-plugin": "link:x-pack/plugins/banners",
"@kbn/bfetch-error": "link:packages/kbn-bfetch-error",
"@kbn/bfetch-explorer-plugin": "link:examples/bfetch_explorer",
@ -713,7 +713,7 @@
"@kbn/open-telemetry-instrumented-plugin": "link:test/common/plugins/otel_metrics",
"@kbn/openapi-common": "link:packages/kbn-openapi-common",
"@kbn/osquery-io-ts-types": "link:src/platform/packages/shared/kbn-osquery-io-ts-types",
"@kbn/osquery-plugin": "link:x-pack/plugins/osquery",
"@kbn/osquery-plugin": "link:x-pack/platform/plugins/shared/osquery",
"@kbn/paertial-results-example-plugin": "link:examples/partial_results_example",
"@kbn/painless-lab-plugin": "link:x-pack/plugins/painless_lab",
"@kbn/panel-loader": "link:packages/kbn-panel-loader",

View file

@ -9,6 +9,6 @@
module.exports = {
preset: '@kbn/test',
rootDir: '../..',
roots: ['<rootDir>/packages/kbn-avc-banner'],
rootDir: '../../../../..',
roots: ['<rootDir>/src/platform/packages/shared/kbn-avc-banner'],
};

View file

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Before After
Before After

View file

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

View file

@ -100,8 +100,8 @@
"@kbn/asset-inventory-plugin/*": ["x-pack/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": ["packages/kbn-avc-banner"],
"@kbn/avc-banner/*": ["packages/kbn-avc-banner/*"],
"@kbn/avc-banner": ["src/platform/packages/shared/kbn-avc-banner"],
"@kbn/avc-banner/*": ["src/platform/packages/shared/kbn-avc-banner/*"],
"@kbn/axe-config": ["packages/kbn-axe-config"],
"@kbn/axe-config/*": ["packages/kbn-axe-config/*"],
"@kbn/babel-preset": ["packages/kbn-babel-preset"],
@ -1368,8 +1368,8 @@
"@kbn/optimizer-webpack-helpers/*": ["packages/kbn-optimizer-webpack-helpers/*"],
"@kbn/osquery-io-ts-types": ["src/platform/packages/shared/kbn-osquery-io-ts-types"],
"@kbn/osquery-io-ts-types/*": ["src/platform/packages/shared/kbn-osquery-io-ts-types/*"],
"@kbn/osquery-plugin": ["x-pack/plugins/osquery"],
"@kbn/osquery-plugin/*": ["x-pack/plugins/osquery/*"],
"@kbn/osquery-plugin": ["x-pack/platform/plugins/shared/osquery"],
"@kbn/osquery-plugin/*": ["x-pack/platform/plugins/shared/osquery/*"],
"@kbn/paertial-results-example-plugin": ["examples/partial_results_example"],
"@kbn/paertial-results-example-plugin/*": ["examples/partial_results_example/*"],
"@kbn/painless-lab-plugin": ["x-pack/plugins/painless_lab"],

View file

@ -113,7 +113,7 @@
"packages/observability/logs_overview/src/components"
],
"xpack.osquery": [
"plugins/osquery"
"platform/plugins/shared/osquery"
],
"xpack.painlessLab": "plugins/painless_lab",
"xpack.profiling": [

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