diff --git a/.buildkite/ftr_configs.yml b/.buildkite/ftr_configs.yml index b0bc12488ea7..5abe469587f3 100644 --- a/.buildkite/ftr_configs.yml +++ b/.buildkite/ftr_configs.yml @@ -32,6 +32,7 @@ disabled: - x-pack/test/security_solution_cypress/response_ops_cli_config.ts - x-pack/test/security_solution_cypress/upgrade_config.ts - x-pack/test/security_solution_cypress/visual_config.ts + - x-pack/test/threat_intelligence_cypress/visual_config.ts - x-pack/test/functional_enterprise_search/with_host_configured.config.ts - x-pack/plugins/apm/ftr_e2e/ftr_config_open.ts - x-pack/plugins/apm/ftr_e2e/ftr_config_run.ts diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 16f86540a4de..d1f72aadb188 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -589,6 +589,12 @@ x-pack/plugins/session_view @elastic/awp-platform x-pack/plugins/security_solution/public/common/components/sessions_viewer @elastic/awp-platform x-pack/plugins/security_solution/public/kubernetes @elastic/awp-platform +## Security Solution sub teams - Protections Experience +x-pack/plugins/threat_intelligence @elastic/protections-experience +x-pack/plugins/security_solution/public/threat_intelligence @elastic/protections-experience +x-pack/test/threat_intelligence_cypress @elastic/protections-experience + + # Security Intelligence And Analytics /x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules @elastic/security-intelligence-analytics diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 041c0cee5735..d9b2c970b630 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -639,6 +639,10 @@ Documentation: https://www.elastic.co/guide/en/kibana/master/task-manager-produc |Gathers all usage collection, retrieving them from both: OSS and X-Pack plugins. +|{kib-repo}blob/{branch}/x-pack/plugins/threat_intelligence/README.md[threatIntelligence] +|Elastic Threat Intelligence makes it easy to analyze and investigate potential security threats by aggregating data from multiple sources in one place. You’ll be able to view data from all activated threat intelligence feeds and take action. + + |{kib-repo}blob/{branch}/x-pack/plugins/timelines/README.md[timelines] |Timelines is a plugin that provides a grid component with accompanying server side apis to help users identify events of interest and perform root cause analysis within Kibana. diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/packages/kbn-doc-links/src/get_doc_links.ts index 9f576cd1629d..e98929ce88f0 100644 --- a/packages/kbn-doc-links/src/get_doc_links.ts +++ b/packages/kbn-doc-links/src/get_doc_links.ts @@ -336,13 +336,13 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => { ruleApiOverview: `${SECURITY_SOLUTION_DOCS}rule-api-overview.html`, }, securitySolution: { - trustedApps: `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/trusted-apps-ov.html`, - eventFilters: `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/event-filters.html`, - blocklist: `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/blocklist.html`, + trustedApps: `${SECURITY_SOLUTION_DOCS}trusted-apps-ov.html`, + eventFilters: `${SECURITY_SOLUTION_DOCS}event-filters.html`, + blocklist: `${SECURITY_SOLUTION_DOCS}blocklist.html`, threatIntelInt: `${SECURITY_SOLUTION_DOCS}es-threat-intel-integrations.html`, policyResponseTroubleshooting: { - full_disk_access: `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/deploy-elastic-endpoint.html#enable-fda-endpoint`, - macos_system_ext: `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/deploy-elastic-endpoint.html#system-extension-endpoint`, + full_disk_access: `${SECURITY_SOLUTION_DOCS}deploy-elastic-endpoint.html#enable-fda-endpoint`, + macos_system_ext: `${SECURITY_SOLUTION_DOCS}deploy-elastic-endpoint.html#system-extension-endpoint`, }, }, query: { @@ -653,7 +653,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => { rustOverview: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/client/rust-api/${DOC_LINK_VERSION}/overview.html`, }, endpoints: { - troubleshooting: `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/ts-management.html#ts-endpoints`, + troubleshooting: `${SECURITY_SOLUTION_DOCS}ts-management.html#ts-endpoints`, }, legal: { privacyStatement: `${ELASTIC_WEBSITE_URL}legal/privacy-statement`, diff --git a/packages/kbn-doc-links/src/types.ts b/packages/kbn-doc-links/src/types.ts index 8a7a0e788cbc..bf3132a8c0e9 100644 --- a/packages/kbn-doc-links/src/types.ts +++ b/packages/kbn-doc-links/src/types.ts @@ -249,6 +249,7 @@ export interface DocLinks { full_disk_access: string; macos_system_ext: string; }; + readonly threatIntelInt: string; }; readonly query: { readonly eql: string; diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 174077ea2871..1044cae862fe 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -58,7 +58,7 @@ pageLoadAssetSize: telemetry: 51957 telemetryManagementSection: 38586 transform: 41007 - triggersActionsUi: 119000 #This is temporary. Check https://github.com/elastic/kibana/pull/130710#issuecomment-1119843458 & https://github.com/elastic/kibana/issues/130728 + triggersActionsUi: 119000 upgradeAssistant: 81241 urlForwarding: 32579 usageCollection: 39762 @@ -132,3 +132,4 @@ pageLoadAssetSize: expressionXY: 36000 kibanaUsageCollection: 16463 kubernetesSecurity: 77234 + threatIntelligence: 29195 diff --git a/src/dev/storybook/aliases.ts b/src/dev/storybook/aliases.ts index 7f9c46783412..89e78848a136 100644 --- a/src/dev/storybook/aliases.ts +++ b/src/dev/storybook/aliases.ts @@ -39,6 +39,7 @@ export const storybookAliases = { presentation: 'src/plugins/presentation_util/storybook', security_solution: 'x-pack/plugins/security_solution/.storybook', shared_ux: 'packages/kbn-shared-ux-storybook/src/config', + threat_intelligence: 'x-pack/plugins/threat_intelligence/.storybook', ui_actions_enhanced: 'src/plugins/ui_actions_enhanced/.storybook', unified_search: 'src/plugins/unified_search/.storybook', }; diff --git a/src/dev/typescript/projects.ts b/src/dev/typescript/projects.ts index a104b5a171d7..5f34bef2df51 100644 --- a/src/dev/typescript/projects.ts +++ b/src/dev/typescript/projects.ts @@ -66,21 +66,22 @@ export const PROJECTS = [ createProject('x-pack/plugins/fleet/cypress/tsconfig.json', { name: 'fleet/cypress', }), - createProject('x-pack/plugins/synthetics/e2e/tsconfig.json', { name: 'uptime/synthetics-e2e-tests', disableTypeCheck: true, }), - createProject('x-pack/plugins/ux/e2e/tsconfig.json', { name: 'ux/synthetics-e2e-tests', disableTypeCheck: true, }), - createProject('x-pack/plugins/observability/e2e/tsconfig.json', { name: 'observability/synthetics-e2e-tests', disableTypeCheck: true, }), + createProject('x-pack/plugins/threat_intelligence/cypress/tsconfig.json', { + name: 'threat_intelligence/cypress', + disableTypeCheck: true, + }), // Glob patterns to be all search at once ...findProjects([ diff --git a/tsconfig.base.json b/tsconfig.base.json index c1c1539e7b04..e314c1662420 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -407,6 +407,8 @@ "@kbn/task-manager-plugin/*": ["x-pack/plugins/task_manager/*"], "@kbn/telemetry-collection-xpack-plugin": ["x-pack/plugins/telemetry_collection_xpack"], "@kbn/telemetry-collection-xpack-plugin/*": ["x-pack/plugins/telemetry_collection_xpack/*"], + "@kbn/threat-intelligence-plugin": ["x-pack/plugins/threat_intelligence"], + "@kbn/threat-intelligence-plugin/*": ["x-pack/plugins/threat_intelligence/*"], "@kbn/timelines-plugin": ["x-pack/plugins/timelines"], "@kbn/timelines-plugin/*": ["x-pack/plugins/timelines/*"], "@kbn/transform-plugin": ["x-pack/plugins/transform"], diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index c15d92ff5798..c527e0a3d955 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -68,7 +68,8 @@ "xpack.urlDrilldown": "plugins/drilldowns/url_drilldown", "xpack.watcher": "plugins/watcher", "xpack.observability": "plugins/observability", - "xpack.banners": "plugins/banners" + "xpack.banners": "plugins/banners", + "xpack.threatIntelligence": "plugins/threat_intelligence" }, "exclude": ["examples"], "translations": [ diff --git a/x-pack/plugins/security_solution/common/constants.ts b/x-pack/plugins/security_solution/common/constants.ts index 6f4f1b9d03e1..4e39313eb455 100644 --- a/x-pack/plugins/security_solution/common/constants.ts +++ b/x-pack/plugins/security_solution/common/constants.ts @@ -81,11 +81,21 @@ export enum SecurityPageName { case = 'cases', // must match `CasesDeepLinkId.cases` caseConfigure = 'cases_configure', // must match `CasesDeepLinkId.casesConfigure` caseCreate = 'cases_create', // must match `CasesDeepLinkId.casesCreate` + /* + * Warning: Computed values are not permitted in an enum with string valued members + * All cloud security posture page names must match `CloudSecurityPosturePageId` in x-pack/plugins/cloud_security_posture/public/common/navigation/types.ts + */ + cloudSecurityPostureBenchmarks = 'cloud_security_posture-benchmarks', + cloudSecurityPostureDashboard = 'cloud_security_posture-dashboard', + cloudSecurityPostureFindings = 'cloud_security_posture-findings', + cloudSecurityPostureRules = 'cloud_security_posture-rules', + dashboardsLanding = 'dashboards', detections = 'detections', detectionAndResponse = 'detection_response', endpoints = 'endpoints', eventFilters = 'event_filters', exceptions = 'exceptions', + exploreLanding = 'explore', hostIsolationExceptions = 'host_isolation_exceptions', hosts = 'hosts', hostsAnomalies = 'hosts-anomalies', @@ -93,6 +103,7 @@ export enum SecurityPageName { hostsRisk = 'hosts-risk', hostsEvents = 'hosts-events', investigate = 'investigate', + kubernetes = 'kubernetes', landing = 'get_started', network = 'network', networkAnomalies = 'network-anomalies', @@ -100,11 +111,14 @@ export enum SecurityPageName { networkExternalAlerts = 'network-external_alerts', networkHttp = 'network-http', networkTls = 'network-tls', + noPage = '', overview = 'overview', policies = 'policy', responseActions = 'response_actions', rules = 'rules', rulesCreate = 'rules-create', + sessions = 'sessions', + threatIntelligence = 'threat-intelligence', timelines = 'timelines', timelinesTemplates = 'timelines-templates', trustedApps = 'trusted_apps', @@ -113,21 +127,8 @@ export enum SecurityPageName { usersAuthentications = 'users-authentications', usersAnomalies = 'users-anomalies', usersRisk = 'users-risk', - sessions = 'sessions', usersEvents = 'users-events', usersExternalAlerts = 'users-external_alerts', - kubernetes = 'kubernetes', - exploreLanding = 'explore', - dashboardsLanding = 'dashboards', - noPage = '', - /* - * Warning: Computed values are not permitted in an enum with string valued members - * All cloud security posture page names must match `CloudSecurityPosturePageId` in x-pack/plugins/cloud_security_posture/public/common/navigation/types.ts - */ - cloudSecurityPostureDashboard = 'cloud_security_posture-dashboard', - cloudSecurityPostureFindings = 'cloud_security_posture-findings', - cloudSecurityPostureBenchmarks = 'cloud_security_posture-benchmarks', - cloudSecurityPostureRules = 'cloud_security_posture-rules', } export const EXPLORE_PATH = '/explore' as const; @@ -156,6 +157,7 @@ export const HOST_ISOLATION_EXCEPTIONS_PATH = `${MANAGEMENT_PATH}/host_isolation_exceptions` as const; export const BLOCKLIST_PATH = `${MANAGEMENT_PATH}/blocklist` as const; export const RESPONSE_ACTIONS_PATH = `${MANAGEMENT_PATH}/response_actions` as const; +export const THREAT_INTELLIGENCE_PATH = '/threat_intelligence' as const; export const APP_OVERVIEW_PATH = `${APP_PATH}${OVERVIEW_PATH}` as const; export const APP_LANDING_PATH = `${APP_PATH}${LANDING_PATH}` as const; @@ -180,6 +182,7 @@ export const APP_HOST_ISOLATION_EXCEPTIONS_PATH = `${APP_PATH}${HOST_ISOLATION_EXCEPTIONS_PATH}` as const; export const APP_BLOCKLIST_PATH = `${APP_PATH}${BLOCKLIST_PATH}` as const; export const APP_RESPONSE_ACTIONS_PATH = `${APP_PATH}${RESPONSE_ACTIONS_PATH}` as const; +export const APP_THREAT_INTELLIGENCE_PATH = `${APP_PATH}${THREAT_INTELLIGENCE_PATH}` as const; // cloud logs to exclude from default index pattern export const EXCLUDE_ELASTIC_CLOUD_INDICES = ['-*elastic-cloud-logs-*']; diff --git a/x-pack/plugins/security_solution/kibana.json b/x-pack/plugins/security_solution/kibana.json index cf6ab94cf15b..3744f7ac4b6b 100644 --- a/x-pack/plugins/security_solution/kibana.json +++ b/x-pack/plugins/security_solution/kibana.json @@ -12,23 +12,24 @@ "actions", "alerting", "cases", + "cloudSecurityPosture", "data", "embeddable", "eventLog", "features", "inspector", + "kubernetesSecurity", "lens", "licensing", "maps", "ruleRegistry", "sessionView", "taskManager", + "threatIntelligence", "timelines", "triggersActionsUi", "uiActions", - "unifiedSearch", - "kubernetesSecurity", - "cloudSecurityPosture" + "unifiedSearch" ], "optionalPlugins": [ "encryptedSavedObjects", diff --git a/x-pack/plugins/security_solution/public/app/deep_links/index.ts b/x-pack/plugins/security_solution/public/app/deep_links/index.ts index 2060d21baaf9..5295ec1fd845 100644 --- a/x-pack/plugins/security_solution/public/app/deep_links/index.ts +++ b/x-pack/plugins/security_solution/public/app/deep_links/index.ts @@ -45,6 +45,7 @@ import { DASHBOARDS, CREATE_NEW_RULE, RESPONSE_ACTIONS, + THREAT_INTELLIGENCE, } from '../translations'; import { OVERVIEW_PATH, @@ -69,6 +70,7 @@ import { KUBERNETES_PATH, RULES_CREATE_PATH, RESPONSE_ACTIONS_PATH, + THREAT_INTELLIGENCE_PATH, } from '../../../common/constants'; import type { ExperimentalFeatures } from '../../../common/experimental_features'; import { hasCapabilities, subscribeAppLinks } from '../../common/links'; @@ -384,6 +386,17 @@ export const securitySolutionsDeepLinks: SecuritySolutionDeepLink[] = [ }, ], }, + { + id: SecurityPageName.threatIntelligence, + title: THREAT_INTELLIGENCE, + path: THREAT_INTELLIGENCE_PATH, + navLinkStatus: AppNavLinkStatus.hidden, + keywords: [ + i18n.translate('xpack.securitySolution.search.threatIntelligence', { + defaultMessage: 'Threat Intelligence', + }), + ], + }, { id: SecurityPageName.kubernetes, title: KUBERNETES, diff --git a/x-pack/plugins/security_solution/public/app/home/home_navigations.ts b/x-pack/plugins/security_solution/public/app/home/home_navigations.ts index 0d8795dcdf8a..d732135c5337 100644 --- a/x-pack/plugins/security_solution/public/app/home/home_navigations.ts +++ b/x-pack/plugins/security_solution/public/app/home/home_navigations.ts @@ -30,6 +30,7 @@ import { APP_KUBERNETES_PATH, APP_LANDING_PATH, APP_RESPONSE_ACTIONS_PATH, + APP_THREAT_INTELLIGENCE_PATH, } from '../../../common/constants'; export const navTabs: SecurityNav = { @@ -173,6 +174,13 @@ export const navTabs: SecurityNav = { disabled: false, urlKey: 'administration', }, + [SecurityPageName.threatIntelligence]: { + id: SecurityPageName.threatIntelligence, + name: i18n.THREAT_INTELLIGENCE, + href: APP_THREAT_INTELLIGENCE_PATH, + disabled: false, + urlKey: 'threat_intelligence', + }, }; export const securityNavGroup: SecurityNavGroup = { diff --git a/x-pack/plugins/security_solution/public/app/translations.ts b/x-pack/plugins/security_solution/public/app/translations.ts index a8817802bcb7..776df745b323 100644 --- a/x-pack/plugins/security_solution/public/app/translations.ts +++ b/x-pack/plugins/security_solution/public/app/translations.ts @@ -138,3 +138,10 @@ export const NO_PERMISSIONS_MSG = (subPluginKey: string) => export const NO_PERMISSIONS_TITLE = i18n.translate('xpack.securitySolution.noPermissionsTitle', { defaultMessage: 'Privileges required', }); + +export const THREAT_INTELLIGENCE = i18n.translate( + 'xpack.securitySolution.navigation.threatIntelligence', + { + defaultMessage: 'Threat Intelligence', + } +); diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/types.ts b/x-pack/plugins/security_solution/public/common/components/navigation/types.ts index 9c5fa4d0d15a..8980e367efe5 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/types.ts @@ -64,6 +64,7 @@ export const securityNavKeys = [ SecurityPageName.trustedApps, SecurityPageName.users, SecurityPageName.kubernetes, + SecurityPageName.threatIntelligence, ] as const; export type SecurityNavKey = typeof securityNavKeys[number]; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/__snapshots__/index.test.tsx.snap index 4da2600f3929..c02e7adbb6ea 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/__snapshots__/index.test.tsx.snap @@ -116,6 +116,16 @@ Object { "name": "Users", "onClick": [Function], }, + Object { + "data-href": "securitySolutionUI/threat-intelligence", + "data-test-subj": "navigation-threat-intelligence", + "disabled": false, + "href": "securitySolutionUI/threat-intelligence", + "id": "threat-intelligence", + "isSelected": false, + "name": "Threat Intelligence", + "onClick": [Function], + }, ], "name": "Explore", }, diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/use_navigation_items.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/use_navigation_items.tsx index 12223d904298..bb15fd45cef9 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/use_navigation_items.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/use_navigation_items.tsx @@ -109,6 +109,7 @@ function usePrimaryNavigationItemsToDisplay(navTabs: Record) { ...(navTabs[SecurityPageName.users] != null ? [navTabs[SecurityPageName.users]] : []), + navTabs[SecurityPageName.threatIntelligence], ], }, { diff --git a/x-pack/plugins/security_solution/public/common/components/url_state/constants.ts b/x-pack/plugins/security_solution/public/common/components/url_state/constants.ts index 6e421b57a90c..dfff0e8d4fe3 100644 --- a/x-pack/plugins/security_solution/public/common/components/url_state/constants.ts +++ b/x-pack/plugins/security_solution/public/common/components/url_state/constants.ts @@ -42,4 +42,5 @@ export type UrlStateType = | 'rules' | 'timeline' | 'explore' - | 'dashboards'; + | 'dashboards' + | 'threat_intelligence'; diff --git a/x-pack/plugins/security_solution/public/common/images/threat_intelligence.png b/x-pack/plugins/security_solution/public/common/images/threat_intelligence.png new file mode 100644 index 000000000000..53badc4b84b1 Binary files /dev/null and b/x-pack/plugins/security_solution/public/common/images/threat_intelligence.png differ diff --git a/x-pack/plugins/security_solution/public/landing_pages/links.ts b/x-pack/plugins/security_solution/public/landing_pages/links.ts index 5a9735480bc1..773e18b0271d 100644 --- a/x-pack/plugins/security_solution/public/landing_pages/links.ts +++ b/x-pack/plugins/security_solution/public/landing_pages/links.ts @@ -20,6 +20,7 @@ import { links as networkLinks } from '../network/links'; import { links as usersLinks } from '../users/links'; import { links as kubernetesLinks } from '../kubernetes/links'; import { dashboardLinks as cloudSecurityPostureLinks } from '../cloud_security_posture/links'; +import { links as threatIntelligenceLinks } from '../threat_intelligence/links'; export const dashboardsLandingLinks: LinkItem = { id: SecurityPageName.dashboardsLanding, @@ -50,7 +51,7 @@ export const threatHuntingLandingLinks: LinkItem = { defaultMessage: 'Explore', }), ], - links: [hostsLinks, networkLinks, usersLinks], + links: [hostsLinks, networkLinks, usersLinks, threatIntelligenceLinks], skipUrlState: true, hideTimeline: true, }; diff --git a/x-pack/plugins/security_solution/public/lazy_sub_plugins.tsx b/x-pack/plugins/security_solution/public/lazy_sub_plugins.tsx index 88b063dd037b..c6b8d37a5342 100644 --- a/x-pack/plugins/security_solution/public/lazy_sub_plugins.tsx +++ b/x-pack/plugins/security_solution/public/lazy_sub_plugins.tsx @@ -13,19 +13,17 @@ import { Cases } from './cases'; import { Detections } from './detections'; import { Exceptions } from './exceptions'; - import { Hosts } from './hosts'; import { Users } from './users'; import { Network } from './network'; import { Kubernetes } from './kubernetes'; import { Overview } from './overview'; import { Rules } from './rules'; - import { Timelines } from './timelines'; import { Management } from './management'; import { LandingPages } from './landing_pages'; - import { CloudSecurityPosture } from './cloud_security_posture'; +import { ThreatIntelligence } from './threat_intelligence'; /** * The classes used to instantiate the sub plugins. These are grouped into a single object for the sake of bundling them in a single dynamic import. @@ -38,12 +36,12 @@ const subPluginClasses = { Users, Network, Kubernetes, - Overview, Rules, Timelines, Management, LandingPages, CloudSecurityPosture, + ThreatIntelligence, }; export { subPluginClasses }; diff --git a/x-pack/plugins/security_solution/public/plugin.tsx b/x-pack/plugins/security_solution/public/plugin.tsx index f03a38817bf8..e7b92c5f5f75 100644 --- a/x-pack/plugins/security_solution/public/plugin.tsx +++ b/x-pack/plugins/security_solution/public/plugin.tsx @@ -331,6 +331,7 @@ export class Plugin implements IPlugin { + const services = useKibana().services; + const { threatIntelligence } = services; + const ThreatIntelligencePlugin = threatIntelligence.getComponent(); + + return ( + + + + + ); +}; + +export const ThreatIntelligencePage = React.memo(ThreatIntelligence); diff --git a/x-pack/plugins/security_solution/public/threat_intelligence/routes.tsx b/x-pack/plugins/security_solution/public/threat_intelligence/routes.tsx new file mode 100644 index 000000000000..65b1440c49d2 --- /dev/null +++ b/x-pack/plugins/security_solution/public/threat_intelligence/routes.tsx @@ -0,0 +1,25 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; +import { ThreatIntelligencePage } from './pages/threat_intelligence'; +import { SecurityPageName, THREAT_INTELLIGENCE_PATH } from '../../common/constants'; +import type { SecuritySubPluginRoutes } from '../app/types'; + +const ThreatIntelligenceRoutes = () => ( + + + +); + +export const routes: SecuritySubPluginRoutes = [ + { + path: THREAT_INTELLIGENCE_PATH, + render: ThreatIntelligenceRoutes, + }, +]; diff --git a/x-pack/plugins/security_solution/public/types.ts b/x-pack/plugins/security_solution/public/types.ts index bc6d71c04798..1104ff630b61 100644 --- a/x-pack/plugins/security_solution/public/types.ts +++ b/x-pack/plugins/security_solution/public/types.ts @@ -39,6 +39,7 @@ import type { SavedObjectsTaggingApi, SavedObjectTaggingOssPluginStart, } from '@kbn/saved-objects-tagging-oss-plugin/public'; +import type { ThreatIntelligencePluginStart } from '@kbn/threat-intelligence-plugin/public'; import type { ResolverPluginSetup } from './resolver/types'; import type { Inspect } from '../common/search_strategy'; import type { Detections } from './detections'; @@ -54,6 +55,7 @@ import type { Timelines } from './timelines'; import type { Management } from './management'; import type { LandingPages } from './landing_pages'; import type { CloudSecurityPosture } from './cloud_security_posture'; +import type { ThreatIntelligence } from './threat_intelligence'; export interface SetupPlugins { home?: HomePublicPluginSetup; @@ -87,6 +89,7 @@ export interface StartPlugins { osquery?: OsqueryPluginStart; security: SecurityPluginSetup; cloudSecurityPosture: CspClientPluginStart; + threatIntelligence: ThreatIntelligencePluginStart; } export interface StartPluginsDependencies extends StartPlugins { @@ -127,6 +130,7 @@ export interface SubPlugins { management: Management; landingPages: LandingPages; cloudSecurityPosture: CloudSecurityPosture; + threatIntelligence: ThreatIntelligence; } // TODO: find a better way to defined these types @@ -144,4 +148,5 @@ export interface StartedSubPlugins { management: ReturnType; landingPages: ReturnType; cloudSecurityPosture: ReturnType; + threatIntelligence: ReturnType; } diff --git a/x-pack/plugins/security_solution/tsconfig.json b/x-pack/plugins/security_solution/tsconfig.json index 0e1f49e52858..7a8d161ad062 100644 --- a/x-pack/plugins/security_solution/tsconfig.json +++ b/x-pack/plugins/security_solution/tsconfig.json @@ -32,19 +32,20 @@ { "path": "../actions/tsconfig.json" }, { "path": "../alerting/tsconfig.json" }, { "path": "../cases/tsconfig.json" }, + { "path": "../cloud_security_posture/tsconfig.json" }, { "path": "../encrypted_saved_objects/tsconfig.json" }, { "path": "../features/tsconfig.json" }, { "path": "../fleet/tsconfig.json" }, + { "path": "../kubernetes_security/tsconfig.json" }, { "path": "../licensing/tsconfig.json" }, { "path": "../lists/tsconfig.json" }, { "path": "../maps/tsconfig.json" }, { "path": "../ml/tsconfig.json" }, { "path": "../osquery/tsconfig.json" }, - { "path": "../spaces/tsconfig.json" }, - { "path": "../security/tsconfig.json" }, - { "path": "../timelines/tsconfig.json" }, { "path": "../session_view/tsconfig.json" }, - { "path": "../kubernetes_security/tsconfig.json" }, - { "path": "../cloud_security_posture/tsconfig.json" } + { "path": "../security/tsconfig.json" }, + { "path": "../spaces/tsconfig.json" }, + { "path": "../threat_intelligence/tsconfig.json" }, + { "path": "../timelines/tsconfig.json" } ] } diff --git a/x-pack/plugins/threat_intelligence/.storybook/main.js b/x-pack/plugins/threat_intelligence/.storybook/main.js new file mode 100644 index 000000000000..86b48c32f103 --- /dev/null +++ b/x-pack/plugins/threat_intelligence/.storybook/main.js @@ -0,0 +1,8 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +module.exports = require('@kbn/storybook').defaultConfig; diff --git a/x-pack/plugins/threat_intelligence/CONTRIBUTING.md b/x-pack/plugins/threat_intelligence/CONTRIBUTING.md new file mode 100644 index 000000000000..d27b26442e56 --- /dev/null +++ b/x-pack/plugins/threat_intelligence/CONTRIBUTING.md @@ -0,0 +1,135 @@ +# Contributing + +Before contributing to this plugin, make sure you read the [contributing guide for Kibana](https://github.com/elastic/kibana/blob/main/CONTRIBUTING.md), as well as the [STYLEGUIDE](https://github.com/elastic/kibana/blob/main/STYLEGUIDE.mdx) and [TYPESCRIPT](https://github.com/elastic/kibana/blob/main/TYPESCRIPT.md) md files.. + +> Kibana recommends working on a fork of the [elastic/kibana repository](https://github.com/elastic/kibana) (see [here](https://docs.github.com/en/get-started/quickstart/fork-a-repo) to learn about forks). + +> This plugin uses TypeScript, see Kibana's recommendation here. + +## Submitting a Pull Request (PR) + +Before you submit your PR, consider the following guidelines: + +1. Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add. + +2. Make your changes in a new git branch. + + ``` + git checkout -b my-branch main + ``` + +3. Commit your changes using a descriptive commit message that follows our commit message conventions: + + ``` + git commit -a + ``` + +4. Push your branch to GitHub: + + ``` + git push origin my-fix-branch + ``` + +5. In GitHub, create a PR. + + Note: If changes are suggested, then make the required updates, [rebase](https://hackernoon.com/git-merge-vs-rebase-whats-the-diff-76413c117333) your branch, and force push (this will update your PR): + + ``` + git rebase main -i + git push -f + ``` + +## Commit Message Guidelines + +> **Note:** These guidelines are **recommended - not mandatory**. + +### Commit Message Format + +Each commit message consists of a **header**, **body**, and **footer**. + +``` + + + + +