Skip to content

Commit

Permalink
Merge branch 'main' into ELS-158
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Aug 16, 2023
2 parents c93eb6e + 75d27ad commit 4e3723e
Show file tree
Hide file tree
Showing 330 changed files with 6,212 additions and 2,920 deletions.
13 changes: 12 additions & 1 deletion .buildkite/pipelines/pull_request/security_solution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,15 @@ steps:
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-security-solution/**/*"
- "target/kibana-security-solution/**/*"

- command: .buildkite/scripts/steps/functional/security_solution_burn.sh
label: 'Security Solution Cypress tests, burning changed specs'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
parallelism: 1
soft_fail: true
artifact_paths:
- "target/kibana-security-solution/**/*"
53 changes: 27 additions & 26 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -823,12 +823,13 @@ packages/kbn-yarn-lock-validator @elastic/kibana-operations
/x-pack/test/stack_functional_integration/apps/management/_index_pattern_create.js @elastic/kibana-data-discovery
/x-pack/test/upgrade/apps/discover @elastic/kibana-data-discovery

# Vis Editors
# Visualizations
/src/plugins/visualize/ @elastic/kibana-visualizations
/x-pack/test/functional/apps/lens @elastic/kibana-visualizations
/x-pack/test/api_integration/apis/lens/ @elastic/kibana-visualizations
/test/functional/apps/visualize/ @elastic/kibana-visualizations
/x-pack/test/functional/apps/graph @elastic/kibana-visualizations
/test/api_integraion/apis/event_annotations @elastic/kibana-visualizations

# Global Experience

Expand Down Expand Up @@ -1157,15 +1158,12 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/plugins/stack_connectors/common/sentinelone @elastic/security-defend-workflows

## Security Solution sub teams - Detection Rule Management
/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema @elastic/security-detection-rule-management @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/api/detection_engine/fleet_integrations @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema @elastic/security-detection-rule-management @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/api/detection_engine/prebuilt_rules @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/common/api/detection_engine/rule_management @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/common/detection_engine/fleet_integrations @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/common/detection_engine/prebuilt_rules @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/common/detection_engine/rule_management @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/common/detection_engine/rule_monitoring @elastic/security-detection-rule-management

/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules @elastic/security-detection-rule-management
/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management @elastic/security-detection-rule-management
Expand Down Expand Up @@ -1196,24 +1194,37 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/server/lib/detection_engine/rule_schema @elastic/security-detection-rule-management @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/utils @elastic/security-detection-rule-management

/x-pack/plugins/security_solution/scripts/openapi @elastic/security-detection-rule-management

## Security Solution sub teams - Detection Engine

/x-pack/plugins/security_solution/common/api/detection_engine @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/api/detection_engine/alert_tags @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/api/detection_engine/index_management @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/api/detection_engine/model/alerts @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/api/detection_engine/rule_exceptions @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/api/detection_engine/rule_preview @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/api/detection_engine/signals @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/api/detection_engine/signals_migration @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/cti @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/field_maps @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/risk_engine @elastic/security-detection-engine

/x-pack/plugins/security_solution/public/common/components/sourcerer @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/detections/pages/alerts @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/entity_analytics @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/exceptions @elastic/security-detection-engine

/x-pack/plugins/security_solution/server/lib/detection_engine/migrations @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/lib/sourcerer @elastic/security-detection-engine

/x-pack/test/security_solution_cypress/cypress/e2e/data_sources @elastic/security-detection-engine
/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation @elastic/security-detection-engine
Expand All @@ -1222,40 +1233,26 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/test/security_solution_cypress/cypress/e2e/exceptions @elastic/security-detection-engine
/x-pack/test/security_solution_cypress/cypress/e2e/overview @elastic/security-detection-engine

/x-pack/plugins/security_solution/common/detection_engine/rule_exceptions @elastic/security-detection-engine

/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions_ui @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/common/components/exceptions @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/exceptions @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/common/components/sourcerer @elastic/security-detection-engine

/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/lib/sourcerer @elastic/security-detection-engine

## Security Threat Intelligence - Under Security Platform
/x-pack/plugins/security_solution/public/common/components/threat_match @elastic/security-detection-engine

## Security Solution cross teams ownership
/x-pack/test/security_solution_cypress/cypress/fixtures @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/test/security_solution_cypress/cypress/helpers @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/test/security_solution_cypress/cypress/e2e/detection_rules @elastic/security-detection-rule-management @elastic/security-detection-engine
/x-pack/test/security_solution_cypress/cypress/objects @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/test/security_solution_cypress/cypress/plugins @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/test/security_solution_cypress/cypress/screens/common @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/test/security_solution_cypress/cypress/support @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/test/security_solution_cypress/cypress/urls @elastic/security-threat-hunting-investigations @elastic/security-detection-engine

/x-pack/plugins/security_solution/common/ecs @elastic/security-threat-hunting-investigations
/x-pack/plugins/security_solution/common/test @elastic/security-detection-rule-management @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/test @elastic/security-detections-response @elastic/security-threat-hunting

/x-pack/plugins/security_solution/public/common/components/callouts @elastic/security-detections-response
/x-pack/plugins/security_solution/public/common/components/hover_actions @elastic/security-threat-hunting-explore @elastic/security-threat-hunting-investigations

/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions @elastic/security-detection-engine @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/server/routes @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/plugins/security_solution/server/utils @elastic/security-detections-response @elastic/security-threat-hunting

## Security Solution sub teams - security-defend-workflows
/x-pack/plugins/security_solution/public/management/ @elastic/security-defend-workflows
Expand Down Expand Up @@ -1283,7 +1280,11 @@ x-pack/plugins/security_solution/server/lib/telemetry/ @elastic/security-data-an

## Security Solution sub teams - security-engineering-productivity
x-pack/test/security_solution_cypress/cypress/README.md @elastic/security-engineering-productivity
x-pack/test/security_solution_cypress @elastic/security-engineering-productivity
x-pack/test/security_solution_cypress/es_archives @elastic/security-engineering-productivity
x-pack/test/security_solution_cypress/cli_config.ts @elastic/security-engineering-productivity
x-pack/test/security_solution_cypress/config.ts @elastic/security-engineering-productivity
x-pack/test/security_solution_cypress/runner.ts @elastic/security-engineering-productivity
x-pack/test/security_solution_cypress/serverless_config.ts @elastic/security-engineering-productivity

## Security Solution sub teams - adaptive-workload-protection
x-pack/plugins/security_solution/public/common/components/sessions_viewer @elastic/sec-cloudnative-integrations
Expand All @@ -1294,7 +1295,7 @@ x-pack/plugins/security_solution/public/threat_intelligence @elastic/protections
x-pack/test/threat_intelligence_cypress @elastic/protections-experience

# Security Defend Workflows - OSQuery Ownership
/x-pack/plugins/security_solution/common/detection_engine/rule_response_actions @elastic/security-defend-workflows
/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_response_actions @elastic/security-defend-workflows
/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions @elastic/security-defend-workflows
/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions @elastic/security-defend-workflows

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"@elastic/apm-rum-react": "^1.4.4",
"@elastic/charts": "59.1.0",
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "npm:@elastic/[email protected].0",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.9.1-canary.1",
"@elastic/ems-client": "8.4.0",
"@elastic/eui": "86.0.0",
"@elastic/filesaver": "1.1.2",
Expand Down Expand Up @@ -1355,7 +1355,7 @@
"@types/source-map-support": "^0.5.3",
"@types/stats-lite": "^2.2.0",
"@types/styled-components": "^5.1.0",
"@types/supertest": "^2.0.5",
"@types/supertest": "^2.0.12",
"@types/tapable": "^1.0.6",
"@types/tar": "^6.1.5",
"@types/tempy": "^0.2.0",
Expand Down Expand Up @@ -1537,8 +1537,8 @@
"style-loader": "^1.1.3",
"stylelint": "^14.9.1",
"stylelint-scss": "^4.3.0",
"superagent": "^3.8.2",
"supertest": "^3.1.0",
"superagent": "^8.1.2",
"supertest": "^6.3.3",
"supports-color": "^7.0.0",
"svgo": "^2.8.0",
"tape": "^5.0.1",
Expand Down
15 changes: 15 additions & 0 deletions packages/core/http/core-http-browser-internal/src/fetch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ describe('Fetch', () => {
const fetchInstance = new Fetch({
basePath: new BasePath(BASE_PATH),
kibanaVersion: 'VERSION',
buildNumber: 1234,
executionContext: executionContextMock,
});
afterEach(() => {
Expand Down Expand Up @@ -160,6 +161,7 @@ describe('Fetch', () => {
expect(fetchMock.lastOptions()!.headers).toMatchObject({
'content-type': 'application/json',
'kbn-version': 'VERSION',
'kbn-build-number': '1234',
'x-elastic-internal-origin': 'Kibana',
myheader: 'foo',
});
Expand All @@ -178,6 +180,19 @@ describe('Fetch', () => {
`"Invalid fetch headers, headers beginning with \\"kbn-\\" are not allowed: [kbn-version]"`
);
});
it('should not allow overwriting of kbn-build-number header', async () => {
fetchMock.get('*', {});
await expect(
fetchInstance.fetch('/my/path', {
headers: {
myHeader: 'foo',
'kbn-build-number': 4321,
},
})
).rejects.toThrowErrorMatchingInlineSnapshot(
`"Invalid fetch headers, headers beginning with \\"kbn-\\" are not allowed: [kbn-build-number]"`
);
});

it('should not allow overwriting of x-elastic-internal-origin header', async () => {
fetchMock.get('*', {});
Expand Down
2 changes: 2 additions & 0 deletions packages/core/http/core-http-browser-internal/src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { HttpInterceptHaltError } from './http_intercept_halt_error';
interface Params {
basePath: IBasePath;
kibanaVersion: string;
buildNumber: number;
executionContext: ExecutionContextSetup;
}

Expand Down Expand Up @@ -135,6 +136,7 @@ export class Fetch {
'Content-Type': 'application/json',
...options.headers,
'kbn-version': this.params.kibanaVersion,
'kbn-build-number': this.params.buildNumber,
[ELASTIC_HTTP_VERSION_HEADER]: version,
[X_ELASTIC_INTERNAL_ORIGIN_REQUEST]: 'Kibana',
...(!isEmpty(context) ? new ExecutionContextContainer(context).toHeader() : {}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ export class HttpService implements CoreService<HttpSetup, HttpStart> {

public setup({ injectedMetadata, fatalErrors, executionContext }: HttpDeps): HttpSetup {
const kibanaVersion = injectedMetadata.getKibanaVersion();
const buildNumber = injectedMetadata.getKibanaBuildNumber();
const basePath = new BasePath(
injectedMetadata.getBasePath(),
injectedMetadata.getServerBasePath(),
injectedMetadata.getPublicBaseUrl()
);

const fetchService = new Fetch({ basePath, kibanaVersion, executionContext });
const fetchService = new Fetch({ basePath, kibanaVersion, buildNumber, executionContext });
const loadingCount = this.loadingCount.setup({ fatalErrors });
loadingCount.addLoadingCountSource(fetchService.getRequestCount$());

Expand Down
5 changes: 5 additions & 0 deletions packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
connectorsConfluence: `${ENTERPRISE_SEARCH_DOCS}connectors-confluence.html`,
connectorsDropbox: `${ENTERPRISE_SEARCH_DOCS}connectors-dropbox.html`,
connectorsContentExtraction: `${ENTERPRISE_SEARCH_DOCS}connectors-content-extraction.html`,
connectorsGithub: `${ENTERPRISE_SEARCH_DOCS}connectors-github.html`,
connectorsGmail: `${ENTERPRISE_SEARCH_DOCS}connectors-gmail.html`,
connectorsGoogleCloudStorage: `${ENTERPRISE_SEARCH_DOCS}connectors-google-cloud.html`,
connectorsGoogleDrive: `${ENTERPRISE_SEARCH_DOCS}connectors-google-drive.html`,
connectorsJira: `${ENTERPRISE_SEARCH_DOCS}connectors-jira.html`,
Expand All @@ -146,12 +148,15 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
connectorsMySQL: `${ENTERPRISE_SEARCH_DOCS}connectors-mysql.html`,
connectorsNative: `${ENTERPRISE_SEARCH_DOCS}connectors.html#connectors-native`,
connectorsNetworkDrive: `${ENTERPRISE_SEARCH_DOCS}connectors-network-drive.html`,
connectorsOneDrive: `${ENTERPRISE_SEARCH_DOCS}connectors-onedrive.html`,
connectorsOracle: `${ENTERPRISE_SEARCH_DOCS}connectors-oracle.html`,
connectorsPostgreSQL: `${ENTERPRISE_SEARCH_DOCS}connectors-postgresql.html`,
connectorsS3: `${ENTERPRISE_SEARCH_DOCS}connectors-s3.html`,
connectorsSalesforce: `${ENTERPRISE_SEARCH_DOCS}connectors-salesforce.html`,
connectorsServiceNow: `${ENTERPRISE_SEARCH_DOCS}connectors-servicenow.html`,
connectorsSharepoint: `${ENTERPRISE_SEARCH_DOCS}connectors-sharepoint.html`,
connectorsSharepointOnline: `${ENTERPRISE_SEARCH_DOCS}connectors-sharepoint-online.html`,
connectorsSlack: `${ENTERPRISE_SEARCH_DOCS}connectors-slack.html`,
connectorsWorkplaceSearch: `${ENTERPRISE_SEARCH_DOCS}workplace-search-connectors.html`,
crawlerExtractionRules: `${ENTERPRISE_SEARCH_DOCS}crawler-extraction-rules.html`,
crawlerManaging: `${ENTERPRISE_SEARCH_DOCS}crawler-managing.html`,
Expand Down
5 changes: 5 additions & 0 deletions packages/kbn-doc-links/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,20 +122,25 @@ export interface DocLinks {
readonly connectorsConfluence: string;
readonly connectorsContentExtraction: string;
readonly connectorsDropbox: string;
readonly connectorsGithub: string;
readonly connectorsGoogleCloudStorage: string;
readonly connectorsGoogleDrive: string;
readonly connectorsGmail: string;
readonly connectorsJira: string;
readonly connectorsMicrosoftSQL: string;
readonly connectorsMongoDB: string;
readonly connectorsMySQL: string;
readonly connectorsNative: string;
readonly connectorsNetworkDrive: string;
readonly connectorsOneDrive: string;
readonly connectorsOracle: string;
readonly connectorsPostgreSQL: string;
readonly connectorsS3: string;
readonly connectorsSalesforce: string;
readonly connectorsServiceNow: string;
readonly connectorsSharepoint: string;
readonly connectorsSharepointOnline: string;
readonly connectorsSlack: string;
readonly connectorsWorkplaceSearch: string;
readonly crawlerExtractionRules: string;
readonly crawlerManaging: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { PersistedIndexPatternLayer } from '@kbn/lens-plugin/public';
import type { ReferenceBasedIndexPatternColumn } from '@kbn/lens-plugin/public/datasources/form_based/operations/definitions/column_types';
import type { StaticChartColumn, StaticValueConfig } from '../../../types';

export class ReferenceLineColumn implements StaticChartColumn {
export class StaticColumn implements StaticChartColumn {
constructor(private valueConfig: StaticValueConfig) {}

getValueConfig(): StaticValueConfig {
Expand Down
Loading

0 comments on commit 4e3723e

Please sign in to comment.