diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts index 897c957d72219..6f4681d0d8d87 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts @@ -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/, ])) || diff --git a/.buildkite/scripts/pipelines/security_solution_quality_gate/edr_workflows/mki_security_solution_defend_workflows_osquery.sh b/.buildkite/scripts/pipelines/security_solution_quality_gate/edr_workflows/mki_security_solution_defend_workflows_osquery.sh index 5dd9ef114b48d..c68f04ce20ab3 100755 --- a/.buildkite/scripts/pipelines/security_solution_quality_gate/edr_workflows/mki_security_solution_defend_workflows_osquery.sh +++ b/.buildkite/scripts/pipelines/security_solution_quality_gate/edr_workflows/mki_security_solution_defend_workflows_osquery.sh @@ -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) diff --git a/.buildkite/scripts/steps/code_generation/osquery_codegen.sh b/.buildkite/scripts/steps/code_generation/osquery_codegen.sh index 7c04f4aecd442..8efbb96d0d623 100755 --- a/.buildkite/scripts/steps/code_generation/osquery_codegen.sh +++ b/.buildkite/scripts/steps/code_generation/osquery_codegen.sh @@ -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 diff --git a/.buildkite/scripts/steps/functional/osquery_cypress.sh b/.buildkite/scripts/steps/functional/osquery_cypress.sh index 0ae47edd8c8e7..dd49619148189 100755 --- a/.buildkite/scripts/steps/functional/osquery_cypress.sh +++ b/.buildkite/scripts/steps/functional/osquery_cypress.sh @@ -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 diff --git a/.buildkite/scripts/steps/functional/osquery_cypress_burn.sh b/.buildkite/scripts/steps/functional/osquery_cypress_burn.sh index bebd391d95254..ea6cf46b3d01d 100755 --- a/.buildkite/scripts/steps/functional/osquery_cypress_burn.sh +++ b/.buildkite/scripts/steps/functional/osquery_cypress_burn.sh @@ -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 diff --git a/.buildkite/scripts/steps/functional/security_serverless_osquery.sh b/.buildkite/scripts/steps/functional/security_serverless_osquery.sh index 9844222e7f869..3621f26850e7f 100755 --- a/.buildkite/scripts/steps/functional/security_serverless_osquery.sh +++ b/.buildkite/scripts/steps/functional/security_serverless_osquery.sh @@ -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 diff --git a/.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh b/.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh index 2c23d9850afa4..6122152edb555 100755 --- a/.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh +++ b/.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh @@ -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 diff --git a/.eslintrc.js b/.eslintrc.js index 5d7087d72e21f..32334c589bb3e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a4cf12be818ac..e134e4671a880 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -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 diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml index 73c969cd4b2bf..ae230d43249dc 100644 --- a/.github/codeql/codeql-config.yml +++ b/.github/codeql/codeql-config.yml @@ -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 diff --git a/.gitignore b/.gitignore index 34ba130ee2981..282afeb1b086f 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/.i18nrc.json b/.i18nrc.json index 4a907bfea3746..d6c1ffb7ab2dd 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -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"], diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 8c4acd6bbd224..4d2deac209172 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -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 diff --git a/oas_docs/scripts/merge_ess_oas.js b/oas_docs/scripts/merge_ess_oas.js index aae719dc54990..e65f4ef4db58e 100644 --- a/oas_docs/scripts/merge_ess_oas.js +++ b/oas_docs/scripts/merge_ess_oas.js @@ -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: { diff --git a/package.json b/package.json index 9ed8dd98594af..f343851f28c41 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/kbn-avc-banner/README.md b/src/platform/packages/shared/kbn-avc-banner/README.md similarity index 100% rename from packages/kbn-avc-banner/README.md rename to src/platform/packages/shared/kbn-avc-banner/README.md diff --git a/packages/kbn-avc-banner/index.ts b/src/platform/packages/shared/kbn-avc-banner/index.ts similarity index 100% rename from packages/kbn-avc-banner/index.ts rename to src/platform/packages/shared/kbn-avc-banner/index.ts diff --git a/packages/kbn-avc-banner/jest.config.js b/src/platform/packages/shared/kbn-avc-banner/jest.config.js similarity index 84% rename from packages/kbn-avc-banner/jest.config.js rename to src/platform/packages/shared/kbn-avc-banner/jest.config.js index e45e51dd79c86..09256a9d88b91 100644 --- a/packages/kbn-avc-banner/jest.config.js +++ b/src/platform/packages/shared/kbn-avc-banner/jest.config.js @@ -9,6 +9,6 @@ module.exports = { preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-avc-banner'], + rootDir: '../../../../..', + roots: ['/src/platform/packages/shared/kbn-avc-banner'], }; diff --git a/packages/kbn-avc-banner/kibana.jsonc b/src/platform/packages/shared/kbn-avc-banner/kibana.jsonc similarity index 100% rename from packages/kbn-avc-banner/kibana.jsonc rename to src/platform/packages/shared/kbn-avc-banner/kibana.jsonc diff --git a/packages/kbn-avc-banner/package.json b/src/platform/packages/shared/kbn-avc-banner/package.json similarity index 100% rename from packages/kbn-avc-banner/package.json rename to src/platform/packages/shared/kbn-avc-banner/package.json diff --git a/packages/kbn-avc-banner/src/avc_banner_background.svg b/src/platform/packages/shared/kbn-avc-banner/src/avc_banner_background.svg similarity index 100% rename from packages/kbn-avc-banner/src/avc_banner_background.svg rename to src/platform/packages/shared/kbn-avc-banner/src/avc_banner_background.svg diff --git a/packages/kbn-avc-banner/src/custom.d.ts b/src/platform/packages/shared/kbn-avc-banner/src/custom.d.ts similarity index 100% rename from packages/kbn-avc-banner/src/custom.d.ts rename to src/platform/packages/shared/kbn-avc-banner/src/custom.d.ts diff --git a/packages/kbn-avc-banner/src/index.tsx b/src/platform/packages/shared/kbn-avc-banner/src/index.tsx similarity index 100% rename from packages/kbn-avc-banner/src/index.tsx rename to src/platform/packages/shared/kbn-avc-banner/src/index.tsx diff --git a/packages/kbn-avc-banner/tsconfig.json b/src/platform/packages/shared/kbn-avc-banner/tsconfig.json similarity index 86% rename from packages/kbn-avc-banner/tsconfig.json rename to src/platform/packages/shared/kbn-avc-banner/tsconfig.json index b75e84d57cf72..1f9876c64502f 100644 --- a/packages/kbn-avc-banner/tsconfig.json +++ b/src/platform/packages/shared/kbn-avc-banner/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/tsconfig.base.json b/tsconfig.base.json index 66bfd2a1bda0c..8ceede9bcc00a 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -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"], diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index 2001521759747..a10ebf92e7281 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -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": [ diff --git a/x-pack/plugins/osquery/.nycrc b/x-pack/platform/plugins/shared/osquery/.nycrc similarity index 100% rename from x-pack/plugins/osquery/.nycrc rename to x-pack/platform/plugins/shared/osquery/.nycrc diff --git a/x-pack/plugins/osquery/README.md b/x-pack/platform/plugins/shared/osquery/README.md similarity index 100% rename from x-pack/plugins/osquery/README.md rename to x-pack/platform/plugins/shared/osquery/README.md diff --git a/x-pack/plugins/osquery/common/api/asset/assets.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/asset/assets.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/asset/assets.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/asset/assets.gen.ts diff --git a/x-pack/plugins/osquery/common/api/asset/assets.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/asset/assets.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/asset/assets.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/asset/assets.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/asset/assets_status.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/asset/assets_status.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/asset/assets_status.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/asset/assets_status.gen.ts diff --git a/x-pack/plugins/osquery/common/api/asset/assets_status.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/asset/assets_status.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/asset/assets_status.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/asset/assets_status.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/asset/get_assets_status_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/asset/get_assets_status_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/asset/get_assets_status_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/asset/get_assets_status_route.ts diff --git a/x-pack/plugins/osquery/common/api/asset/update_assets_status_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/asset/update_assets_status_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/asset/update_assets_status_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/asset/update_assets_status_route.ts diff --git a/x-pack/plugins/osquery/common/api/fleet_wrapper/fleet_wrapper.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/fleet_wrapper/fleet_wrapper.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/fleet_wrapper/fleet_wrapper.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/fleet_wrapper/fleet_wrapper.gen.ts diff --git a/x-pack/plugins/osquery/common/api/fleet_wrapper/fleet_wrapper.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/fleet_wrapper/fleet_wrapper.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/fleet_wrapper/fleet_wrapper.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/fleet_wrapper/fleet_wrapper.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/fleet_wrapper/get_agent_policy_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/fleet_wrapper/get_agent_policy_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/fleet_wrapper/get_agent_policy_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/fleet_wrapper/get_agent_policy_route.ts diff --git a/x-pack/plugins/osquery/common/api/fleet_wrapper/get_agent_status.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/fleet_wrapper/get_agent_status.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/fleet_wrapper/get_agent_status.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/fleet_wrapper/get_agent_status.gen.ts diff --git a/x-pack/plugins/osquery/common/api/fleet_wrapper/get_agent_status.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/fleet_wrapper/get_agent_status.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/fleet_wrapper/get_agent_status.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/fleet_wrapper/get_agent_status.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/fleet_wrapper/get_agent_status_for_agent_policy_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/fleet_wrapper/get_agent_status_for_agent_policy_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/fleet_wrapper/get_agent_status_for_agent_policy_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/fleet_wrapper/get_agent_status_for_agent_policy_route.ts diff --git a/x-pack/plugins/osquery/common/api/fleet_wrapper/get_agents_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/fleet_wrapper/get_agents_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/fleet_wrapper/get_agents_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/fleet_wrapper/get_agents_route.ts diff --git a/x-pack/plugins/osquery/common/api/fleet_wrapper/get_package_policies_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/fleet_wrapper/get_package_policies_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/fleet_wrapper/get_package_policies_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/fleet_wrapper/get_package_policies_route.ts diff --git a/x-pack/plugins/osquery/common/api/index.ts b/x-pack/platform/plugins/shared/osquery/common/api/index.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/index.ts rename to x-pack/platform/plugins/shared/osquery/common/api/index.ts diff --git a/x-pack/plugins/osquery/common/api/live_query/create_live_query.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/live_query/create_live_query.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/live_query/create_live_query.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/live_query/create_live_query.gen.ts diff --git a/x-pack/plugins/osquery/common/api/live_query/create_live_query.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/live_query/create_live_query.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/live_query/create_live_query.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/live_query/create_live_query.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/live_query/create_live_query_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/live_query/create_live_query_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/live_query/create_live_query_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/live_query/create_live_query_route.ts diff --git a/x-pack/plugins/osquery/common/api/live_query/find_live_query.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/live_query/find_live_query.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/live_query/find_live_query.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/live_query/find_live_query.gen.ts diff --git a/x-pack/plugins/osquery/common/api/live_query/find_live_query.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/live_query/find_live_query.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/live_query/find_live_query.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/live_query/find_live_query.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/live_query/find_live_query_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/live_query/find_live_query_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/live_query/find_live_query_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/live_query/find_live_query_route.ts diff --git a/x-pack/plugins/osquery/common/api/live_query/get_live_query_details_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/live_query/get_live_query_details_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/live_query/get_live_query_details_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/live_query/get_live_query_details_route.ts diff --git a/x-pack/plugins/osquery/common/api/live_query/get_live_query_results.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/live_query/get_live_query_results.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/live_query/get_live_query_results.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/live_query/get_live_query_results.gen.ts diff --git a/x-pack/plugins/osquery/common/api/live_query/get_live_query_results.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/live_query/get_live_query_results.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/live_query/get_live_query_results.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/live_query/get_live_query_results.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/live_query/get_live_query_results_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/live_query/get_live_query_results_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/live_query/get_live_query_results_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/live_query/get_live_query_results_route.ts diff --git a/x-pack/plugins/osquery/common/api/live_query/live_queries.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/live_query/live_queries.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/live_query/live_queries.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/live_query/live_queries.gen.ts diff --git a/x-pack/plugins/osquery/common/api/live_query/live_queries.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/live_query/live_queries.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/live_query/live_queries.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/live_query/live_queries.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/model/default_uuid.test.ts b/x-pack/platform/plugins/shared/osquery/common/api/model/default_uuid.test.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/model/default_uuid.test.ts rename to x-pack/platform/plugins/shared/osquery/common/api/model/default_uuid.test.ts diff --git a/x-pack/plugins/osquery/common/api/model/default_uuid.ts b/x-pack/platform/plugins/shared/osquery/common/api/model/default_uuid.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/model/default_uuid.ts rename to x-pack/platform/plugins/shared/osquery/common/api/model/default_uuid.ts diff --git a/x-pack/plugins/osquery/common/api/model/non_empty_string.test.ts b/x-pack/platform/plugins/shared/osquery/common/api/model/non_empty_string.test.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/model/non_empty_string.test.ts rename to x-pack/platform/plugins/shared/osquery/common/api/model/non_empty_string.test.ts diff --git a/x-pack/plugins/osquery/common/api/model/non_empty_string.ts b/x-pack/platform/plugins/shared/osquery/common/api/model/non_empty_string.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/model/non_empty_string.ts rename to x-pack/platform/plugins/shared/osquery/common/api/model/non_empty_string.ts diff --git a/x-pack/plugins/osquery/common/api/model/schema/common_attributes.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/model/schema/common_attributes.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/model/schema/common_attributes.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/model/schema/common_attributes.gen.ts diff --git a/x-pack/plugins/osquery/common/api/model/schema/common_attributes.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/model/schema/common_attributes.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/model/schema/common_attributes.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/model/schema/common_attributes.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/packs/create_pack.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/packs/create_pack.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/packs/create_pack.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/packs/create_pack.gen.ts diff --git a/x-pack/plugins/osquery/common/api/packs/create_pack.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/packs/create_pack.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/packs/create_pack.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/packs/create_pack.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/packs/create_pack_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/packs/create_pack_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/packs/create_pack_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/packs/create_pack_route.ts diff --git a/x-pack/plugins/osquery/common/api/packs/delete_packs_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/packs/delete_packs_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/packs/delete_packs_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/packs/delete_packs_route.ts diff --git a/x-pack/plugins/osquery/common/api/packs/find_packs.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/packs/find_packs.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/packs/find_packs.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/packs/find_packs.gen.ts diff --git a/x-pack/plugins/osquery/common/api/packs/find_packs.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/packs/find_packs.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/packs/find_packs.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/packs/find_packs.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/packs/find_packs_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/packs/find_packs_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/packs/find_packs_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/packs/find_packs_route.ts diff --git a/x-pack/plugins/osquery/common/api/packs/packs.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/packs/packs.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/packs/packs.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/packs/packs.gen.ts diff --git a/x-pack/plugins/osquery/common/api/packs/packs.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/packs/packs.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/packs/packs.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/packs/packs.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/packs/read_packs_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/packs/read_packs_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/packs/read_packs_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/packs/read_packs_route.ts diff --git a/x-pack/plugins/osquery/common/api/packs/update_packs.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/packs/update_packs.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/packs/update_packs.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/packs/update_packs.gen.ts diff --git a/x-pack/plugins/osquery/common/api/packs/update_packs.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/packs/update_packs.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/packs/update_packs.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/packs/update_packs.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/packs/update_packs_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/packs/update_packs_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/packs/update_packs_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/packs/update_packs_route.ts diff --git a/x-pack/plugins/osquery/common/api/saved_query/create_saved_query.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/saved_query/create_saved_query.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/saved_query/create_saved_query.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/saved_query/create_saved_query.gen.ts diff --git a/x-pack/plugins/osquery/common/api/saved_query/create_saved_query.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/saved_query/create_saved_query.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/saved_query/create_saved_query.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/saved_query/create_saved_query.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/saved_query/create_saved_query_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/saved_query/create_saved_query_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/saved_query/create_saved_query_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/saved_query/create_saved_query_route.ts diff --git a/x-pack/plugins/osquery/common/api/saved_query/delete_saved_query_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/saved_query/delete_saved_query_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/saved_query/delete_saved_query_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/saved_query/delete_saved_query_route.ts diff --git a/x-pack/plugins/osquery/common/api/saved_query/find_saved_query.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/saved_query/find_saved_query.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/saved_query/find_saved_query.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/saved_query/find_saved_query.gen.ts diff --git a/x-pack/plugins/osquery/common/api/saved_query/find_saved_query.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/saved_query/find_saved_query.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/saved_query/find_saved_query.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/saved_query/find_saved_query.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/saved_query/find_saved_query_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/saved_query/find_saved_query_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/saved_query/find_saved_query_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/saved_query/find_saved_query_route.ts diff --git a/x-pack/plugins/osquery/common/api/saved_query/read_saved_query_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/saved_query/read_saved_query_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/saved_query/read_saved_query_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/saved_query/read_saved_query_route.ts diff --git a/x-pack/plugins/osquery/common/api/saved_query/saved_query.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/saved_query/saved_query.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/saved_query/saved_query.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/saved_query/saved_query.gen.ts diff --git a/x-pack/plugins/osquery/common/api/saved_query/saved_query.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/saved_query/saved_query.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/saved_query/saved_query.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/saved_query/saved_query.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/saved_query/update_saved_query.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/saved_query/update_saved_query.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/saved_query/update_saved_query.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/saved_query/update_saved_query.gen.ts diff --git a/x-pack/plugins/osquery/common/api/saved_query/update_saved_query.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/saved_query/update_saved_query.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/saved_query/update_saved_query.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/saved_query/update_saved_query.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/saved_query/update_saved_query_route.ts b/x-pack/platform/plugins/shared/osquery/common/api/saved_query/update_saved_query_route.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/saved_query/update_saved_query_route.ts rename to x-pack/platform/plugins/shared/osquery/common/api/saved_query/update_saved_query_route.ts diff --git a/x-pack/plugins/osquery/common/api/status/privileges_check.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/status/privileges_check.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/status/privileges_check.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/status/privileges_check.gen.ts diff --git a/x-pack/plugins/osquery/common/api/status/privileges_check.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/status/privileges_check.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/status/privileges_check.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/status/privileges_check.schema.yaml diff --git a/x-pack/plugins/osquery/common/api/status/status.gen.ts b/x-pack/platform/plugins/shared/osquery/common/api/status/status.gen.ts similarity index 100% rename from x-pack/plugins/osquery/common/api/status/status.gen.ts rename to x-pack/platform/plugins/shared/osquery/common/api/status/status.gen.ts diff --git a/x-pack/plugins/osquery/common/api/status/status.schema.yaml b/x-pack/platform/plugins/shared/osquery/common/api/status/status.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/common/api/status/status.schema.yaml rename to x-pack/platform/plugins/shared/osquery/common/api/status/status.schema.yaml diff --git a/x-pack/plugins/osquery/common/config.ts b/x-pack/platform/plugins/shared/osquery/common/config.ts similarity index 100% rename from x-pack/plugins/osquery/common/config.ts rename to x-pack/platform/plugins/shared/osquery/common/config.ts diff --git a/x-pack/plugins/osquery/common/constants.ts b/x-pack/platform/plugins/shared/osquery/common/constants.ts similarity index 100% rename from x-pack/plugins/osquery/common/constants.ts rename to x-pack/platform/plugins/shared/osquery/common/constants.ts diff --git a/x-pack/plugins/osquery/common/index.ts b/x-pack/platform/plugins/shared/osquery/common/index.ts similarity index 100% rename from x-pack/plugins/osquery/common/index.ts rename to x-pack/platform/plugins/shared/osquery/common/index.ts diff --git a/x-pack/plugins/osquery/common/search_strategy/common/index.ts b/x-pack/platform/plugins/shared/osquery/common/search_strategy/common/index.ts similarity index 100% rename from x-pack/plugins/osquery/common/search_strategy/common/index.ts rename to x-pack/platform/plugins/shared/osquery/common/search_strategy/common/index.ts diff --git a/x-pack/plugins/osquery/common/search_strategy/index.ts b/x-pack/platform/plugins/shared/osquery/common/search_strategy/index.ts similarity index 100% rename from x-pack/plugins/osquery/common/search_strategy/index.ts rename to x-pack/platform/plugins/shared/osquery/common/search_strategy/index.ts diff --git a/x-pack/plugins/osquery/common/search_strategy/osquery/actions/index.ts b/x-pack/platform/plugins/shared/osquery/common/search_strategy/osquery/actions/index.ts similarity index 100% rename from x-pack/plugins/osquery/common/search_strategy/osquery/actions/index.ts rename to x-pack/platform/plugins/shared/osquery/common/search_strategy/osquery/actions/index.ts diff --git a/x-pack/plugins/osquery/common/search_strategy/osquery/agents/index.ts b/x-pack/platform/plugins/shared/osquery/common/search_strategy/osquery/agents/index.ts similarity index 100% rename from x-pack/plugins/osquery/common/search_strategy/osquery/agents/index.ts rename to x-pack/platform/plugins/shared/osquery/common/search_strategy/osquery/agents/index.ts diff --git a/x-pack/plugins/osquery/common/search_strategy/osquery/index.ts b/x-pack/platform/plugins/shared/osquery/common/search_strategy/osquery/index.ts similarity index 100% rename from x-pack/plugins/osquery/common/search_strategy/osquery/index.ts rename to x-pack/platform/plugins/shared/osquery/common/search_strategy/osquery/index.ts diff --git a/x-pack/plugins/osquery/common/search_strategy/osquery/results/index.ts b/x-pack/platform/plugins/shared/osquery/common/search_strategy/osquery/results/index.ts similarity index 100% rename from x-pack/plugins/osquery/common/search_strategy/osquery/results/index.ts rename to x-pack/platform/plugins/shared/osquery/common/search_strategy/osquery/results/index.ts diff --git a/x-pack/plugins/osquery/common/shared_imports.ts b/x-pack/platform/plugins/shared/osquery/common/shared_imports.ts similarity index 100% rename from x-pack/plugins/osquery/common/shared_imports.ts rename to x-pack/platform/plugins/shared/osquery/common/shared_imports.ts diff --git a/x-pack/plugins/osquery/common/translations/errors.ts b/x-pack/platform/plugins/shared/osquery/common/translations/errors.ts similarity index 100% rename from x-pack/plugins/osquery/common/translations/errors.ts rename to x-pack/platform/plugins/shared/osquery/common/translations/errors.ts diff --git a/x-pack/plugins/osquery/common/typed_json.ts b/x-pack/platform/plugins/shared/osquery/common/typed_json.ts similarity index 100% rename from x-pack/plugins/osquery/common/typed_json.ts rename to x-pack/platform/plugins/shared/osquery/common/typed_json.ts diff --git a/x-pack/plugins/osquery/common/types.ts b/x-pack/platform/plugins/shared/osquery/common/types.ts similarity index 100% rename from x-pack/plugins/osquery/common/types.ts rename to x-pack/platform/plugins/shared/osquery/common/types.ts diff --git a/x-pack/plugins/osquery/common/types/osquery_action.ts b/x-pack/platform/plugins/shared/osquery/common/types/osquery_action.ts similarity index 100% rename from x-pack/plugins/osquery/common/types/osquery_action.ts rename to x-pack/platform/plugins/shared/osquery/common/types/osquery_action.ts diff --git a/x-pack/plugins/osquery/common/utility_types.ts b/x-pack/platform/plugins/shared/osquery/common/utility_types.ts similarity index 100% rename from x-pack/plugins/osquery/common/utility_types.ts rename to x-pack/platform/plugins/shared/osquery/common/utility_types.ts diff --git a/x-pack/plugins/osquery/common/utils/aggregations.ts b/x-pack/platform/plugins/shared/osquery/common/utils/aggregations.ts similarity index 100% rename from x-pack/plugins/osquery/common/utils/aggregations.ts rename to x-pack/platform/plugins/shared/osquery/common/utils/aggregations.ts diff --git a/x-pack/plugins/osquery/common/utils/build_query/filters.ts b/x-pack/platform/plugins/shared/osquery/common/utils/build_query/filters.ts similarity index 100% rename from x-pack/plugins/osquery/common/utils/build_query/filters.ts rename to x-pack/platform/plugins/shared/osquery/common/utils/build_query/filters.ts diff --git a/x-pack/plugins/osquery/common/utils/build_query/index.ts b/x-pack/platform/plugins/shared/osquery/common/utils/build_query/index.ts similarity index 100% rename from x-pack/plugins/osquery/common/utils/build_query/index.ts rename to x-pack/platform/plugins/shared/osquery/common/utils/build_query/index.ts diff --git a/x-pack/plugins/osquery/common/utils/build_query/remove_multilines.ts b/x-pack/platform/plugins/shared/osquery/common/utils/build_query/remove_multilines.ts similarity index 100% rename from x-pack/plugins/osquery/common/utils/build_query/remove_multilines.ts rename to x-pack/platform/plugins/shared/osquery/common/utils/build_query/remove_multilines.ts diff --git a/x-pack/plugins/osquery/common/utils/converters.ts b/x-pack/platform/plugins/shared/osquery/common/utils/converters.ts similarity index 100% rename from x-pack/plugins/osquery/common/utils/converters.ts rename to x-pack/platform/plugins/shared/osquery/common/utils/converters.ts diff --git a/x-pack/plugins/osquery/common/utils/replace_params_query.test.ts b/x-pack/platform/plugins/shared/osquery/common/utils/replace_params_query.test.ts similarity index 100% rename from x-pack/plugins/osquery/common/utils/replace_params_query.test.ts rename to x-pack/platform/plugins/shared/osquery/common/utils/replace_params_query.test.ts diff --git a/x-pack/plugins/osquery/common/utils/replace_params_query.ts b/x-pack/platform/plugins/shared/osquery/common/utils/replace_params_query.ts similarity index 100% rename from x-pack/plugins/osquery/common/utils/replace_params_query.ts rename to x-pack/platform/plugins/shared/osquery/common/utils/replace_params_query.ts diff --git a/x-pack/plugins/osquery/cypress/.gitignore b/x-pack/platform/plugins/shared/osquery/cypress/.gitignore similarity index 100% rename from x-pack/plugins/osquery/cypress/.gitignore rename to x-pack/platform/plugins/shared/osquery/cypress/.gitignore diff --git a/x-pack/plugins/osquery/cypress/README.md b/x-pack/platform/plugins/shared/osquery/cypress/README.md similarity index 88% rename from x-pack/plugins/osquery/cypress/README.md rename to x-pack/platform/plugins/shared/osquery/cypress/README.md index 6d72c6aa82b9d..fb8c3c609108b 100644 --- a/x-pack/plugins/osquery/cypress/README.md +++ b/x-pack/platform/plugins/shared/osquery/cypress/README.md @@ -36,7 +36,7 @@ yarn kbn bootstrap node scripts/build_kibana_platform_plugins # launch the cypress test runner -cd x-pack/plugins/osquery +cd x-pack/platform/plugins/shared/osquery yarn cypress:run-as-ci ``` #### FTR + Interactive @@ -51,7 +51,7 @@ yarn kbn bootstrap node scripts/build_kibana_platform_plugins # launch the cypress test runner -cd x-pack/plugins/osquery +cd x-pack/platform/plugins/shared/osquery yarn cypress:open-as-ci ``` @@ -98,16 +98,16 @@ We use es_archiver to manage the data that our Cypress tests need. 1. Set up a clean instance of kibana and elasticsearch (if this is not possible, try to clean/minimize the data that you are going to archive). 2. With the kibana and elasticsearch instance up and running, create the data that you need for your test. -3. When you are sure that you have all the data you need run the following command from: `x-pack/plugins/osquery` +3. When you are sure that you have all the data you need run the following command from: `x-pack/platform/plugins/shared/osquery` ```sh -node ../../../scripts/es_archiver save --dir ../../test/osquery_cypress/es_archives --config ../../../test/functional/config.base.js --es-url http://:@: +node ../../../../../scripts/es_archiver save --dir ../../test/osquery_cypress/es_archives --config ../../../test/functional/config.base.js --es-url http://:@: ``` Example: ```sh -node ../../../scripts/es_archiver save custom_rules ".kibana",".siem-signal*" --dir ../../test/osquery_cypress/es_archives --config ../../../test/functional/config.base.js --es-url http://elastic:changeme@localhost:9220 +node ../../../../../scripts/es_archiver save custom_rules ".kibana",".siem-signal*" --dir ../../test/osquery_cypress/es_archives --config ../../../test/functional/config.base.js --es-url http://elastic:changeme@localhost:9220 ``` Note that the command will create the folder if it does not exist. diff --git a/x-pack/plugins/osquery/cypress/cypress.config.ts b/x-pack/platform/plugins/shared/osquery/cypress/cypress.config.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/cypress.config.ts rename to x-pack/platform/plugins/shared/osquery/cypress/cypress.config.ts diff --git a/x-pack/plugins/osquery/cypress/cypress_base.config.ts b/x-pack/platform/plugins/shared/osquery/cypress/cypress_base.config.ts similarity index 86% rename from x-pack/plugins/osquery/cypress/cypress_base.config.ts rename to x-pack/platform/plugins/shared/osquery/cypress/cypress_base.config.ts index d37ebf246576e..8d5674566573b 100644 --- a/x-pack/plugins/osquery/cypress/cypress_base.config.ts +++ b/x-pack/platform/plugins/shared/osquery/cypress/cypress_base.config.ts @@ -25,18 +25,18 @@ export const getCypressBaseConfig = ( ): Cypress.ConfigOptions => merge( { - reporter: '../../../node_modules/cypress-multi-reporters', + reporter: '../../../../../node_modules/cypress-multi-reporters', reporterOptions: { - configFile: './cypress/reporter_config.json', + configFile: './reporter_config.json', }, defaultCommandTimeout: 60000, execTimeout: 120000, pageLoadTimeout: 12000, - screenshotsFolder: '../../../target/kibana-osquery/cypress/screenshots', + screenshotsFolder: '../../../../../target/kibana-osquery/cypress/screenshots', trashAssetsBeforeRuns: false, video: true, - videosFolder: '../../../target/kibana-osquery/cypress/videos', + videosFolder: '../../../../../target/kibana-osquery/cypress/videos', retries: { runMode: 1, @@ -53,7 +53,7 @@ export const getCypressBaseConfig = ( }, e2e: { - specPattern: './cypress/e2e/**/*.cy.ts', + specPattern: './e2e/**/*.cy.ts', experimentalRunAllSpecs: true, experimentalMemoryManagement: true, numTestsKeptInMemory: 3, diff --git a/x-pack/plugins/osquery/cypress/e2e/all/add_integration.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/add_integration.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/add_integration.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/add_integration.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/alerts_automated_action_results.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/alerts_automated_action_results.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/alerts_automated_action_results.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/alerts_automated_action_results.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/alerts_cases.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/alerts_cases.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/alerts_cases.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/alerts_cases.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/alerts_linked_apps.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/alerts_linked_apps.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/alerts_linked_apps.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/alerts_linked_apps.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/alerts_multiple_agents.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/alerts_multiple_agents.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/alerts_multiple_agents.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/alerts_multiple_agents.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/alerts_response_actions_form.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/alerts_response_actions_form.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/alerts_response_actions_form.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/alerts_response_actions_form.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/cases.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/cases.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/cases.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/cases.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/custom_space.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/custom_space.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/custom_space.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/custom_space.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/ecs_mappings.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/ecs_mappings.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/ecs_mappings.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/ecs_mappings.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/edit_saved_queries.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/edit_saved_queries.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/edit_saved_queries.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/edit_saved_queries.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/live_query.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/live_query.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/live_query.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/live_query.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/live_query_packs.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/live_query_packs.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/live_query_packs.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/live_query_packs.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/live_query_run.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/live_query_run.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/live_query_run.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/live_query_run.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/metrics.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/metrics.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/metrics.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/metrics.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/packs_create_edit.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/packs_create_edit.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/packs_create_edit.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/packs_create_edit.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/packs_integration.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/packs_integration.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/packs_integration.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/packs_integration.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/saved_queries.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/saved_queries.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/saved_queries.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/saved_queries.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/all/timelines.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/all/timelines.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/all/timelines.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/all/timelines.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/api/live_query_results.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/api/live_query_results.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/api/live_query_results.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/api/live_query_results.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/api/packs.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/api/packs.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/api/packs.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/api/packs.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/roles/alert_test.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/roles/alert_test.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/roles/alert_test.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/roles/alert_test.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/roles/reader.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/roles/reader.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/roles/reader.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/roles/reader.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/roles/t1_and_t2_analyst.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/roles/t1_and_t2_analyst.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/roles/t1_and_t2_analyst.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/roles/t1_and_t2_analyst.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/tiers/endpoint_complete.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/tiers/endpoint_complete.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/tiers/endpoint_complete.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/tiers/endpoint_complete.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/tiers/endpoint_essentials.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/tiers/endpoint_essentials.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/tiers/endpoint_essentials.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/tiers/endpoint_essentials.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/tiers/security_complete.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/tiers/security_complete.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/tiers/security_complete.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/tiers/security_complete.cy.ts diff --git a/x-pack/plugins/osquery/cypress/e2e/tiers/security_essentials.cy.ts b/x-pack/platform/plugins/shared/osquery/cypress/e2e/tiers/security_essentials.cy.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/e2e/tiers/security_essentials.cy.ts rename to x-pack/platform/plugins/shared/osquery/cypress/e2e/tiers/security_essentials.cy.ts diff --git a/x-pack/plugins/osquery/cypress/plugins/index.ts b/x-pack/platform/plugins/shared/osquery/cypress/plugins/index.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/plugins/index.ts rename to x-pack/platform/plugins/shared/osquery/cypress/plugins/index.ts diff --git a/x-pack/platform/plugins/shared/osquery/cypress/reporter_config.json b/x-pack/platform/plugins/shared/osquery/cypress/reporter_config.json new file mode 100644 index 0000000000000..048881736ca5e --- /dev/null +++ b/x-pack/platform/plugins/shared/osquery/cypress/reporter_config.json @@ -0,0 +1,10 @@ +{ + "reporterEnabled": "mochawesome, mocha-junit-reporter", + "reporterOptions": { + "html": false, + "json": true, + "mochaFile": "../../../../../target/kibana-osquery/cypress/results/TEST-osquery-cypress-[hash].xml", + "overwrite": false, + "reportDir": "../../../../../target/kibana-osquery/cypress/results" + } +} diff --git a/x-pack/plugins/osquery/cypress/screens/fleet.ts b/x-pack/platform/plugins/shared/osquery/cypress/screens/fleet.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/screens/fleet.ts rename to x-pack/platform/plugins/shared/osquery/cypress/screens/fleet.ts diff --git a/x-pack/plugins/osquery/cypress/screens/integrations.ts b/x-pack/platform/plugins/shared/osquery/cypress/screens/integrations.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/screens/integrations.ts rename to x-pack/platform/plugins/shared/osquery/cypress/screens/integrations.ts diff --git a/x-pack/plugins/osquery/cypress/screens/live_query.ts b/x-pack/platform/plugins/shared/osquery/cypress/screens/live_query.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/screens/live_query.ts rename to x-pack/platform/plugins/shared/osquery/cypress/screens/live_query.ts diff --git a/x-pack/plugins/osquery/cypress/screens/navigation.ts b/x-pack/platform/plugins/shared/osquery/cypress/screens/navigation.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/screens/navigation.ts rename to x-pack/platform/plugins/shared/osquery/cypress/screens/navigation.ts diff --git a/x-pack/plugins/osquery/cypress/screens/osquery.ts b/x-pack/platform/plugins/shared/osquery/cypress/screens/osquery.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/screens/osquery.ts rename to x-pack/platform/plugins/shared/osquery/cypress/screens/osquery.ts diff --git a/x-pack/plugins/osquery/cypress/screens/packs.ts b/x-pack/platform/plugins/shared/osquery/cypress/screens/packs.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/screens/packs.ts rename to x-pack/platform/plugins/shared/osquery/cypress/screens/packs.ts diff --git a/x-pack/plugins/osquery/cypress/serverless_cypress.config.ts b/x-pack/platform/plugins/shared/osquery/cypress/serverless_cypress.config.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/serverless_cypress.config.ts rename to x-pack/platform/plugins/shared/osquery/cypress/serverless_cypress.config.ts diff --git a/x-pack/plugins/osquery/cypress/serverless_cypress_qa.config.ts b/x-pack/platform/plugins/shared/osquery/cypress/serverless_cypress_qa.config.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/serverless_cypress_qa.config.ts rename to x-pack/platform/plugins/shared/osquery/cypress/serverless_cypress_qa.config.ts diff --git a/x-pack/plugins/osquery/cypress/support/e2e.ts b/x-pack/platform/plugins/shared/osquery/cypress/support/e2e.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/support/e2e.ts rename to x-pack/platform/plugins/shared/osquery/cypress/support/e2e.ts diff --git a/x-pack/plugins/osquery/cypress/support/filter_videos.ts b/x-pack/platform/plugins/shared/osquery/cypress/support/filter_videos.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/support/filter_videos.ts rename to x-pack/platform/plugins/shared/osquery/cypress/support/filter_videos.ts diff --git a/x-pack/plugins/osquery/cypress/support/project_controller_osquery_roles.yml b/x-pack/platform/plugins/shared/osquery/cypress/support/project_controller_osquery_roles.yml similarity index 100% rename from x-pack/plugins/osquery/cypress/support/project_controller_osquery_roles.yml rename to x-pack/platform/plugins/shared/osquery/cypress/support/project_controller_osquery_roles.yml diff --git a/x-pack/plugins/osquery/cypress/support/roles.ts b/x-pack/platform/plugins/shared/osquery/cypress/support/roles.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/support/roles.ts rename to x-pack/platform/plugins/shared/osquery/cypress/support/roles.ts diff --git a/x-pack/plugins/osquery/cypress/support/setup_data_loader_tasks.ts b/x-pack/platform/plugins/shared/osquery/cypress/support/setup_data_loader_tasks.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/support/setup_data_loader_tasks.ts rename to x-pack/platform/plugins/shared/osquery/cypress/support/setup_data_loader_tasks.ts diff --git a/x-pack/plugins/osquery/cypress/tasks/api_fixtures.ts b/x-pack/platform/plugins/shared/osquery/cypress/tasks/api_fixtures.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/tasks/api_fixtures.ts rename to x-pack/platform/plugins/shared/osquery/cypress/tasks/api_fixtures.ts diff --git a/x-pack/plugins/osquery/cypress/tasks/archiver.ts b/x-pack/platform/plugins/shared/osquery/cypress/tasks/archiver.ts similarity index 73% rename from x-pack/plugins/osquery/cypress/tasks/archiver.ts rename to x-pack/platform/plugins/shared/osquery/cypress/tasks/archiver.ts index 8f2c179a3abdd..2fb9381993084 100644 --- a/x-pack/plugins/osquery/cypress/tasks/archiver.ts +++ b/x-pack/platform/plugins/shared/osquery/cypress/tasks/archiver.ts @@ -22,7 +22,7 @@ export const runKbnArchiverScript = ( hostname: HOSTNAME, configport: PORT, } = Cypress.env(); - const script = `node ../../../scripts/kbn_archiver.js --space ${space} --kibana-url http://${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}@${HOSTNAME}:${PORT} ${method} ./cypress/fixtures/saved_objects/${fileName}.ndjson`; + const script = `node ../../../../../scripts/kbn_archiver.js --space ${space} --kibana-url http://${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}@${HOSTNAME}:${PORT} ${method} ./cypress/fixtures/saved_objects/${fileName}.ndjson`; cy.exec(script, { env: { NODE_TLS_REJECT_UNAUTHORIZED: 1 } }); }; diff --git a/x-pack/plugins/osquery/cypress/tasks/common.ts b/x-pack/platform/plugins/shared/osquery/cypress/tasks/common.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/tasks/common.ts rename to x-pack/platform/plugins/shared/osquery/cypress/tasks/common.ts diff --git a/x-pack/plugins/osquery/cypress/tasks/integrations.ts b/x-pack/platform/plugins/shared/osquery/cypress/tasks/integrations.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/tasks/integrations.ts rename to x-pack/platform/plugins/shared/osquery/cypress/tasks/integrations.ts diff --git a/x-pack/plugins/osquery/cypress/tasks/inventory.ts b/x-pack/platform/plugins/shared/osquery/cypress/tasks/inventory.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/tasks/inventory.ts rename to x-pack/platform/plugins/shared/osquery/cypress/tasks/inventory.ts diff --git a/x-pack/plugins/osquery/cypress/tasks/live_query.ts b/x-pack/platform/plugins/shared/osquery/cypress/tasks/live_query.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/tasks/live_query.ts rename to x-pack/platform/plugins/shared/osquery/cypress/tasks/live_query.ts diff --git a/x-pack/plugins/osquery/cypress/tasks/login.ts b/x-pack/platform/plugins/shared/osquery/cypress/tasks/login.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/tasks/login.ts rename to x-pack/platform/plugins/shared/osquery/cypress/tasks/login.ts diff --git a/x-pack/plugins/osquery/cypress/tasks/navigation.ts b/x-pack/platform/plugins/shared/osquery/cypress/tasks/navigation.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/tasks/navigation.ts rename to x-pack/platform/plugins/shared/osquery/cypress/tasks/navigation.ts diff --git a/x-pack/plugins/osquery/cypress/tasks/packs.ts b/x-pack/platform/plugins/shared/osquery/cypress/tasks/packs.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/tasks/packs.ts rename to x-pack/platform/plugins/shared/osquery/cypress/tasks/packs.ts diff --git a/x-pack/plugins/osquery/cypress/tasks/response_actions.ts b/x-pack/platform/plugins/shared/osquery/cypress/tasks/response_actions.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/tasks/response_actions.ts rename to x-pack/platform/plugins/shared/osquery/cypress/tasks/response_actions.ts diff --git a/x-pack/plugins/osquery/cypress/tasks/serverless.ts b/x-pack/platform/plugins/shared/osquery/cypress/tasks/serverless.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/tasks/serverless.ts rename to x-pack/platform/plugins/shared/osquery/cypress/tasks/serverless.ts diff --git a/x-pack/plugins/osquery/cypress/tasks/wait_until.ts b/x-pack/platform/plugins/shared/osquery/cypress/tasks/wait_until.ts similarity index 100% rename from x-pack/plugins/osquery/cypress/tasks/wait_until.ts rename to x-pack/platform/plugins/shared/osquery/cypress/tasks/wait_until.ts diff --git a/x-pack/plugins/osquery/cypress/tsconfig.json b/x-pack/platform/plugins/shared/osquery/cypress/tsconfig.json similarity index 77% rename from x-pack/plugins/osquery/cypress/tsconfig.json rename to x-pack/platform/plugins/shared/osquery/cypress/tsconfig.json index eedf7db6e8528..8a106ed78c34d 100644 --- a/x-pack/plugins/osquery/cypress/tsconfig.json +++ b/x-pack/platform/plugins/shared/osquery/cypress/tsconfig.json @@ -1,15 +1,15 @@ { - "extends": "../../../../tsconfig.base.json", + "extends": "../../../../../../tsconfig.base.json", "include": [ "**/*", "./cypress.config.ts", "./serverless_cypress.config.ts", "./serverless_cypress_qa.config.ts", - "../../../test_serverless/shared/lib", + "../../../../../test_serverless/shared/lib", ], "exclude": [ "target/**/*", - "../../../test_serverless/shared/lib/security/default_http_headers.ts" + "../../../../../test_serverless/shared/lib/security/default_http_headers.ts" ], "compilerOptions": { "outDir": "target/types", @@ -22,7 +22,7 @@ "kbn_references": [ "@kbn/test-suites-serverless", { - "path": "../../../test/security_solution_cypress/cypress/tsconfig.json" + "path": "../../../../../test/security_solution_cypress/cypress/tsconfig.json" }, "@kbn/cypress-config", // cypress projects that are nested inside of other ts project use code diff --git a/x-pack/plugins/osquery/docs/openapi/ess/osquery_api_2023_10_31.bundled.schema.yaml b/x-pack/platform/plugins/shared/osquery/docs/openapi/ess/osquery_api_2023_10_31.bundled.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/docs/openapi/ess/osquery_api_2023_10_31.bundled.schema.yaml rename to x-pack/platform/plugins/shared/osquery/docs/openapi/ess/osquery_api_2023_10_31.bundled.schema.yaml diff --git a/x-pack/plugins/osquery/docs/openapi/serverless/osquery_api_2023_10_31.bundled.schema.yaml b/x-pack/platform/plugins/shared/osquery/docs/openapi/serverless/osquery_api_2023_10_31.bundled.schema.yaml similarity index 100% rename from x-pack/plugins/osquery/docs/openapi/serverless/osquery_api_2023_10_31.bundled.schema.yaml rename to x-pack/platform/plugins/shared/osquery/docs/openapi/serverless/osquery_api_2023_10_31.bundled.schema.yaml diff --git a/x-pack/plugins/osquery/jest.config.js b/x-pack/platform/plugins/shared/osquery/jest.config.js similarity index 61% rename from x-pack/plugins/osquery/jest.config.js rename to x-pack/platform/plugins/shared/osquery/jest.config.js index ea070e615b6bc..5214584e4ee5c 100644 --- a/x-pack/plugins/osquery/jest.config.js +++ b/x-pack/platform/plugins/shared/osquery/jest.config.js @@ -7,9 +7,11 @@ module.exports = { preset: '@kbn/test', - rootDir: '../../..', - roots: ['/x-pack/plugins/osquery'], - coverageDirectory: '/target/kibana-coverage/jest/x-pack/plugins/osquery', + rootDir: '../../../../..', + roots: ['/x-pack/platform/plugins/shared/osquery'], + coverageDirectory: '/target/kibana-coverage/jest/x-pack/platform/plugins/shared/osquery', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/plugins/osquery/{common,public,server}/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/platform/plugins/shared/osquery/{common,public,server}/**/*.{ts,tsx}', + ], }; diff --git a/x-pack/plugins/osquery/kibana.jsonc b/x-pack/platform/plugins/shared/osquery/kibana.jsonc similarity index 100% rename from x-pack/plugins/osquery/kibana.jsonc rename to x-pack/platform/plugins/shared/osquery/kibana.jsonc diff --git a/x-pack/platform/plugins/shared/osquery/package.json b/x-pack/platform/plugins/shared/osquery/package.json new file mode 100644 index 0000000000000..20aa1af1c4314 --- /dev/null +++ b/x-pack/platform/plugins/shared/osquery/package.json @@ -0,0 +1,24 @@ +{ + "author": "Elastic", + "name": "@kbn/osquery-plugin", + "version": "1.0.0", + "private": true, + "license": "Elastic License 2.0", + "scripts": { + "cypress:burn": "yarn cypress:run --env burn=2 --headed", + "cypress:changed-specs-only": "yarn cypress:run --changed-specs-only --env burn=2", + "cypress": "NODE_OPTIONS=--openssl-legacy-provider node ../../../../plugins/security_solution/scripts/start_cypress_parallel --config-file ../../platform/plugins/shared/osquery/cypress/serverless_cypress.config.ts --ftr-config-file ../../../../../x-pack/test/osquery_cypress/cli_config", + "cypress:open": "yarn cypress open", + "cypress:run": "yarn cypress run", + "cypress:serverless": "NODE_OPTIONS=--openssl-legacy-provider node ../../../../plugins/security_solution/scripts/start_cypress_parallel --config-file ../../platform/plugins/shared/osquery/cypress/serverless_cypress.config.ts --ftr-config-file ../../../../../x-pack/test/osquery_cypress/serverless_cli_config", + "cypress:serverless:open": "yarn cypress:serverless open", + "cypress:serverless:run": "yarn cypress:serverless run", + "cypress:qa:serverless": "NODE_OPTIONS=--openssl-legacy-provider node ../../../../plugins/security_solution/scripts/start_cypress_parallel_serverless --config-file ../../platform/plugins/shared/osquery/cypress/serverless_cypress.config.ts --onBeforeHook ../../../../test/osquery_cypress/runner_qa.ts", + "cypress:qa:serverless:run": "yarn cypress:qa:serverless run", + "nyc": "../../../../../node_modules/.bin/nyc report --reporter=text-summary", + "junit:merge": "../../../../../node_modules/.bin/mochawesome-merge ../../../target/kibana-osquery/cypress/results/mochawesome*.json > ../../../target/kibana-osquery/cypress/results/output.json && ../../../node_modules/.bin/marge ../../../target/kibana-osquery/cypress/results/output.json --reportDir ../../../target/kibana-osquery/cypress/results && yarn junit:transform && mkdir -p ../../../target/junit && cp ../../../target/kibana-osquery/cypress/results/*.xml ../../../target/junit/", + "junit:transform": "node ../security_solution/scripts/junit_transformer --pathPattern '../../../../../target/kibana-osquery/cypress/results/*.xml' --rootDirectory ../../../ --reportName 'Osquery Cypress' --writeInPlace", + "openapi:generate": "node scripts/openapi/generate", + "openapi:bundle": "node scripts/openapi/bundle" + } +} diff --git a/x-pack/plugins/osquery/public/action_results/action_agents_status_badges.tsx b/x-pack/platform/plugins/shared/osquery/public/action_results/action_agents_status_badges.tsx similarity index 100% rename from x-pack/plugins/osquery/public/action_results/action_agents_status_badges.tsx rename to x-pack/platform/plugins/shared/osquery/public/action_results/action_agents_status_badges.tsx diff --git a/x-pack/plugins/osquery/public/action_results/action_agents_status_bar.tsx b/x-pack/platform/plugins/shared/osquery/public/action_results/action_agents_status_bar.tsx similarity index 100% rename from x-pack/plugins/osquery/public/action_results/action_agents_status_bar.tsx rename to x-pack/platform/plugins/shared/osquery/public/action_results/action_agents_status_bar.tsx diff --git a/x-pack/plugins/osquery/public/action_results/action_results_summary.tsx b/x-pack/platform/plugins/shared/osquery/public/action_results/action_results_summary.tsx similarity index 100% rename from x-pack/plugins/osquery/public/action_results/action_results_summary.tsx rename to x-pack/platform/plugins/shared/osquery/public/action_results/action_results_summary.tsx diff --git a/x-pack/plugins/osquery/public/action_results/services/agent_status.tsx b/x-pack/platform/plugins/shared/osquery/public/action_results/services/agent_status.tsx similarity index 100% rename from x-pack/plugins/osquery/public/action_results/services/agent_status.tsx rename to x-pack/platform/plugins/shared/osquery/public/action_results/services/agent_status.tsx diff --git a/x-pack/plugins/osquery/public/action_results/translations.ts b/x-pack/platform/plugins/shared/osquery/public/action_results/translations.ts similarity index 100% rename from x-pack/plugins/osquery/public/action_results/translations.ts rename to x-pack/platform/plugins/shared/osquery/public/action_results/translations.ts diff --git a/x-pack/plugins/osquery/public/action_results/types.ts b/x-pack/platform/plugins/shared/osquery/public/action_results/types.ts similarity index 100% rename from x-pack/plugins/osquery/public/action_results/types.ts rename to x-pack/platform/plugins/shared/osquery/public/action_results/types.ts diff --git a/x-pack/plugins/osquery/public/action_results/use_action_privileges.tsx b/x-pack/platform/plugins/shared/osquery/public/action_results/use_action_privileges.tsx similarity index 100% rename from x-pack/plugins/osquery/public/action_results/use_action_privileges.tsx rename to x-pack/platform/plugins/shared/osquery/public/action_results/use_action_privileges.tsx diff --git a/x-pack/plugins/osquery/public/action_results/use_action_results.ts b/x-pack/platform/plugins/shared/osquery/public/action_results/use_action_results.ts similarity index 100% rename from x-pack/plugins/osquery/public/action_results/use_action_results.ts rename to x-pack/platform/plugins/shared/osquery/public/action_results/use_action_results.ts diff --git a/x-pack/plugins/osquery/public/actions/actions_table.tsx b/x-pack/platform/plugins/shared/osquery/public/actions/actions_table.tsx similarity index 100% rename from x-pack/plugins/osquery/public/actions/actions_table.tsx rename to x-pack/platform/plugins/shared/osquery/public/actions/actions_table.tsx diff --git a/x-pack/plugins/osquery/public/actions/translations.ts b/x-pack/platform/plugins/shared/osquery/public/actions/translations.ts similarity index 100% rename from x-pack/plugins/osquery/public/actions/translations.ts rename to x-pack/platform/plugins/shared/osquery/public/actions/translations.ts diff --git a/x-pack/plugins/osquery/public/actions/use_all_live_queries.ts b/x-pack/platform/plugins/shared/osquery/public/actions/use_all_live_queries.ts similarity index 100% rename from x-pack/plugins/osquery/public/actions/use_all_live_queries.ts rename to x-pack/platform/plugins/shared/osquery/public/actions/use_all_live_queries.ts diff --git a/x-pack/plugins/osquery/public/actions/use_live_query_details.ts b/x-pack/platform/plugins/shared/osquery/public/actions/use_live_query_details.ts similarity index 100% rename from x-pack/plugins/osquery/public/actions/use_live_query_details.ts rename to x-pack/platform/plugins/shared/osquery/public/actions/use_live_query_details.ts diff --git a/x-pack/plugins/osquery/public/agent_policies/agents_policy_link.tsx b/x-pack/platform/plugins/shared/osquery/public/agent_policies/agents_policy_link.tsx similarity index 100% rename from x-pack/plugins/osquery/public/agent_policies/agents_policy_link.tsx rename to x-pack/platform/plugins/shared/osquery/public/agent_policies/agents_policy_link.tsx diff --git a/x-pack/plugins/osquery/public/agent_policies/index.tsx b/x-pack/platform/plugins/shared/osquery/public/agent_policies/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/agent_policies/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/agent_policies/index.tsx diff --git a/x-pack/plugins/osquery/public/agent_policies/use_agent_policies.ts b/x-pack/platform/plugins/shared/osquery/public/agent_policies/use_agent_policies.ts similarity index 100% rename from x-pack/plugins/osquery/public/agent_policies/use_agent_policies.ts rename to x-pack/platform/plugins/shared/osquery/public/agent_policies/use_agent_policies.ts diff --git a/x-pack/plugins/osquery/public/agent_policies/use_agent_policy.ts b/x-pack/platform/plugins/shared/osquery/public/agent_policies/use_agent_policy.ts similarity index 100% rename from x-pack/plugins/osquery/public/agent_policies/use_agent_policy.ts rename to x-pack/platform/plugins/shared/osquery/public/agent_policies/use_agent_policy.ts diff --git a/x-pack/plugins/osquery/public/agents/agent_grouper.test.ts b/x-pack/platform/plugins/shared/osquery/public/agents/agent_grouper.test.ts similarity index 100% rename from x-pack/plugins/osquery/public/agents/agent_grouper.test.ts rename to x-pack/platform/plugins/shared/osquery/public/agents/agent_grouper.test.ts diff --git a/x-pack/plugins/osquery/public/agents/agent_grouper.ts b/x-pack/platform/plugins/shared/osquery/public/agents/agent_grouper.ts similarity index 100% rename from x-pack/plugins/osquery/public/agents/agent_grouper.ts rename to x-pack/platform/plugins/shared/osquery/public/agents/agent_grouper.ts diff --git a/x-pack/plugins/osquery/public/agents/agent_id_to_name.tsx b/x-pack/platform/plugins/shared/osquery/public/agents/agent_id_to_name.tsx similarity index 100% rename from x-pack/plugins/osquery/public/agents/agent_id_to_name.tsx rename to x-pack/platform/plugins/shared/osquery/public/agents/agent_id_to_name.tsx diff --git a/x-pack/plugins/osquery/public/agents/agents_table.tsx b/x-pack/platform/plugins/shared/osquery/public/agents/agents_table.tsx similarity index 100% rename from x-pack/plugins/osquery/public/agents/agents_table.tsx rename to x-pack/platform/plugins/shared/osquery/public/agents/agents_table.tsx diff --git a/x-pack/plugins/osquery/public/agents/helpers.test.ts b/x-pack/platform/plugins/shared/osquery/public/agents/helpers.test.ts similarity index 100% rename from x-pack/plugins/osquery/public/agents/helpers.test.ts rename to x-pack/platform/plugins/shared/osquery/public/agents/helpers.test.ts diff --git a/x-pack/plugins/osquery/public/agents/helpers.ts b/x-pack/platform/plugins/shared/osquery/public/agents/helpers.ts similarity index 100% rename from x-pack/plugins/osquery/public/agents/helpers.ts rename to x-pack/platform/plugins/shared/osquery/public/agents/helpers.ts diff --git a/x-pack/plugins/osquery/public/agents/translations.ts b/x-pack/platform/plugins/shared/osquery/public/agents/translations.ts similarity index 100% rename from x-pack/plugins/osquery/public/agents/translations.ts rename to x-pack/platform/plugins/shared/osquery/public/agents/translations.ts diff --git a/x-pack/plugins/osquery/public/agents/types.ts b/x-pack/platform/plugins/shared/osquery/public/agents/types.ts similarity index 100% rename from x-pack/plugins/osquery/public/agents/types.ts rename to x-pack/platform/plugins/shared/osquery/public/agents/types.ts diff --git a/x-pack/plugins/osquery/public/agents/use_agent_details.ts b/x-pack/platform/plugins/shared/osquery/public/agents/use_agent_details.ts similarity index 100% rename from x-pack/plugins/osquery/public/agents/use_agent_details.ts rename to x-pack/platform/plugins/shared/osquery/public/agents/use_agent_details.ts diff --git a/x-pack/plugins/osquery/public/agents/use_agent_policy_agent_ids.ts b/x-pack/platform/plugins/shared/osquery/public/agents/use_agent_policy_agent_ids.ts similarity index 100% rename from x-pack/plugins/osquery/public/agents/use_agent_policy_agent_ids.ts rename to x-pack/platform/plugins/shared/osquery/public/agents/use_agent_policy_agent_ids.ts diff --git a/x-pack/plugins/osquery/public/agents/use_agent_status.ts b/x-pack/platform/plugins/shared/osquery/public/agents/use_agent_status.ts similarity index 100% rename from x-pack/plugins/osquery/public/agents/use_agent_status.ts rename to x-pack/platform/plugins/shared/osquery/public/agents/use_agent_status.ts diff --git a/x-pack/plugins/osquery/public/agents/use_all_agents.ts b/x-pack/platform/plugins/shared/osquery/public/agents/use_all_agents.ts similarity index 100% rename from x-pack/plugins/osquery/public/agents/use_all_agents.ts rename to x-pack/platform/plugins/shared/osquery/public/agents/use_all_agents.ts diff --git a/x-pack/plugins/osquery/public/agents/use_osquery_policies.ts b/x-pack/platform/plugins/shared/osquery/public/agents/use_osquery_policies.ts similarity index 100% rename from x-pack/plugins/osquery/public/agents/use_osquery_policies.ts rename to x-pack/platform/plugins/shared/osquery/public/agents/use_osquery_policies.ts diff --git a/x-pack/plugins/osquery/public/application.tsx b/x-pack/platform/plugins/shared/osquery/public/application.tsx similarity index 100% rename from x-pack/plugins/osquery/public/application.tsx rename to x-pack/platform/plugins/shared/osquery/public/application.tsx diff --git a/x-pack/plugins/osquery/public/assets/constants.ts b/x-pack/platform/plugins/shared/osquery/public/assets/constants.ts similarity index 100% rename from x-pack/plugins/osquery/public/assets/constants.ts rename to x-pack/platform/plugins/shared/osquery/public/assets/constants.ts diff --git a/x-pack/plugins/osquery/public/assets/use_assets_status.ts b/x-pack/platform/plugins/shared/osquery/public/assets/use_assets_status.ts similarity index 100% rename from x-pack/plugins/osquery/public/assets/use_assets_status.ts rename to x-pack/platform/plugins/shared/osquery/public/assets/use_assets_status.ts diff --git a/x-pack/plugins/osquery/public/assets/use_import_assets.ts b/x-pack/platform/plugins/shared/osquery/public/assets/use_import_assets.ts similarity index 100% rename from x-pack/plugins/osquery/public/assets/use_import_assets.ts rename to x-pack/platform/plugins/shared/osquery/public/assets/use_import_assets.ts diff --git a/x-pack/plugins/osquery/public/cases/add_to_cases.tsx b/x-pack/platform/plugins/shared/osquery/public/cases/add_to_cases.tsx similarity index 100% rename from x-pack/plugins/osquery/public/cases/add_to_cases.tsx rename to x-pack/platform/plugins/shared/osquery/public/cases/add_to_cases.tsx diff --git a/x-pack/plugins/osquery/public/cases/add_to_cases_button.tsx b/x-pack/platform/plugins/shared/osquery/public/cases/add_to_cases_button.tsx similarity index 100% rename from x-pack/plugins/osquery/public/cases/add_to_cases_button.tsx rename to x-pack/platform/plugins/shared/osquery/public/cases/add_to_cases_button.tsx diff --git a/x-pack/plugins/osquery/public/common/contexts.tsx b/x-pack/platform/plugins/shared/osquery/public/common/contexts.tsx similarity index 100% rename from x-pack/plugins/osquery/public/common/contexts.tsx rename to x-pack/platform/plugins/shared/osquery/public/common/contexts.tsx diff --git a/x-pack/plugins/osquery/public/common/helpers.ts b/x-pack/platform/plugins/shared/osquery/public/common/helpers.ts similarity index 100% rename from x-pack/plugins/osquery/public/common/helpers.ts rename to x-pack/platform/plugins/shared/osquery/public/common/helpers.ts diff --git a/x-pack/plugins/osquery/public/common/hooks/index.tsx b/x-pack/platform/plugins/shared/osquery/public/common/hooks/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/common/hooks/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/common/hooks/index.tsx diff --git a/x-pack/plugins/osquery/public/common/hooks/use_breadcrumbs.tsx b/x-pack/platform/plugins/shared/osquery/public/common/hooks/use_breadcrumbs.tsx similarity index 100% rename from x-pack/plugins/osquery/public/common/hooks/use_breadcrumbs.tsx rename to x-pack/platform/plugins/shared/osquery/public/common/hooks/use_breadcrumbs.tsx diff --git a/x-pack/plugins/osquery/public/common/hooks/use_discover_link.tsx b/x-pack/platform/plugins/shared/osquery/public/common/hooks/use_discover_link.tsx similarity index 100% rename from x-pack/plugins/osquery/public/common/hooks/use_discover_link.tsx rename to x-pack/platform/plugins/shared/osquery/public/common/hooks/use_discover_link.tsx diff --git a/x-pack/plugins/osquery/public/common/hooks/use_error_toast.tsx b/x-pack/platform/plugins/shared/osquery/public/common/hooks/use_error_toast.tsx similarity index 100% rename from x-pack/plugins/osquery/public/common/hooks/use_error_toast.tsx rename to x-pack/platform/plugins/shared/osquery/public/common/hooks/use_error_toast.tsx diff --git a/x-pack/plugins/osquery/public/common/hooks/use_logs_data_view.tsx b/x-pack/platform/plugins/shared/osquery/public/common/hooks/use_logs_data_view.tsx similarity index 100% rename from x-pack/plugins/osquery/public/common/hooks/use_logs_data_view.tsx rename to x-pack/platform/plugins/shared/osquery/public/common/hooks/use_logs_data_view.tsx diff --git a/x-pack/plugins/osquery/public/common/hooks/use_osquery_integration.tsx b/x-pack/platform/plugins/shared/osquery/public/common/hooks/use_osquery_integration.tsx similarity index 100% rename from x-pack/plugins/osquery/public/common/hooks/use_osquery_integration.tsx rename to x-pack/platform/plugins/shared/osquery/public/common/hooks/use_osquery_integration.tsx diff --git a/x-pack/plugins/osquery/public/common/lib/kibana/index.ts b/x-pack/platform/plugins/shared/osquery/public/common/lib/kibana/index.ts similarity index 100% rename from x-pack/plugins/osquery/public/common/lib/kibana/index.ts rename to x-pack/platform/plugins/shared/osquery/public/common/lib/kibana/index.ts diff --git a/x-pack/plugins/osquery/public/common/lib/kibana/kibana_react.ts b/x-pack/platform/plugins/shared/osquery/public/common/lib/kibana/kibana_react.ts similarity index 100% rename from x-pack/plugins/osquery/public/common/lib/kibana/kibana_react.ts rename to x-pack/platform/plugins/shared/osquery/public/common/lib/kibana/kibana_react.ts diff --git a/x-pack/plugins/osquery/public/common/page_paths.ts b/x-pack/platform/plugins/shared/osquery/public/common/page_paths.ts similarity index 100% rename from x-pack/plugins/osquery/public/common/page_paths.ts rename to x-pack/platform/plugins/shared/osquery/public/common/page_paths.ts diff --git a/x-pack/plugins/osquery/public/common/schemas/ecs/v8.12.0.json b/x-pack/platform/plugins/shared/osquery/public/common/schemas/ecs/v8.12.0.json similarity index 100% rename from x-pack/plugins/osquery/public/common/schemas/ecs/v8.12.0.json rename to x-pack/platform/plugins/shared/osquery/public/common/schemas/ecs/v8.12.0.json diff --git a/x-pack/plugins/osquery/public/common/schemas/osquery/v5.13.1.json b/x-pack/platform/plugins/shared/osquery/public/common/schemas/osquery/v5.13.1.json similarity index 100% rename from x-pack/plugins/osquery/public/common/schemas/osquery/v5.13.1.json rename to x-pack/platform/plugins/shared/osquery/public/common/schemas/osquery/v5.13.1.json diff --git a/x-pack/plugins/osquery/public/components/app.tsx b/x-pack/platform/plugins/shared/osquery/public/components/app.tsx similarity index 100% rename from x-pack/plugins/osquery/public/components/app.tsx rename to x-pack/platform/plugins/shared/osquery/public/components/app.tsx diff --git a/x-pack/plugins/osquery/public/components/empty_state.tsx b/x-pack/platform/plugins/shared/osquery/public/components/empty_state.tsx similarity index 100% rename from x-pack/plugins/osquery/public/components/empty_state.tsx rename to x-pack/platform/plugins/shared/osquery/public/components/empty_state.tsx diff --git a/x-pack/plugins/osquery/public/components/layouts/default.tsx b/x-pack/platform/plugins/shared/osquery/public/components/layouts/default.tsx similarity index 100% rename from x-pack/plugins/osquery/public/components/layouts/default.tsx rename to x-pack/platform/plugins/shared/osquery/public/components/layouts/default.tsx diff --git a/x-pack/plugins/osquery/public/components/layouts/header.tsx b/x-pack/platform/plugins/shared/osquery/public/components/layouts/header.tsx similarity index 100% rename from x-pack/plugins/osquery/public/components/layouts/header.tsx rename to x-pack/platform/plugins/shared/osquery/public/components/layouts/header.tsx diff --git a/x-pack/plugins/osquery/public/components/layouts/index.tsx b/x-pack/platform/plugins/shared/osquery/public/components/layouts/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/components/layouts/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/components/layouts/index.tsx diff --git a/x-pack/plugins/osquery/public/components/layouts/with_header.tsx b/x-pack/platform/plugins/shared/osquery/public/components/layouts/with_header.tsx similarity index 100% rename from x-pack/plugins/osquery/public/components/layouts/with_header.tsx rename to x-pack/platform/plugins/shared/osquery/public/components/layouts/with_header.tsx diff --git a/x-pack/plugins/osquery/public/components/layouts/without_header.tsx b/x-pack/platform/plugins/shared/osquery/public/components/layouts/without_header.tsx similarity index 100% rename from x-pack/plugins/osquery/public/components/layouts/without_header.tsx rename to x-pack/platform/plugins/shared/osquery/public/components/layouts/without_header.tsx diff --git a/x-pack/plugins/osquery/public/components/main_navigation.tsx b/x-pack/platform/plugins/shared/osquery/public/components/main_navigation.tsx similarity index 100% rename from x-pack/plugins/osquery/public/components/main_navigation.tsx rename to x-pack/platform/plugins/shared/osquery/public/components/main_navigation.tsx diff --git a/x-pack/plugins/osquery/public/components/manage_integration_link.tsx b/x-pack/platform/plugins/shared/osquery/public/components/manage_integration_link.tsx similarity index 100% rename from x-pack/plugins/osquery/public/components/manage_integration_link.tsx rename to x-pack/platform/plugins/shared/osquery/public/components/manage_integration_link.tsx diff --git a/x-pack/plugins/osquery/public/components/osquery_icon/index.tsx b/x-pack/platform/plugins/shared/osquery/public/components/osquery_icon/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/components/osquery_icon/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/components/osquery_icon/index.tsx diff --git a/x-pack/plugins/osquery/public/components/osquery_icon/osquery.svg b/x-pack/platform/plugins/shared/osquery/public/components/osquery_icon/osquery.svg similarity index 100% rename from x-pack/plugins/osquery/public/components/osquery_icon/osquery.svg rename to x-pack/platform/plugins/shared/osquery/public/components/osquery_icon/osquery.svg diff --git a/x-pack/plugins/osquery/public/components/osquery_schema_link.tsx b/x-pack/platform/plugins/shared/osquery/public/components/osquery_schema_link.tsx similarity index 100% rename from x-pack/plugins/osquery/public/components/osquery_schema_link.tsx rename to x-pack/platform/plugins/shared/osquery/public/components/osquery_schema_link.tsx diff --git a/x-pack/plugins/osquery/public/discover/pack_view_in_discover.tsx b/x-pack/platform/plugins/shared/osquery/public/discover/pack_view_in_discover.tsx similarity index 100% rename from x-pack/plugins/osquery/public/discover/pack_view_in_discover.tsx rename to x-pack/platform/plugins/shared/osquery/public/discover/pack_view_in_discover.tsx diff --git a/x-pack/plugins/osquery/public/discover/view_results_in_discover.tsx b/x-pack/platform/plugins/shared/osquery/public/discover/view_results_in_discover.tsx similarity index 100% rename from x-pack/plugins/osquery/public/discover/view_results_in_discover.tsx rename to x-pack/platform/plugins/shared/osquery/public/discover/view_results_in_discover.tsx diff --git a/x-pack/plugins/osquery/public/editor/index.tsx b/x-pack/platform/plugins/shared/osquery/public/editor/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/editor/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/editor/index.tsx diff --git a/x-pack/plugins/osquery/public/editor/osquery_highlight_rules.test.ts b/x-pack/platform/plugins/shared/osquery/public/editor/osquery_highlight_rules.test.ts similarity index 100% rename from x-pack/plugins/osquery/public/editor/osquery_highlight_rules.test.ts rename to x-pack/platform/plugins/shared/osquery/public/editor/osquery_highlight_rules.test.ts diff --git a/x-pack/plugins/osquery/public/editor/osquery_highlight_rules.ts b/x-pack/platform/plugins/shared/osquery/public/editor/osquery_highlight_rules.ts similarity index 100% rename from x-pack/plugins/osquery/public/editor/osquery_highlight_rules.ts rename to x-pack/platform/plugins/shared/osquery/public/editor/osquery_highlight_rules.ts diff --git a/x-pack/plugins/osquery/public/editor/osquery_tables.ts b/x-pack/platform/plugins/shared/osquery/public/editor/osquery_tables.ts similarity index 100% rename from x-pack/plugins/osquery/public/editor/osquery_tables.ts rename to x-pack/platform/plugins/shared/osquery/public/editor/osquery_tables.ts diff --git a/x-pack/plugins/osquery/public/fleet_integration/config_uploader.tsx b/x-pack/platform/plugins/shared/osquery/public/fleet_integration/config_uploader.tsx similarity index 100% rename from x-pack/plugins/osquery/public/fleet_integration/config_uploader.tsx rename to x-pack/platform/plugins/shared/osquery/public/fleet_integration/config_uploader.tsx diff --git a/x-pack/plugins/osquery/public/fleet_integration/disabled_callout.tsx b/x-pack/platform/plugins/shared/osquery/public/fleet_integration/disabled_callout.tsx similarity index 100% rename from x-pack/plugins/osquery/public/fleet_integration/disabled_callout.tsx rename to x-pack/platform/plugins/shared/osquery/public/fleet_integration/disabled_callout.tsx diff --git a/x-pack/plugins/osquery/public/fleet_integration/index.ts b/x-pack/platform/plugins/shared/osquery/public/fleet_integration/index.ts similarity index 100% rename from x-pack/plugins/osquery/public/fleet_integration/index.ts rename to x-pack/platform/plugins/shared/osquery/public/fleet_integration/index.ts diff --git a/x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_custom_button_extension.tsx b/x-pack/platform/plugins/shared/osquery/public/fleet_integration/lazy_osquery_managed_custom_button_extension.tsx similarity index 100% rename from x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_custom_button_extension.tsx rename to x-pack/platform/plugins/shared/osquery/public/fleet_integration/lazy_osquery_managed_custom_button_extension.tsx diff --git a/x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_policy_create_import_extension.tsx b/x-pack/platform/plugins/shared/osquery/public/fleet_integration/lazy_osquery_managed_policy_create_import_extension.tsx similarity index 100% rename from x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_policy_create_import_extension.tsx rename to x-pack/platform/plugins/shared/osquery/public/fleet_integration/lazy_osquery_managed_policy_create_import_extension.tsx diff --git a/x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_policy_edit_extension.tsx b/x-pack/platform/plugins/shared/osquery/public/fleet_integration/lazy_osquery_managed_policy_edit_extension.tsx similarity index 100% rename from x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_policy_edit_extension.tsx rename to x-pack/platform/plugins/shared/osquery/public/fleet_integration/lazy_osquery_managed_policy_edit_extension.tsx diff --git a/x-pack/plugins/osquery/public/fleet_integration/navigation_buttons.tsx b/x-pack/platform/plugins/shared/osquery/public/fleet_integration/navigation_buttons.tsx similarity index 100% rename from x-pack/plugins/osquery/public/fleet_integration/navigation_buttons.tsx rename to x-pack/platform/plugins/shared/osquery/public/fleet_integration/navigation_buttons.tsx diff --git a/x-pack/plugins/osquery/public/fleet_integration/osquery_managed_custom_button_extension.tsx b/x-pack/platform/plugins/shared/osquery/public/fleet_integration/osquery_managed_custom_button_extension.tsx similarity index 100% rename from x-pack/plugins/osquery/public/fleet_integration/osquery_managed_custom_button_extension.tsx rename to x-pack/platform/plugins/shared/osquery/public/fleet_integration/osquery_managed_custom_button_extension.tsx diff --git a/x-pack/plugins/osquery/public/fleet_integration/osquery_managed_policy_create_import_extension.tsx b/x-pack/platform/plugins/shared/osquery/public/fleet_integration/osquery_managed_policy_create_import_extension.tsx similarity index 100% rename from x-pack/plugins/osquery/public/fleet_integration/osquery_managed_policy_create_import_extension.tsx rename to x-pack/platform/plugins/shared/osquery/public/fleet_integration/osquery_managed_policy_create_import_extension.tsx diff --git a/x-pack/plugins/osquery/public/fleet_integration/use_fetch_status.tsx b/x-pack/platform/plugins/shared/osquery/public/fleet_integration/use_fetch_status.tsx similarity index 100% rename from x-pack/plugins/osquery/public/fleet_integration/use_fetch_status.tsx rename to x-pack/platform/plugins/shared/osquery/public/fleet_integration/use_fetch_status.tsx diff --git a/x-pack/plugins/osquery/public/form/index.ts b/x-pack/platform/plugins/shared/osquery/public/form/index.ts similarity index 100% rename from x-pack/plugins/osquery/public/form/index.ts rename to x-pack/platform/plugins/shared/osquery/public/form/index.ts diff --git a/x-pack/plugins/osquery/public/form/interval_field.tsx b/x-pack/platform/plugins/shared/osquery/public/form/interval_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/form/interval_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/form/interval_field.tsx diff --git a/x-pack/plugins/osquery/public/form/query_description_field.tsx b/x-pack/platform/plugins/shared/osquery/public/form/query_description_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/form/query_description_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/form/query_description_field.tsx diff --git a/x-pack/plugins/osquery/public/form/query_id_field.tsx b/x-pack/platform/plugins/shared/osquery/public/form/query_id_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/form/query_id_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/form/query_id_field.tsx diff --git a/x-pack/plugins/osquery/public/form/results_type_field.tsx b/x-pack/platform/plugins/shared/osquery/public/form/results_type_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/form/results_type_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/form/results_type_field.tsx diff --git a/x-pack/plugins/osquery/public/form/timeout_field.tsx b/x-pack/platform/plugins/shared/osquery/public/form/timeout_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/form/timeout_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/form/timeout_field.tsx diff --git a/x-pack/plugins/osquery/public/form/types.ts b/x-pack/platform/plugins/shared/osquery/public/form/types.ts similarity index 100% rename from x-pack/plugins/osquery/public/form/types.ts rename to x-pack/platform/plugins/shared/osquery/public/form/types.ts diff --git a/x-pack/plugins/osquery/public/form/version_field.tsx b/x-pack/platform/plugins/shared/osquery/public/form/version_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/form/version_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/form/version_field.tsx diff --git a/x-pack/plugins/osquery/public/index.ts b/x-pack/platform/plugins/shared/osquery/public/index.ts similarity index 100% rename from x-pack/plugins/osquery/public/index.ts rename to x-pack/platform/plugins/shared/osquery/public/index.ts diff --git a/x-pack/plugins/osquery/public/lens/pack_view_in_lens.tsx b/x-pack/platform/plugins/shared/osquery/public/lens/pack_view_in_lens.tsx similarity index 100% rename from x-pack/plugins/osquery/public/lens/pack_view_in_lens.tsx rename to x-pack/platform/plugins/shared/osquery/public/lens/pack_view_in_lens.tsx diff --git a/x-pack/plugins/osquery/public/lens/view_results_in_lens.tsx b/x-pack/platform/plugins/shared/osquery/public/lens/view_results_in_lens.tsx similarity index 100% rename from x-pack/plugins/osquery/public/lens/view_results_in_lens.tsx rename to x-pack/platform/plugins/shared/osquery/public/lens/view_results_in_lens.tsx diff --git a/x-pack/plugins/osquery/public/live_queries/form/agents_table_field.tsx b/x-pack/platform/plugins/shared/osquery/public/live_queries/form/agents_table_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/live_queries/form/agents_table_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/live_queries/form/agents_table_field.tsx diff --git a/x-pack/plugins/osquery/public/live_queries/form/index.tsx b/x-pack/platform/plugins/shared/osquery/public/live_queries/form/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/live_queries/form/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/live_queries/form/index.tsx diff --git a/x-pack/plugins/osquery/public/live_queries/form/live_query_query_field.tsx b/x-pack/platform/plugins/shared/osquery/public/live_queries/form/live_query_query_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/live_queries/form/live_query_query_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/live_queries/form/live_query_query_field.tsx diff --git a/x-pack/plugins/osquery/public/live_queries/form/pack_queries_status_table.tsx b/x-pack/platform/plugins/shared/osquery/public/live_queries/form/pack_queries_status_table.tsx similarity index 100% rename from x-pack/plugins/osquery/public/live_queries/form/pack_queries_status_table.tsx rename to x-pack/platform/plugins/shared/osquery/public/live_queries/form/pack_queries_status_table.tsx diff --git a/x-pack/plugins/osquery/public/live_queries/form/pack_results_header.tsx b/x-pack/platform/plugins/shared/osquery/public/live_queries/form/pack_results_header.tsx similarity index 100% rename from x-pack/plugins/osquery/public/live_queries/form/pack_results_header.tsx rename to x-pack/platform/plugins/shared/osquery/public/live_queries/form/pack_results_header.tsx diff --git a/x-pack/plugins/osquery/public/live_queries/form/packs_combobox_field.tsx b/x-pack/platform/plugins/shared/osquery/public/live_queries/form/packs_combobox_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/live_queries/form/packs_combobox_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/live_queries/form/packs_combobox_field.tsx diff --git a/x-pack/plugins/osquery/public/live_queries/form/query_details_flyout.tsx b/x-pack/platform/plugins/shared/osquery/public/live_queries/form/query_details_flyout.tsx similarity index 100% rename from x-pack/plugins/osquery/public/live_queries/form/query_details_flyout.tsx rename to x-pack/platform/plugins/shared/osquery/public/live_queries/form/query_details_flyout.tsx diff --git a/x-pack/plugins/osquery/public/live_queries/form/query_pack_selectable.tsx b/x-pack/platform/plugins/shared/osquery/public/live_queries/form/query_pack_selectable.tsx similarity index 100% rename from x-pack/plugins/osquery/public/live_queries/form/query_pack_selectable.tsx rename to x-pack/platform/plugins/shared/osquery/public/live_queries/form/query_pack_selectable.tsx diff --git a/x-pack/plugins/osquery/public/live_queries/index.tsx b/x-pack/platform/plugins/shared/osquery/public/live_queries/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/live_queries/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/live_queries/index.tsx diff --git a/x-pack/plugins/osquery/public/live_queries/use_create_live_query_action.tsx b/x-pack/platform/plugins/shared/osquery/public/live_queries/use_create_live_query_action.tsx similarity index 100% rename from x-pack/plugins/osquery/public/live_queries/use_create_live_query_action.tsx rename to x-pack/platform/plugins/shared/osquery/public/live_queries/use_create_live_query_action.tsx diff --git a/x-pack/plugins/osquery/public/packs/active_state_switch.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/active_state_switch.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/active_state_switch.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/active_state_switch.tsx diff --git a/x-pack/plugins/osquery/public/packs/add_pack_button.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/add_pack_button.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/add_pack_button.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/add_pack_button.tsx diff --git a/x-pack/plugins/osquery/public/packs/constants.ts b/x-pack/platform/plugins/shared/osquery/public/packs/constants.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/constants.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/constants.ts diff --git a/x-pack/plugins/osquery/public/packs/form/confirmation_modal.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/form/confirmation_modal.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/form/confirmation_modal.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/form/confirmation_modal.tsx diff --git a/x-pack/plugins/osquery/public/packs/form/description_field.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/form/description_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/form/description_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/form/description_field.tsx diff --git a/x-pack/plugins/osquery/public/packs/form/index.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/form/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/form/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/form/index.tsx diff --git a/x-pack/plugins/osquery/public/packs/form/name_field.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/form/name_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/form/name_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/form/name_field.tsx diff --git a/x-pack/plugins/osquery/public/packs/form/pack_uploader.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/form/pack_uploader.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/form/pack_uploader.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/form/pack_uploader.tsx diff --git a/x-pack/plugins/osquery/public/packs/form/policy_id_combobox_field.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/form/policy_id_combobox_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/form/policy_id_combobox_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/form/policy_id_combobox_field.tsx diff --git a/x-pack/plugins/osquery/public/packs/form/queries_field.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/form/queries_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/form/queries_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/form/queries_field.tsx diff --git a/x-pack/plugins/osquery/public/packs/form/shards/pack_shards_field.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/form/shards/pack_shards_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/form/shards/pack_shards_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/form/shards/pack_shards_field.tsx diff --git a/x-pack/plugins/osquery/public/packs/form/shards/pack_type_selectable.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/form/shards/pack_type_selectable.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/form/shards/pack_type_selectable.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/form/shards/pack_type_selectable.tsx diff --git a/x-pack/plugins/osquery/public/packs/form/shards/shards_form.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/form/shards/shards_form.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/form/shards/shards_form.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/form/shards/shards_form.tsx diff --git a/x-pack/plugins/osquery/public/packs/form/shards/shards_percentage_field.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/form/shards/shards_percentage_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/form/shards/shards_percentage_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/form/shards/shards_percentage_field.tsx diff --git a/x-pack/plugins/osquery/public/packs/form/shards/shards_policy_field.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/form/shards/shards_policy_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/form/shards/shards_policy_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/form/shards/shards_policy_field.tsx diff --git a/x-pack/plugins/osquery/public/packs/form/translations.ts b/x-pack/platform/plugins/shared/osquery/public/packs/form/translations.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/form/translations.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/form/translations.ts diff --git a/x-pack/plugins/osquery/public/packs/form/utils.ts b/x-pack/platform/plugins/shared/osquery/public/packs/form/utils.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/form/utils.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/form/utils.ts diff --git a/x-pack/plugins/osquery/public/packs/index.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/index.tsx diff --git a/x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/pack_queries_status_table.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/pack_queries_status_table.tsx diff --git a/x-pack/plugins/osquery/public/packs/pack_queries_table.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/pack_queries_table.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/pack_queries_table.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/pack_queries_table.tsx diff --git a/x-pack/plugins/osquery/public/packs/packs_table.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/packs_table.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/packs_table.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/packs_table.tsx diff --git a/x-pack/plugins/osquery/public/packs/queries/constants.ts b/x-pack/platform/plugins/shared/osquery/public/packs/queries/constants.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/constants.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/constants.ts diff --git a/x-pack/plugins/osquery/public/packs/queries/ecs_field_css.ts b/x-pack/platform/plugins/shared/osquery/public/packs/queries/ecs_field_css.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/ecs_field_css.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/ecs_field_css.ts diff --git a/x-pack/plugins/osquery/public/packs/queries/ecs_mapping_editor_field.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/queries/ecs_mapping_editor_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/ecs_mapping_editor_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/ecs_mapping_editor_field.tsx diff --git a/x-pack/plugins/osquery/public/packs/queries/lazy_ecs_mapping_editor_field.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/queries/lazy_ecs_mapping_editor_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/lazy_ecs_mapping_editor_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/lazy_ecs_mapping_editor_field.tsx diff --git a/x-pack/plugins/osquery/public/packs/queries/platform_checkbox_group_field.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/queries/platform_checkbox_group_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/platform_checkbox_group_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/platform_checkbox_group_field.tsx diff --git a/x-pack/plugins/osquery/public/packs/queries/platforms/constants.ts b/x-pack/platform/plugins/shared/osquery/public/packs/queries/platforms/constants.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/platforms/constants.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/platforms/constants.ts diff --git a/x-pack/plugins/osquery/public/packs/queries/platforms/helpers.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/queries/platforms/helpers.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/platforms/helpers.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/platforms/helpers.tsx diff --git a/x-pack/plugins/osquery/public/packs/queries/platforms/index.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/queries/platforms/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/platforms/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/platforms/index.tsx diff --git a/x-pack/plugins/osquery/public/packs/queries/platforms/logos/linux.svg b/x-pack/platform/plugins/shared/osquery/public/packs/queries/platforms/logos/linux.svg similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/platforms/logos/linux.svg rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/platforms/logos/linux.svg diff --git a/x-pack/plugins/osquery/public/packs/queries/platforms/logos/macos.svg b/x-pack/platform/plugins/shared/osquery/public/packs/queries/platforms/logos/macos.svg similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/platforms/logos/macos.svg rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/platforms/logos/macos.svg diff --git a/x-pack/plugins/osquery/public/packs/queries/platforms/logos/windows.svg b/x-pack/platform/plugins/shared/osquery/public/packs/queries/platforms/logos/windows.svg similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/platforms/logos/windows.svg rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/platforms/logos/windows.svg diff --git a/x-pack/plugins/osquery/public/packs/queries/platforms/platform_icon.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/queries/platforms/platform_icon.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/platforms/platform_icon.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/platforms/platform_icon.tsx diff --git a/x-pack/plugins/osquery/public/packs/queries/platforms/types.ts b/x-pack/platform/plugins/shared/osquery/public/packs/queries/platforms/types.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/platforms/types.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/platforms/types.ts diff --git a/x-pack/plugins/osquery/public/packs/queries/query_flyout.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/queries/query_flyout.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/query_flyout.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/query_flyout.tsx diff --git a/x-pack/plugins/osquery/public/packs/queries/use_pack_query_form.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/queries/use_pack_query_form.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/use_pack_query_form.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/use_pack_query_form.tsx diff --git a/x-pack/plugins/osquery/public/packs/queries/validations.test.ts b/x-pack/platform/plugins/shared/osquery/public/packs/queries/validations.test.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/validations.test.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/validations.test.ts diff --git a/x-pack/plugins/osquery/public/packs/queries/validations.ts b/x-pack/platform/plugins/shared/osquery/public/packs/queries/validations.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/queries/validations.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/queries/validations.ts diff --git a/x-pack/plugins/osquery/public/packs/scheduled_query_errors_table.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/scheduled_query_errors_table.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/scheduled_query_errors_table.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/scheduled_query_errors_table.tsx diff --git a/x-pack/plugins/osquery/public/packs/types.ts b/x-pack/platform/plugins/shared/osquery/public/packs/types.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/types.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/types.ts diff --git a/x-pack/plugins/osquery/public/packs/use_create_pack.ts b/x-pack/platform/plugins/shared/osquery/public/packs/use_create_pack.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/use_create_pack.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/use_create_pack.ts diff --git a/x-pack/plugins/osquery/public/packs/use_delete_pack.ts b/x-pack/platform/plugins/shared/osquery/public/packs/use_delete_pack.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/use_delete_pack.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/use_delete_pack.ts diff --git a/x-pack/plugins/osquery/public/packs/use_pack.ts b/x-pack/platform/plugins/shared/osquery/public/packs/use_pack.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/use_pack.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/use_pack.ts diff --git a/x-pack/plugins/osquery/public/packs/use_pack_query_errors.ts b/x-pack/platform/plugins/shared/osquery/public/packs/use_pack_query_errors.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/use_pack_query_errors.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/use_pack_query_errors.ts diff --git a/x-pack/plugins/osquery/public/packs/use_pack_query_last_results.ts b/x-pack/platform/plugins/shared/osquery/public/packs/use_pack_query_last_results.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/use_pack_query_last_results.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/use_pack_query_last_results.ts diff --git a/x-pack/plugins/osquery/public/packs/use_packs.ts b/x-pack/platform/plugins/shared/osquery/public/packs/use_packs.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/use_packs.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/use_packs.ts diff --git a/x-pack/plugins/osquery/public/packs/use_update_pack.ts b/x-pack/platform/plugins/shared/osquery/public/packs/use_update_pack.ts similarity index 100% rename from x-pack/plugins/osquery/public/packs/use_update_pack.ts rename to x-pack/platform/plugins/shared/osquery/public/packs/use_update_pack.ts diff --git a/x-pack/plugins/osquery/public/packs/utils.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/utils.tsx similarity index 100% rename from x-pack/plugins/osquery/public/packs/utils.tsx rename to x-pack/platform/plugins/shared/osquery/public/packs/utils.tsx diff --git a/x-pack/plugins/osquery/public/plugin.ts b/x-pack/platform/plugins/shared/osquery/public/plugin.ts similarity index 100% rename from x-pack/plugins/osquery/public/plugin.ts rename to x-pack/platform/plugins/shared/osquery/public/plugin.ts diff --git a/x-pack/plugins/osquery/public/query_client.ts b/x-pack/platform/plugins/shared/osquery/public/query_client.ts similarity index 100% rename from x-pack/plugins/osquery/public/query_client.ts rename to x-pack/platform/plugins/shared/osquery/public/query_client.ts diff --git a/x-pack/plugins/osquery/public/results/results_table.tsx b/x-pack/platform/plugins/shared/osquery/public/results/results_table.tsx similarity index 100% rename from x-pack/plugins/osquery/public/results/results_table.tsx rename to x-pack/platform/plugins/shared/osquery/public/results/results_table.tsx diff --git a/x-pack/plugins/osquery/public/results/translations.ts b/x-pack/platform/plugins/shared/osquery/public/results/translations.ts similarity index 100% rename from x-pack/plugins/osquery/public/results/translations.ts rename to x-pack/platform/plugins/shared/osquery/public/results/translations.ts diff --git a/x-pack/plugins/osquery/public/results/use_all_results.ts b/x-pack/platform/plugins/shared/osquery/public/results/use_all_results.ts similarity index 100% rename from x-pack/plugins/osquery/public/results/use_all_results.ts rename to x-pack/platform/plugins/shared/osquery/public/results/use_all_results.ts diff --git a/x-pack/plugins/osquery/public/routes/components/empty_prompt.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/components/empty_prompt.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/components/empty_prompt.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/components/empty_prompt.tsx diff --git a/x-pack/plugins/osquery/public/routes/components/index.ts b/x-pack/platform/plugins/shared/osquery/public/routes/components/index.ts similarity index 100% rename from x-pack/plugins/osquery/public/routes/components/index.ts rename to x-pack/platform/plugins/shared/osquery/public/routes/components/index.ts diff --git a/x-pack/plugins/osquery/public/routes/components/missing_privileges.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/components/missing_privileges.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/components/missing_privileges.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/components/missing_privileges.tsx diff --git a/x-pack/plugins/osquery/public/routes/index.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/index.tsx diff --git a/x-pack/plugins/osquery/public/routes/live_queries/details/index.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/live_queries/details/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/live_queries/details/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/live_queries/details/index.tsx diff --git a/x-pack/plugins/osquery/public/routes/live_queries/index.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/live_queries/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/live_queries/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/live_queries/index.tsx diff --git a/x-pack/plugins/osquery/public/routes/live_queries/list/index.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/live_queries/list/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/live_queries/list/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/live_queries/list/index.tsx diff --git a/x-pack/plugins/osquery/public/routes/live_queries/new/index.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/live_queries/new/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/live_queries/new/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/live_queries/new/index.tsx diff --git a/x-pack/plugins/osquery/public/routes/packs/add/index.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/packs/add/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/packs/add/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/packs/add/index.tsx diff --git a/x-pack/plugins/osquery/public/routes/packs/details/index.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/packs/details/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/packs/details/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/packs/details/index.tsx diff --git a/x-pack/plugins/osquery/public/routes/packs/edit/index.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/packs/edit/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/packs/edit/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/packs/edit/index.tsx diff --git a/x-pack/plugins/osquery/public/routes/packs/index.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/packs/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/packs/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/packs/index.tsx diff --git a/x-pack/plugins/osquery/public/routes/packs/list/empty_state.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/packs/list/empty_state.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/packs/list/empty_state.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/packs/list/empty_state.tsx diff --git a/x-pack/plugins/osquery/public/routes/packs/list/index.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/packs/list/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/packs/list/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/packs/list/index.tsx diff --git a/x-pack/plugins/osquery/public/routes/packs/list/load_integration_assets.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/packs/list/load_integration_assets.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/packs/list/load_integration_assets.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/packs/list/load_integration_assets.tsx diff --git a/x-pack/plugins/osquery/public/routes/packs/list/translations.ts b/x-pack/platform/plugins/shared/osquery/public/routes/packs/list/translations.ts similarity index 100% rename from x-pack/plugins/osquery/public/routes/packs/list/translations.ts rename to x-pack/platform/plugins/shared/osquery/public/routes/packs/list/translations.ts diff --git a/x-pack/plugins/osquery/public/routes/saved_queries/edit/form.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/saved_queries/edit/form.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/saved_queries/edit/form.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/saved_queries/edit/form.tsx diff --git a/x-pack/plugins/osquery/public/routes/saved_queries/edit/index.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/saved_queries/edit/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/saved_queries/edit/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/saved_queries/edit/index.tsx diff --git a/x-pack/plugins/osquery/public/routes/saved_queries/edit/tabs.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/saved_queries/edit/tabs.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/saved_queries/edit/tabs.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/saved_queries/edit/tabs.tsx diff --git a/x-pack/plugins/osquery/public/routes/saved_queries/index.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/saved_queries/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/saved_queries/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/saved_queries/index.tsx diff --git a/x-pack/plugins/osquery/public/routes/saved_queries/list/index.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/saved_queries/list/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/saved_queries/list/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/saved_queries/list/index.tsx diff --git a/x-pack/plugins/osquery/public/routes/saved_queries/new/form.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/saved_queries/new/form.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/saved_queries/new/form.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/saved_queries/new/form.tsx diff --git a/x-pack/plugins/osquery/public/routes/saved_queries/new/index.tsx b/x-pack/platform/plugins/shared/osquery/public/routes/saved_queries/new/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/routes/saved_queries/new/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/routes/saved_queries/new/index.tsx diff --git a/x-pack/plugins/osquery/public/saved_queries/constants.ts b/x-pack/platform/plugins/shared/osquery/public/saved_queries/constants.ts similarity index 100% rename from x-pack/plugins/osquery/public/saved_queries/constants.ts rename to x-pack/platform/plugins/shared/osquery/public/saved_queries/constants.ts diff --git a/x-pack/plugins/osquery/public/saved_queries/form/code_editor_field.tsx b/x-pack/platform/plugins/shared/osquery/public/saved_queries/form/code_editor_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/saved_queries/form/code_editor_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/saved_queries/form/code_editor_field.tsx diff --git a/x-pack/plugins/osquery/public/saved_queries/form/index.tsx b/x-pack/platform/plugins/shared/osquery/public/saved_queries/form/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/saved_queries/form/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/saved_queries/form/index.tsx diff --git a/x-pack/plugins/osquery/public/saved_queries/form/playground_flyout.tsx b/x-pack/platform/plugins/shared/osquery/public/saved_queries/form/playground_flyout.tsx similarity index 100% rename from x-pack/plugins/osquery/public/saved_queries/form/playground_flyout.tsx rename to x-pack/platform/plugins/shared/osquery/public/saved_queries/form/playground_flyout.tsx diff --git a/x-pack/plugins/osquery/public/saved_queries/form/use_saved_query_form.tsx b/x-pack/platform/plugins/shared/osquery/public/saved_queries/form/use_saved_query_form.tsx similarity index 100% rename from x-pack/plugins/osquery/public/saved_queries/form/use_saved_query_form.tsx rename to x-pack/platform/plugins/shared/osquery/public/saved_queries/form/use_saved_query_form.tsx diff --git a/x-pack/plugins/osquery/public/saved_queries/index.tsx b/x-pack/platform/plugins/shared/osquery/public/saved_queries/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/saved_queries/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/saved_queries/index.tsx diff --git a/x-pack/plugins/osquery/public/saved_queries/saved_queries_dropdown.tsx b/x-pack/platform/plugins/shared/osquery/public/saved_queries/saved_queries_dropdown.tsx similarity index 100% rename from x-pack/plugins/osquery/public/saved_queries/saved_queries_dropdown.tsx rename to x-pack/platform/plugins/shared/osquery/public/saved_queries/saved_queries_dropdown.tsx diff --git a/x-pack/plugins/osquery/public/saved_queries/saved_query_flyout.tsx b/x-pack/platform/plugins/shared/osquery/public/saved_queries/saved_query_flyout.tsx similarity index 100% rename from x-pack/plugins/osquery/public/saved_queries/saved_query_flyout.tsx rename to x-pack/platform/plugins/shared/osquery/public/saved_queries/saved_query_flyout.tsx diff --git a/x-pack/plugins/osquery/public/saved_queries/use_create_saved_query.ts b/x-pack/platform/plugins/shared/osquery/public/saved_queries/use_create_saved_query.ts similarity index 100% rename from x-pack/plugins/osquery/public/saved_queries/use_create_saved_query.ts rename to x-pack/platform/plugins/shared/osquery/public/saved_queries/use_create_saved_query.ts diff --git a/x-pack/plugins/osquery/public/saved_queries/use_delete_saved_query.ts b/x-pack/platform/plugins/shared/osquery/public/saved_queries/use_delete_saved_query.ts similarity index 100% rename from x-pack/plugins/osquery/public/saved_queries/use_delete_saved_query.ts rename to x-pack/platform/plugins/shared/osquery/public/saved_queries/use_delete_saved_query.ts diff --git a/x-pack/plugins/osquery/public/saved_queries/use_saved_queries.ts b/x-pack/platform/plugins/shared/osquery/public/saved_queries/use_saved_queries.ts similarity index 100% rename from x-pack/plugins/osquery/public/saved_queries/use_saved_queries.ts rename to x-pack/platform/plugins/shared/osquery/public/saved_queries/use_saved_queries.ts diff --git a/x-pack/plugins/osquery/public/saved_queries/use_saved_query.ts b/x-pack/platform/plugins/shared/osquery/public/saved_queries/use_saved_query.ts similarity index 100% rename from x-pack/plugins/osquery/public/saved_queries/use_saved_query.ts rename to x-pack/platform/plugins/shared/osquery/public/saved_queries/use_saved_query.ts diff --git a/x-pack/plugins/osquery/public/saved_queries/use_update_saved_query.ts b/x-pack/platform/plugins/shared/osquery/public/saved_queries/use_update_saved_query.ts similarity index 100% rename from x-pack/plugins/osquery/public/saved_queries/use_update_saved_query.ts rename to x-pack/platform/plugins/shared/osquery/public/saved_queries/use_update_saved_query.ts diff --git a/x-pack/plugins/osquery/public/shared_components/attachments/external_reference.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/attachments/external_reference.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/attachments/external_reference.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/attachments/external_reference.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/attachments/external_references_content.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/attachments/external_references_content.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/attachments/external_references_content.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/attachments/external_references_content.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/attachments/lazy_external_reference_content.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/attachments/lazy_external_reference_content.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/attachments/lazy_external_reference_content.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/attachments/lazy_external_reference_content.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/attachments/pack_queries_attachment_wrapper.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/attachments/pack_queries_attachment_wrapper.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/attachments/pack_queries_attachment_wrapper.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/attachments/pack_queries_attachment_wrapper.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/index.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/index.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/lazy_live_query_field.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/lazy_live_query_field.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/lazy_live_query_field.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/lazy_live_query_field.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/lazy_osquery_action.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/lazy_osquery_action.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/lazy_osquery_action.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/lazy_osquery_action.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/lazy_osquery_action_params_form.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/lazy_osquery_action_params_form.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/lazy_osquery_action_params_form.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/lazy_osquery_action_params_form.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/lazy_osquery_result.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/lazy_osquery_result.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/lazy_osquery_result.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/lazy_osquery_result.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/lazy_osquery_results.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/lazy_osquery_results.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/lazy_osquery_results.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/lazy_osquery_results.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_action/index.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_action/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/osquery_action/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_action/index.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_action/osquery_action.test.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_action/osquery_action.test.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/osquery_action/osquery_action.test.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_action/osquery_action.test.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_action/translations.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_action/translations.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/osquery_action/translations.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_action/translations.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_action/use_is_osquery_available_simple.test.ts b/x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_action/use_is_osquery_available_simple.test.ts similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/osquery_action/use_is_osquery_available_simple.test.ts rename to x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_action/use_is_osquery_available_simple.test.ts diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_action/use_is_osquery_available_simple.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_action/use_is_osquery_available_simple.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/osquery_action/use_is_osquery_available_simple.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_action/use_is_osquery_available_simple.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_response_action_type/index.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_response_action_type/index.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/osquery_response_action_type/index.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_response_action_type/index.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_response_action_type/pack_field_wrapper.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_response_action_type/pack_field_wrapper.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/osquery_response_action_type/pack_field_wrapper.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_response_action_type/pack_field_wrapper.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_results/osquery_result.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_results/osquery_result.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result_wrapper.test.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_results/osquery_result_wrapper.test.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result_wrapper.test.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_results/osquery_result_wrapper.test.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result_wrapper.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_results/osquery_result_wrapper.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result_wrapper.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_results/osquery_result_wrapper.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.test.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_results/osquery_results.test.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.test.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_results/osquery_results.test.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_results/osquery_results.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_results/osquery_results.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/test_utils.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_results/test_utils.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/osquery_results/test_utils.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_results/test_utils.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/types.ts b/x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_results/types.ts similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/osquery_results/types.ts rename to x-pack/platform/plugins/shared/osquery/public/shared_components/osquery_results/types.ts diff --git a/x-pack/plugins/osquery/public/shared_components/prompts.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/prompts.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/prompts.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/prompts.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/services_wrapper.tsx b/x-pack/platform/plugins/shared/osquery/public/shared_components/services_wrapper.tsx similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/services_wrapper.tsx rename to x-pack/platform/plugins/shared/osquery/public/shared_components/services_wrapper.tsx diff --git a/x-pack/plugins/osquery/public/shared_components/use_is_osquery_available.ts b/x-pack/platform/plugins/shared/osquery/public/shared_components/use_is_osquery_available.ts similarity index 100% rename from x-pack/plugins/osquery/public/shared_components/use_is_osquery_available.ts rename to x-pack/platform/plugins/shared/osquery/public/shared_components/use_is_osquery_available.ts diff --git a/x-pack/plugins/osquery/public/shared_imports.ts b/x-pack/platform/plugins/shared/osquery/public/shared_imports.ts similarity index 100% rename from x-pack/plugins/osquery/public/shared_imports.ts rename to x-pack/platform/plugins/shared/osquery/public/shared_imports.ts diff --git a/x-pack/plugins/osquery/public/timelines/add_to_timeline_button.tsx b/x-pack/platform/plugins/shared/osquery/public/timelines/add_to_timeline_button.tsx similarity index 100% rename from x-pack/plugins/osquery/public/timelines/add_to_timeline_button.tsx rename to x-pack/platform/plugins/shared/osquery/public/timelines/add_to_timeline_button.tsx diff --git a/x-pack/plugins/osquery/public/types.ts b/x-pack/platform/plugins/shared/osquery/public/types.ts similarity index 100% rename from x-pack/plugins/osquery/public/types.ts rename to x-pack/platform/plugins/shared/osquery/public/types.ts diff --git a/x-pack/plugins/osquery/scripts/openapi/bundle.js b/x-pack/platform/plugins/shared/osquery/scripts/openapi/bundle.js similarity index 97% rename from x-pack/plugins/osquery/scripts/openapi/bundle.js rename to x-pack/platform/plugins/shared/osquery/scripts/openapi/bundle.js index 49594c2fa5ce2..d951852cf68b3 100644 --- a/x-pack/plugins/osquery/scripts/openapi/bundle.js +++ b/x-pack/platform/plugins/shared/osquery/scripts/openapi/bundle.js @@ -5,7 +5,7 @@ * 2.0. */ -require('../../../../../src/setup_node_env'); +require('../../../../../../../src/setup_node_env'); // eslint-disable-next-line @typescript-eslint/no-var-requires const { bundle } = require('@kbn/openapi-bundler'); // eslint-disable-next-line @typescript-eslint/no-var-requires diff --git a/x-pack/plugins/osquery/scripts/openapi/generate.js b/x-pack/platform/plugins/shared/osquery/scripts/openapi/generate.js similarity index 95% rename from x-pack/plugins/osquery/scripts/openapi/generate.js rename to x-pack/platform/plugins/shared/osquery/scripts/openapi/generate.js index 418b978973fa6..0aec6d9a93fae 100644 --- a/x-pack/plugins/osquery/scripts/openapi/generate.js +++ b/x-pack/platform/plugins/shared/osquery/scripts/openapi/generate.js @@ -5,7 +5,7 @@ * 2.0. */ -require('../../../../../src/setup_node_env'); +require('../../../../../../../src/setup_node_env'); // eslint-disable-next-line @typescript-eslint/no-var-requires const { generate } = require('@kbn/openapi-generator'); // eslint-disable-next-line @typescript-eslint/no-var-requires diff --git a/x-pack/plugins/osquery/scripts/readme.md b/x-pack/platform/plugins/shared/osquery/scripts/readme.md similarity index 100% rename from x-pack/plugins/osquery/scripts/readme.md rename to x-pack/platform/plugins/shared/osquery/scripts/readme.md diff --git a/x-pack/plugins/osquery/scripts/schema_formatter/ecs.js b/x-pack/platform/plugins/shared/osquery/scripts/schema_formatter/ecs.js similarity index 84% rename from x-pack/plugins/osquery/scripts/schema_formatter/ecs.js rename to x-pack/platform/plugins/shared/osquery/scripts/schema_formatter/ecs.js index 4628b0d452c37..8b931fc2ce440 100644 --- a/x-pack/plugins/osquery/scripts/schema_formatter/ecs.js +++ b/x-pack/platform/plugins/shared/osquery/scripts/schema_formatter/ecs.js @@ -5,5 +5,5 @@ * 2.0. */ -require('../../../../../src/setup_node_env'); +require('../../../../../../../src/setup_node_env'); require('./ecs_formatter'); diff --git a/x-pack/plugins/osquery/scripts/schema_formatter/ecs_formatter.ts b/x-pack/platform/plugins/shared/osquery/scripts/schema_formatter/ecs_formatter.ts similarity index 100% rename from x-pack/plugins/osquery/scripts/schema_formatter/ecs_formatter.ts rename to x-pack/platform/plugins/shared/osquery/scripts/schema_formatter/ecs_formatter.ts diff --git a/x-pack/plugins/osquery/scripts/schema_formatter/osquery.js b/x-pack/platform/plugins/shared/osquery/scripts/schema_formatter/osquery.js similarity index 84% rename from x-pack/plugins/osquery/scripts/schema_formatter/osquery.js rename to x-pack/platform/plugins/shared/osquery/scripts/schema_formatter/osquery.js index bac972aa2b22a..85216597d2a2e 100644 --- a/x-pack/plugins/osquery/scripts/schema_formatter/osquery.js +++ b/x-pack/platform/plugins/shared/osquery/scripts/schema_formatter/osquery.js @@ -5,5 +5,5 @@ * 2.0. */ -require('../../../../../src/setup_node_env'); +require('../../../../../../../src/setup_node_env'); require('./osquery_formatter'); diff --git a/x-pack/plugins/osquery/scripts/schema_formatter/osquery_formatter.ts b/x-pack/platform/plugins/shared/osquery/scripts/schema_formatter/osquery_formatter.ts similarity index 100% rename from x-pack/plugins/osquery/scripts/schema_formatter/osquery_formatter.ts rename to x-pack/platform/plugins/shared/osquery/scripts/schema_formatter/osquery_formatter.ts diff --git a/x-pack/plugins/osquery/server/common/error.ts b/x-pack/platform/plugins/shared/osquery/server/common/error.ts similarity index 100% rename from x-pack/plugins/osquery/server/common/error.ts rename to x-pack/platform/plugins/shared/osquery/server/common/error.ts diff --git a/x-pack/plugins/osquery/server/common/types.ts b/x-pack/platform/plugins/shared/osquery/server/common/types.ts similarity index 100% rename from x-pack/plugins/osquery/server/common/types.ts rename to x-pack/platform/plugins/shared/osquery/server/common/types.ts diff --git a/x-pack/plugins/osquery/server/create_config.ts b/x-pack/platform/plugins/shared/osquery/server/create_config.ts similarity index 100% rename from x-pack/plugins/osquery/server/create_config.ts rename to x-pack/platform/plugins/shared/osquery/server/create_config.ts diff --git a/x-pack/plugins/osquery/server/create_data_views/index.ts b/x-pack/platform/plugins/shared/osquery/server/create_data_views/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/create_data_views/index.ts rename to x-pack/platform/plugins/shared/osquery/server/create_data_views/index.ts diff --git a/x-pack/plugins/osquery/server/create_indices/action_responses_mapping.ts b/x-pack/platform/plugins/shared/osquery/server/create_indices/action_responses_mapping.ts similarity index 100% rename from x-pack/plugins/osquery/server/create_indices/action_responses_mapping.ts rename to x-pack/platform/plugins/shared/osquery/server/create_indices/action_responses_mapping.ts diff --git a/x-pack/plugins/osquery/server/create_indices/actions_mapping.ts b/x-pack/platform/plugins/shared/osquery/server/create_indices/actions_mapping.ts similarity index 100% rename from x-pack/plugins/osquery/server/create_indices/actions_mapping.ts rename to x-pack/platform/plugins/shared/osquery/server/create_indices/actions_mapping.ts diff --git a/x-pack/plugins/osquery/server/create_indices/create_transforms_indices.ts b/x-pack/platform/plugins/shared/osquery/server/create_indices/create_transforms_indices.ts similarity index 100% rename from x-pack/plugins/osquery/server/create_indices/create_transforms_indices.ts rename to x-pack/platform/plugins/shared/osquery/server/create_indices/create_transforms_indices.ts diff --git a/x-pack/plugins/osquery/server/create_transforms/action_responses_transform.ts b/x-pack/platform/plugins/shared/osquery/server/create_transforms/action_responses_transform.ts similarity index 100% rename from x-pack/plugins/osquery/server/create_transforms/action_responses_transform.ts rename to x-pack/platform/plugins/shared/osquery/server/create_transforms/action_responses_transform.ts diff --git a/x-pack/plugins/osquery/server/create_transforms/create_transforms.test.ts b/x-pack/platform/plugins/shared/osquery/server/create_transforms/create_transforms.test.ts similarity index 100% rename from x-pack/plugins/osquery/server/create_transforms/create_transforms.test.ts rename to x-pack/platform/plugins/shared/osquery/server/create_transforms/create_transforms.test.ts diff --git a/x-pack/plugins/osquery/server/create_transforms/create_transforms.ts b/x-pack/platform/plugins/shared/osquery/server/create_transforms/create_transforms.ts similarity index 100% rename from x-pack/plugins/osquery/server/create_transforms/create_transforms.ts rename to x-pack/platform/plugins/shared/osquery/server/create_transforms/create_transforms.ts diff --git a/x-pack/plugins/osquery/server/handlers/action/create_action_handler.ts b/x-pack/platform/plugins/shared/osquery/server/handlers/action/create_action_handler.ts similarity index 100% rename from x-pack/plugins/osquery/server/handlers/action/create_action_handler.ts rename to x-pack/platform/plugins/shared/osquery/server/handlers/action/create_action_handler.ts diff --git a/x-pack/plugins/osquery/server/handlers/action/create_action_service.ts b/x-pack/platform/plugins/shared/osquery/server/handlers/action/create_action_service.ts similarity index 100% rename from x-pack/plugins/osquery/server/handlers/action/create_action_service.ts rename to x-pack/platform/plugins/shared/osquery/server/handlers/action/create_action_service.ts diff --git a/x-pack/plugins/osquery/server/handlers/action/create_queries.test.ts b/x-pack/platform/plugins/shared/osquery/server/handlers/action/create_queries.test.ts similarity index 100% rename from x-pack/plugins/osquery/server/handlers/action/create_queries.test.ts rename to x-pack/platform/plugins/shared/osquery/server/handlers/action/create_queries.test.ts diff --git a/x-pack/plugins/osquery/server/handlers/action/create_queries.ts b/x-pack/platform/plugins/shared/osquery/server/handlers/action/create_queries.ts similarity index 100% rename from x-pack/plugins/osquery/server/handlers/action/create_queries.ts rename to x-pack/platform/plugins/shared/osquery/server/handlers/action/create_queries.ts diff --git a/x-pack/plugins/osquery/server/handlers/action/index.ts b/x-pack/platform/plugins/shared/osquery/server/handlers/action/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/handlers/action/index.ts rename to x-pack/platform/plugins/shared/osquery/server/handlers/action/index.ts diff --git a/x-pack/plugins/osquery/server/handlers/action/validate_license.ts b/x-pack/platform/plugins/shared/osquery/server/handlers/action/validate_license.ts similarity index 100% rename from x-pack/plugins/osquery/server/handlers/action/validate_license.ts rename to x-pack/platform/plugins/shared/osquery/server/handlers/action/validate_license.ts diff --git a/x-pack/plugins/osquery/server/handlers/index.ts b/x-pack/platform/plugins/shared/osquery/server/handlers/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/handlers/index.ts rename to x-pack/platform/plugins/shared/osquery/server/handlers/index.ts diff --git a/x-pack/plugins/osquery/server/index.ts b/x-pack/platform/plugins/shared/osquery/server/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/index.ts rename to x-pack/platform/plugins/shared/osquery/server/index.ts diff --git a/x-pack/plugins/osquery/server/lib/fleet_integration.ts b/x-pack/platform/plugins/shared/osquery/server/lib/fleet_integration.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/fleet_integration.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/fleet_integration.ts diff --git a/x-pack/plugins/osquery/server/lib/osquery_app_context_services.ts b/x-pack/platform/plugins/shared/osquery/server/lib/osquery_app_context_services.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/osquery_app_context_services.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/osquery_app_context_services.ts diff --git a/x-pack/plugins/osquery/server/lib/parse_agent_groups.test.ts b/x-pack/platform/plugins/shared/osquery/server/lib/parse_agent_groups.test.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/parse_agent_groups.test.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/parse_agent_groups.test.ts diff --git a/x-pack/plugins/osquery/server/lib/parse_agent_groups.ts b/x-pack/platform/plugins/shared/osquery/server/lib/parse_agent_groups.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/parse_agent_groups.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/parse_agent_groups.ts diff --git a/x-pack/plugins/osquery/server/lib/saved_query/saved_object_mappings.ts b/x-pack/platform/plugins/shared/osquery/server/lib/saved_query/saved_object_mappings.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/saved_query/saved_object_mappings.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/saved_query/saved_object_mappings.ts diff --git a/x-pack/plugins/osquery/server/lib/saved_query/saved_object_model_versions.ts b/x-pack/platform/plugins/shared/osquery/server/lib/saved_query/saved_object_model_versions.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/saved_query/saved_object_model_versions.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/saved_query/saved_object_model_versions.ts diff --git a/x-pack/plugins/osquery/server/lib/telemetry/__mocks__/index.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/__mocks__/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/telemetry/__mocks__/index.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/telemetry/__mocks__/index.ts diff --git a/x-pack/plugins/osquery/server/lib/telemetry/constants.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/constants.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/telemetry/constants.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/telemetry/constants.ts diff --git a/x-pack/plugins/osquery/server/lib/telemetry/filters.test.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/filters.test.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/telemetry/filters.test.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/telemetry/filters.test.ts diff --git a/x-pack/plugins/osquery/server/lib/telemetry/filters.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/filters.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/telemetry/filters.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/telemetry/filters.ts diff --git a/x-pack/plugins/osquery/server/lib/telemetry/helpers.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/helpers.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/telemetry/helpers.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/telemetry/helpers.ts diff --git a/x-pack/plugins/osquery/server/lib/telemetry/receiver.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/receiver.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/telemetry/receiver.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/telemetry/receiver.ts diff --git a/x-pack/plugins/osquery/server/lib/telemetry/sender.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/sender.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/telemetry/sender.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/telemetry/sender.ts diff --git a/x-pack/plugins/osquery/server/lib/telemetry/task.test.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/task.test.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/telemetry/task.test.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/telemetry/task.test.ts diff --git a/x-pack/plugins/osquery/server/lib/telemetry/task.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/task.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/telemetry/task.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/telemetry/task.ts diff --git a/x-pack/plugins/osquery/server/lib/telemetry/task_state.test.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/task_state.test.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/telemetry/task_state.test.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/telemetry/task_state.test.ts diff --git a/x-pack/plugins/osquery/server/lib/telemetry/task_state.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/task_state.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/telemetry/task_state.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/telemetry/task_state.ts diff --git a/x-pack/plugins/osquery/server/lib/telemetry/tasks/configs.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/tasks/configs.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/telemetry/tasks/configs.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/telemetry/tasks/configs.ts diff --git a/x-pack/plugins/osquery/server/lib/telemetry/tasks/index.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/tasks/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/telemetry/tasks/index.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/telemetry/tasks/index.ts diff --git a/x-pack/plugins/osquery/server/lib/telemetry/tasks/packs.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/tasks/packs.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/telemetry/tasks/packs.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/telemetry/tasks/packs.ts diff --git a/x-pack/plugins/osquery/server/lib/telemetry/tasks/saved_queries.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/tasks/saved_queries.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/telemetry/tasks/saved_queries.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/telemetry/tasks/saved_queries.ts diff --git a/x-pack/plugins/osquery/server/lib/telemetry/types.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/types.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/telemetry/types.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/telemetry/types.ts diff --git a/x-pack/plugins/osquery/server/lib/update_global_packs.ts b/x-pack/platform/plugins/shared/osquery/server/lib/update_global_packs.ts similarity index 100% rename from x-pack/plugins/osquery/server/lib/update_global_packs.ts rename to x-pack/platform/plugins/shared/osquery/server/lib/update_global_packs.ts diff --git a/x-pack/plugins/osquery/server/plugin.ts b/x-pack/platform/plugins/shared/osquery/server/plugin.ts similarity index 100% rename from x-pack/plugins/osquery/server/plugin.ts rename to x-pack/platform/plugins/shared/osquery/server/plugin.ts diff --git a/x-pack/plugins/osquery/server/routes/asset/get_assets_status_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/asset/get_assets_status_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/asset/get_assets_status_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/asset/get_assets_status_route.ts diff --git a/x-pack/plugins/osquery/server/routes/asset/index.ts b/x-pack/platform/plugins/shared/osquery/server/routes/asset/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/asset/index.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/asset/index.ts diff --git a/x-pack/plugins/osquery/server/routes/asset/update_assets_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/asset/update_assets_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/asset/update_assets_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/asset/update_assets_route.ts diff --git a/x-pack/plugins/osquery/server/routes/asset/utils.ts b/x-pack/platform/plugins/shared/osquery/server/routes/asset/utils.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/asset/utils.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/asset/utils.ts diff --git a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_details.ts b/x-pack/platform/plugins/shared/osquery/server/routes/fleet_wrapper/get_agent_details.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_details.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/fleet_wrapper/get_agent_details.ts diff --git a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_policies.ts b/x-pack/platform/plugins/shared/osquery/server/routes/fleet_wrapper/get_agent_policies.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_policies.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/fleet_wrapper/get_agent_policies.ts diff --git a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_policy.ts b/x-pack/platform/plugins/shared/osquery/server/routes/fleet_wrapper/get_agent_policy.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_policy.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/fleet_wrapper/get_agent_policy.ts diff --git a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_status_for_agent_policy.ts b/x-pack/platform/plugins/shared/osquery/server/routes/fleet_wrapper/get_agent_status_for_agent_policy.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_status_for_agent_policy.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/fleet_wrapper/get_agent_status_for_agent_policy.ts diff --git a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agents.ts b/x-pack/platform/plugins/shared/osquery/server/routes/fleet_wrapper/get_agents.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agents.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/fleet_wrapper/get_agents.ts diff --git a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_package_policies.ts b/x-pack/platform/plugins/shared/osquery/server/routes/fleet_wrapper/get_package_policies.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/fleet_wrapper/get_package_policies.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/fleet_wrapper/get_package_policies.ts diff --git a/x-pack/plugins/osquery/server/routes/fleet_wrapper/index.ts b/x-pack/platform/plugins/shared/osquery/server/routes/fleet_wrapper/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/fleet_wrapper/index.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/fleet_wrapper/index.ts diff --git a/x-pack/plugins/osquery/server/routes/index.ts b/x-pack/platform/plugins/shared/osquery/server/routes/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/index.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/index.ts diff --git a/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/live_query/create_live_query_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/live_query/create_live_query_route.ts diff --git a/x-pack/plugins/osquery/server/routes/live_query/find_live_query_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/live_query/find_live_query_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/live_query/find_live_query_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/live_query/find_live_query_route.ts diff --git a/x-pack/plugins/osquery/server/routes/live_query/get_live_query_details_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/live_query/get_live_query_details_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/live_query/get_live_query_details_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/live_query/get_live_query_details_route.ts diff --git a/x-pack/plugins/osquery/server/routes/live_query/get_live_query_results_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/live_query/get_live_query_results_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/live_query/get_live_query_results_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/live_query/get_live_query_results_route.ts diff --git a/x-pack/plugins/osquery/server/routes/live_query/index.ts b/x-pack/platform/plugins/shared/osquery/server/routes/live_query/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/live_query/index.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/live_query/index.ts diff --git a/x-pack/plugins/osquery/server/routes/live_query/osquery_parser.ts b/x-pack/platform/plugins/shared/osquery/server/routes/live_query/osquery_parser.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/live_query/osquery_parser.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/live_query/osquery_parser.ts diff --git a/x-pack/plugins/osquery/server/routes/live_query/utils.ts b/x-pack/platform/plugins/shared/osquery/server/routes/live_query/utils.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/live_query/utils.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/live_query/utils.ts diff --git a/x-pack/plugins/osquery/server/routes/pack/create_pack_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/pack/create_pack_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/pack/create_pack_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/pack/create_pack_route.ts diff --git a/x-pack/plugins/osquery/server/routes/pack/delete_pack_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/pack/delete_pack_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/pack/delete_pack_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/pack/delete_pack_route.ts diff --git a/x-pack/plugins/osquery/server/routes/pack/find_pack_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/pack/find_pack_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/pack/find_pack_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/pack/find_pack_route.ts diff --git a/x-pack/plugins/osquery/server/routes/pack/index.ts b/x-pack/platform/plugins/shared/osquery/server/routes/pack/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/pack/index.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/pack/index.ts diff --git a/x-pack/plugins/osquery/server/routes/pack/read_pack_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/pack/read_pack_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/pack/read_pack_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/pack/read_pack_route.ts diff --git a/x-pack/plugins/osquery/server/routes/pack/types.ts b/x-pack/platform/plugins/shared/osquery/server/routes/pack/types.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/pack/types.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/pack/types.ts diff --git a/x-pack/plugins/osquery/server/routes/pack/update_pack_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/pack/update_pack_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/pack/update_pack_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/pack/update_pack_route.ts diff --git a/x-pack/plugins/osquery/server/routes/pack/utils.test.ts b/x-pack/platform/plugins/shared/osquery/server/routes/pack/utils.test.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/pack/utils.test.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/pack/utils.test.ts diff --git a/x-pack/plugins/osquery/server/routes/pack/utils.ts b/x-pack/platform/plugins/shared/osquery/server/routes/pack/utils.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/pack/utils.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/pack/utils.ts diff --git a/x-pack/plugins/osquery/server/routes/privileges_check/index.ts b/x-pack/platform/plugins/shared/osquery/server/routes/privileges_check/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/privileges_check/index.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/privileges_check/index.ts diff --git a/x-pack/plugins/osquery/server/routes/privileges_check/privileges_check_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/privileges_check/privileges_check_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/privileges_check/privileges_check_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/privileges_check/privileges_check_route.ts diff --git a/x-pack/plugins/osquery/server/routes/saved_query/create_saved_query_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/saved_query/create_saved_query_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/saved_query/create_saved_query_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/saved_query/create_saved_query_route.ts diff --git a/x-pack/plugins/osquery/server/routes/saved_query/delete_saved_query_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/saved_query/delete_saved_query_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/saved_query/delete_saved_query_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/saved_query/delete_saved_query_route.ts diff --git a/x-pack/plugins/osquery/server/routes/saved_query/find_saved_query_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/saved_query/find_saved_query_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/saved_query/find_saved_query_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/saved_query/find_saved_query_route.ts diff --git a/x-pack/plugins/osquery/server/routes/saved_query/index.ts b/x-pack/platform/plugins/shared/osquery/server/routes/saved_query/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/saved_query/index.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/saved_query/index.ts diff --git a/x-pack/plugins/osquery/server/routes/saved_query/read_saved_query_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/saved_query/read_saved_query_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/saved_query/read_saved_query_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/saved_query/read_saved_query_route.ts diff --git a/x-pack/plugins/osquery/server/routes/saved_query/types.ts b/x-pack/platform/plugins/shared/osquery/server/routes/saved_query/types.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/saved_query/types.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/saved_query/types.ts diff --git a/x-pack/plugins/osquery/server/routes/saved_query/update_saved_query_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/saved_query/update_saved_query_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/saved_query/update_saved_query_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/saved_query/update_saved_query_route.ts diff --git a/x-pack/plugins/osquery/server/routes/saved_query/utils.ts b/x-pack/platform/plugins/shared/osquery/server/routes/saved_query/utils.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/saved_query/utils.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/saved_query/utils.ts diff --git a/x-pack/plugins/osquery/server/routes/status/create_status_route.ts b/x-pack/platform/plugins/shared/osquery/server/routes/status/create_status_route.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/status/create_status_route.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/status/create_status_route.ts diff --git a/x-pack/plugins/osquery/server/routes/status/index.ts b/x-pack/platform/plugins/shared/osquery/server/routes/status/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/status/index.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/status/index.ts diff --git a/x-pack/plugins/osquery/server/routes/utils.ts b/x-pack/platform/plugins/shared/osquery/server/routes/utils.ts similarity index 100% rename from x-pack/plugins/osquery/server/routes/utils.ts rename to x-pack/platform/plugins/shared/osquery/server/routes/utils.ts diff --git a/x-pack/plugins/osquery/server/saved_objects.ts b/x-pack/platform/plugins/shared/osquery/server/saved_objects.ts similarity index 100% rename from x-pack/plugins/osquery/server/saved_objects.ts rename to x-pack/platform/plugins/shared/osquery/server/saved_objects.ts diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/all/index.ts b/x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/actions/all/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/all/index.ts rename to x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/actions/all/index.ts diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/all/query.all_actions.dsl.ts b/x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/actions/all/query.all_actions.dsl.ts similarity index 100% rename from x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/all/query.all_actions.dsl.ts rename to x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/actions/all/query.all_actions.dsl.ts diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/details/index.ts b/x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/actions/details/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/details/index.ts rename to x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/actions/details/index.ts diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/details/query.action_details.dsl.ts b/x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/actions/details/query.action_details.dsl.ts similarity index 100% rename from x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/details/query.action_details.dsl.ts rename to x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/actions/details/query.action_details.dsl.ts diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/index.ts b/x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/actions/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/index.ts rename to x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/actions/index.ts diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/index.ts b/x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/actions/results/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/index.ts rename to x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/actions/results/index.ts diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/query.action_results.dsl.ts b/x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/actions/results/query.action_results.dsl.ts similarity index 100% rename from x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/query.action_results.dsl.ts rename to x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/actions/results/query.action_results.dsl.ts diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/index.ts b/x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/search_strategy/osquery/factory/index.ts rename to x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/index.ts diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/results/index.ts b/x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/results/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/search_strategy/osquery/factory/results/index.ts rename to x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/results/index.ts diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/results/query.all_results.dsl.ts b/x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/results/query.all_results.dsl.ts similarity index 100% rename from x-pack/plugins/osquery/server/search_strategy/osquery/factory/results/query.all_results.dsl.ts rename to x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/results/query.all_results.dsl.ts diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/types.ts b/x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/types.ts similarity index 100% rename from x-pack/plugins/osquery/server/search_strategy/osquery/factory/types.ts rename to x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/factory/types.ts diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/index.ts b/x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/index.ts similarity index 100% rename from x-pack/plugins/osquery/server/search_strategy/osquery/index.ts rename to x-pack/platform/plugins/shared/osquery/server/search_strategy/osquery/index.ts diff --git a/x-pack/plugins/osquery/server/types.ts b/x-pack/platform/plugins/shared/osquery/server/types.ts similarity index 100% rename from x-pack/plugins/osquery/server/types.ts rename to x-pack/platform/plugins/shared/osquery/server/types.ts diff --git a/x-pack/plugins/osquery/server/utils/build_query.ts b/x-pack/platform/plugins/shared/osquery/server/utils/build_query.ts similarity index 100% rename from x-pack/plugins/osquery/server/utils/build_query.ts rename to x-pack/platform/plugins/shared/osquery/server/utils/build_query.ts diff --git a/x-pack/plugins/osquery/server/utils/build_validation/route_validation.test.ts b/x-pack/platform/plugins/shared/osquery/server/utils/build_validation/route_validation.test.ts similarity index 100% rename from x-pack/plugins/osquery/server/utils/build_validation/route_validation.test.ts rename to x-pack/platform/plugins/shared/osquery/server/utils/build_validation/route_validation.test.ts diff --git a/x-pack/plugins/osquery/server/utils/build_validation/route_validation.ts b/x-pack/platform/plugins/shared/osquery/server/utils/build_validation/route_validation.ts similarity index 100% rename from x-pack/plugins/osquery/server/utils/build_validation/route_validation.ts rename to x-pack/platform/plugins/shared/osquery/server/utils/build_validation/route_validation.ts diff --git a/x-pack/plugins/osquery/server/utils/register_features.ts b/x-pack/platform/plugins/shared/osquery/server/utils/register_features.ts similarity index 100% rename from x-pack/plugins/osquery/server/utils/register_features.ts rename to x-pack/platform/plugins/shared/osquery/server/utils/register_features.ts diff --git a/x-pack/plugins/osquery/server/utils/runtime_types.ts b/x-pack/platform/plugins/shared/osquery/server/utils/runtime_types.ts similarity index 100% rename from x-pack/plugins/osquery/server/utils/runtime_types.ts rename to x-pack/platform/plugins/shared/osquery/server/utils/runtime_types.ts diff --git a/x-pack/plugins/osquery/server/utils/upgrade_integration.ts b/x-pack/platform/plugins/shared/osquery/server/utils/upgrade_integration.ts similarity index 100% rename from x-pack/plugins/osquery/server/utils/upgrade_integration.ts rename to x-pack/platform/plugins/shared/osquery/server/utils/upgrade_integration.ts diff --git a/x-pack/plugins/osquery/tsconfig.json b/x-pack/platform/plugins/shared/osquery/tsconfig.json similarity index 93% rename from x-pack/plugins/osquery/tsconfig.json rename to x-pack/platform/plugins/shared/osquery/tsconfig.json index 141683d7e500f..848f946e38a2c 100644 --- a/x-pack/plugins/osquery/tsconfig.json +++ b/x-pack/platform/plugins/shared/osquery/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types" }, @@ -11,13 +11,13 @@ "scripts/**/*", "scripts/**/**.json", "server/**/*", - "../../../typings/**/*", + "../../../../../typings/**/*", // ECS and Osquery schema files "public/common/schemas/*/**.json" ], "kbn_references": [ "@kbn/core", - { "path": "../../../src/setup_node_env/tsconfig.json" }, + { "path": "../../../../../src/setup_node_env/tsconfig.json" }, // add references to other TypeScript projects the plugin depends on // requiredPlugins from ./kibana.json diff --git a/x-pack/plugins/osquery/cypress/reporter_config.json b/x-pack/plugins/osquery/cypress/reporter_config.json deleted file mode 100644 index c472bd0bb643e..0000000000000 --- a/x-pack/plugins/osquery/cypress/reporter_config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "reporterEnabled": "mochawesome, mocha-junit-reporter", - "reporterOptions": { - "html": false, - "json": true, - "mochaFile": "../../../target/kibana-osquery/cypress/results/TEST-osquery-cypress-[hash].xml", - "overwrite": false, - "reportDir": "../../../target/kibana-osquery/cypress/results" - } -} diff --git a/x-pack/plugins/osquery/package.json b/x-pack/plugins/osquery/package.json deleted file mode 100644 index f6dac0fd15c02..0000000000000 --- a/x-pack/plugins/osquery/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "author": "Elastic", - "name": "@kbn/osquery-plugin", - "version": "1.0.0", - "private": true, - "license": "Elastic License 2.0", - "scripts": { - "cypress:burn": "yarn cypress:run --env burn=2 --headed", - "cypress:changed-specs-only": "yarn cypress:run --changed-specs-only --env burn=2", - "cypress": "NODE_OPTIONS=--openssl-legacy-provider node ../security_solution/scripts/start_cypress_parallel --config-file ../osquery/cypress/cypress.config.ts --ftr-config-file ../../../x-pack/test/osquery_cypress/cli_config", - "cypress:open": "yarn cypress open", - "cypress:run": "yarn cypress run", - "cypress:serverless": "NODE_OPTIONS=--openssl-legacy-provider node ../security_solution/scripts/start_cypress_parallel --config-file ../osquery/cypress/serverless_cypress.config.ts --ftr-config-file ../../../x-pack/test/osquery_cypress/serverless_cli_config", - "cypress:serverless:open": "yarn cypress:serverless open", - "cypress:serverless:run": "yarn cypress:serverless run", - "cypress:qa:serverless": "NODE_OPTIONS=--openssl-legacy-provider node ../security_solution/scripts/start_cypress_parallel_serverless --config-file ../osquery/cypress/serverless_cypress_qa.config.ts --onBeforeHook ../../test/osquery_cypress/runner_qa.ts", - "cypress:qa:serverless:run": "yarn cypress:qa:serverless run", - "nyc": "../../../node_modules/.bin/nyc report --reporter=text-summary", - "junit:merge": "../../../node_modules/.bin/mochawesome-merge ../../../target/kibana-osquery/cypress/results/mochawesome*.json > ../../../target/kibana-osquery/cypress/results/output.json && ../../../node_modules/.bin/marge ../../../target/kibana-osquery/cypress/results/output.json --reportDir ../../../target/kibana-osquery/cypress/results && yarn junit:transform && mkdir -p ../../../target/junit && cp ../../../target/kibana-osquery/cypress/results/*.xml ../../../target/junit/", - "junit:transform": "node ../security_solution/scripts/junit_transformer --pathPattern '../../../target/kibana-osquery/cypress/results/*.xml' --rootDirectory ../../../ --reportName 'Osquery Cypress' --writeInPlace", - "openapi:generate": "node scripts/openapi/generate", - "openapi:bundle": "node scripts/openapi/bundle" - } -} diff --git a/x-pack/plugins/security_solution/docs/openapi/README.md b/x-pack/plugins/security_solution/docs/openapi/README.md index fd145ed8c292b..1d42cd4075e05 100644 --- a/x-pack/plugins/security_solution/docs/openapi/README.md +++ b/x-pack/plugins/security_solution/docs/openapi/README.md @@ -57,8 +57,8 @@ Security Solution has multiple API domains scattered across Kibana. Currently th - Security Osquery - - Bundling script: `x-pack/plugins/osquery/scripts/openapi/bundle.js` - - Bundles location: `x-pack/plugins/osquery/docs/openapi/{ess|serverless}` + - Bundling script: `x-pack/platform/plugins/shared/osquery/scripts/openapi/bundle.js` + - Bundles location: `x-pack/platform/plugins/shared/osquery/docs/openapi/{ess|serverless}` - Security Timeline diff --git a/yarn.lock b/yarn.lock index 9cfdb256b430f..b65cb52e50975 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4006,7 +4006,7 @@ version "0.0.0" uid "" -"@kbn/avc-banner@link:packages/kbn-avc-banner": +"@kbn/avc-banner@link:src/platform/packages/shared/kbn-avc-banner": version "0.0.0" uid "" @@ -6542,7 +6542,7 @@ version "0.0.0" uid "" -"@kbn/osquery-plugin@link:x-pack/plugins/osquery": +"@kbn/osquery-plugin@link:x-pack/platform/plugins/shared/osquery": version "0.0.0" uid ""