Skip to content

Commit

Permalink
Merge branch 'main' into elastic#8622
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwizp authored Mar 7, 2024
2 parents c99c3d5 + cad276f commit e7b775b
Show file tree
Hide file tree
Showing 1,383 changed files with 4,852 additions and 3,501 deletions.
4 changes: 2 additions & 2 deletions .buildkite/pipeline-resource-definitions/locations.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: backstage.io/v1alpha1
kind: Location
metadata:
name: kibana-buildkite-pipelines
name: kibana-buildkite-pipelines-list
description: This file points to individual buildkite pipeline definition files
spec:
type: url
targets:
- kibana-migration-staging.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-migration-staging.yml
61 changes: 14 additions & 47 deletions .buildkite/pipelines/security_solution/api_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ steps:
limit: 2

- label: Running rule_patch:essentials:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh rule_patch:essentials:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_patch:essentials:qa:serverless
key: rule_patch:essentials:qa:serverless
agents:
queue: n2-4-spot
Expand All @@ -169,7 +169,7 @@ steps:
- exit_status: '1'
limit: 2

- label: Running rule_update:qa:serverless
- label: Running rule_update:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_update:qa:serverless
key: rule_update:qa:serverless
agents:
Expand All @@ -181,7 +181,7 @@ steps:
limit: 2

- label: Running rule_update:essentials:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh rule_update:essentials:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_update:essentials:qa:serverless
key: rule_update:essentials:qa:serverless
agents:
queue: n2-4-spot
Expand All @@ -192,7 +192,7 @@ steps:
limit: 2

- label: Running rules_management:essentials:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh rules_management:essentials:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rules_management:essentials:qa:serverless
key: rules_management:essentials:qa:serverless
agents:
queue: n2-4-spot
Expand All @@ -202,19 +202,8 @@ steps:
- exit_status: '1'
limit: 2

- label: Running rule_management:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_management:qa:serverless
key: rule_management:qa:serverless
agents:
queue: n2-4-spot
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '1'
limit: 2

- label: Running prebuilt_rules_management:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh prebuilt_rules_management:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh prebuilt_rules_management:qa:serverless
key: prebuilt_rules_management:qa:serverless
agents:
queue: n2-4-spot
Expand All @@ -225,7 +214,7 @@ steps:
limit: 2

- label: Running prebuilt_rules_bundled_prebuilt_rules_package:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh prebuilt_rules_bundled_prebuilt_rules_package:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh prebuilt_rules_bundled_prebuilt_rules_package:qa:serverless
key: prebuilt_rules_bundled_prebuilt_rules_package:qa:serverless
agents:
queue: n2-4-spot
Expand All @@ -236,7 +225,7 @@ steps:
limit: 2

- label: Running prebuilt_rules_large_prebuilt_rules_package:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh prebuilt_rules_large_prebuilt_rules_package:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh prebuilt_rules_large_prebuilt_rules_package:qa:serverless
key: prebuilt_rules_large_prebuilt_rules_package:qa:serverless
agents:
queue: n2-4-spot
Expand All @@ -246,8 +235,8 @@ steps:
- exit_status: '1'
limit: 2

- label: Running prebuilt_rules_update_prebuilt_rules_package:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh prebuilt_rules_update_prebuilt_rules_package:qa:serverless
- label: Running prebuilt_rules_update_prebuilt_rules_package:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh prebuilt_rules_update_prebuilt_rules_package:qa:serverless
key: prebuilt_rules_update_prebuilt_rules_package:qa:serverless
agents:
queue: n2-4-spot
Expand All @@ -258,7 +247,7 @@ steps:
limit: 2

- label: Running rule_bulk_actions:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh rule_bulk_actions:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_bulk_actions:qa:serverless
key: rule_bulk_actions:qa:serverless
agents:
queue: n2-4-spot
Expand All @@ -269,7 +258,7 @@ steps:
limit: 2

- label: Running rule_read:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh rule_read:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_read:qa:serverless
key: rule_read:qa:serverless
agents:
queue: n2-4-spot
Expand All @@ -279,19 +268,8 @@ steps:
- exit_status: '1'
limit: 2

- label: Running rule_read:essentials:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh rule_read:essentials:qa:serverless
key: rule_read:essentials:qa:serverless
agents:
queue: n2-4-spot
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '1'
limit: 2

- label: Running rule_import_export:essentials:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh rule_import_export:essentials:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_import_export:essentials:qa:serverless
key: rule_import_export:essentials:qa:serverless
agents:
queue: n2-4-spot
Expand Down Expand Up @@ -324,19 +302,8 @@ steps:
- exit_status: '1'
limit: 2

- label: Running rule_read:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_read:qa:serverless
key: rule_read:qa:serverless
agents:
queue: n2-4-spot
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '1'
limit: 2

- label: Running rule_read:essentials:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh rule_read:essentials:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_read:essentials:qa:serverless
key: rule_read:essentials:qa:serverless
agents:
queue: n2-4-spot
Expand Down Expand Up @@ -380,7 +347,7 @@ steps:
limit: 2

- label: Running rule_delete:essentials:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh rule_delete:essentials:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh rule_delete:essentials:qa:serverless
key: rule_delete:essentials:qa:serverless
agents:
queue: n2-4-spot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ steps:
# - exit_status: '*'
# limit: 1

# - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:investigations
# label: 'Serverless MKI QA Investigations - Security Solution Cypress Tests'
# agents:
# queue: n2-4-spot
# # TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate.
# timeout_in_minutes: 300
# parallelism: 8
# retry:
# automatic:
# - exit_status: '*'
# limit: 1
- command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:investigations
label: 'Serverless MKI QA Investigations - Security Solution Cypress Tests'
agents:
queue: n2-4-spot
# TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate.
timeout_in_minutes: 300
parallelism: 8
retry:
automatic:
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:rule_management
label: 'Serverless MKI QA Rule Management - Security Solution Cypress Tests'
Expand Down
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,22 @@ module.exports = {
},
},

/**
* ML overrides
*/
{
files: [
'x-pack/plugins/aiops/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/data_visualizer/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/ml/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/transform/**/*.{js,mjs,ts,tsx}',
'x-pack/packages/ml/**/*.{js,mjs,ts,tsx}',
],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
},
},

/**
* Security Solution overrides. These rules below are maintained and owned by
* the people within the security-detection-engine team. Please see ping them
Expand Down
2 changes: 1 addition & 1 deletion catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ metadata:
description: A location re-routing file, pointing to individual buildkite pipeline definition files
spec:
type: url
location: .buildkite/pipeline-resource-definitions/locations.yml
target: https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/locations.yml

---

Expand Down
2 changes: 1 addition & 1 deletion docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ disable, set to `null`. *Default:* `"nosniff"`
Controls whether the https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy[`Referrer-Policy`] header is used in all
responses to the client from the {kib} server, and specifies what value is used. Allowed values are `no-referrer`,
`no-referrer-when-downgrade`, `origin`, `origin-when-cross-origin`, `same-origin`, `strict-origin`, `strict-origin-when-cross-origin`,
`unsafe-url`, or `null`. To disable, set to `null`. *Default:* `"no-referrer-when-downgrade"`
`unsafe-url`, or `null`. To disable, set to `null`. *Default:* `"strict-origin-when-cross-origin"`

[[server-securityResponseHeaders-permissionsPolicy]] `server.securityResponseHeaders.permissionsPolicy`::
experimental[] Controls whether the https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy[`Permissions-Policy`] header
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@
"pretty-ms": "6.0.0",
"prop-types": "^15.8.1",
"proxy-from-env": "1.0.0",
"puppeteer": "21.9.0",
"puppeteer": "22.3.0",
"query-string": "^6.13.2",
"rbush": "^3.0.1",
"re-resizable": "^6.9.9",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('parseRawSecurityResponseHeadersConfig', () => {
Object {
"Cross-Origin-Opener-Policy": "same-origin",
"Permissions-Policy": "camera=(), display-capture=(), fullscreen=(self), geolocation=(), microphone=(), web-share=()",
"Referrer-Policy": "no-referrer-when-downgrade",
"Referrer-Policy": "strict-origin-when-cross-origin",
"X-Content-Type-Options": "nosniff",
}
`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const securityResponseHeadersSchema = schema.object({
schema.literal('unsafe-url'),
schema.literal(null),
],
{ defaultValue: 'no-referrer-when-downgrade' }
{ defaultValue: 'strict-origin-when-cross-origin' }
),
permissionsPolicy: schema.oneOf([schema.string(), schema.literal(null)], {
// See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ describe('CoreUsageDataService', () => {
"crossOriginOpenerPolicy": "same-origin",
"disableEmbedding": false,
"permissionsPolicyConfigured": true,
"referrerPolicy": "no-referrer-when-downgrade",
"referrerPolicy": "strict-origin-when-cross-origin",
"strictTransportSecurity": "NULL",
"xContentTypeOptions": "nosniff",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,18 @@ describe('autocomplete', () => {
`from a | ${command} stringField, `,
getFieldNamesByType('any').filter((name) => name !== 'stringField')
);

testSuggestions(
`from a_index | eval round(numberField) + 1 | eval \`round(numberField) + 1\` + 1 | eval \`\`\`round(numberField) + 1\`\` + 1\` + 1 | eval \`\`\`\`\`\`\`round(numberField) + 1\`\`\`\` + 1\`\` + 1\` + 1 | eval \`\`\`\`\`\`\`\`\`\`\`\`\`\`\`round(numberField) + 1\`\`\`\`\`\`\`\` + 1\`\`\`\` + 1\`\` + 1\` + 1 | ${command} `,
[
...getFieldNamesByType('any'),
'`round(numberField) + 1`',
'```round(numberField) + 1`` + 1`',
'```````round(numberField) + 1```` + 1`` + 1`',
'```````````````round(numberField) + 1```````` + 1```` + 1`` + 1`',
'```````````````````````````````round(numberField) + 1```````````````` + 1```````` + 1```` + 1`` + 1`',
]
);
});
}

Expand Down Expand Up @@ -927,10 +939,7 @@ describe('autocomplete', () => {
[
'var0 =',
...getFieldNamesByType('any'),
// @TODO: leverage the location data to get the original text
// For now return back the trimmed version:
// the ANTLR parser trims all text so that's what it's stored in the AST
'`abs(numberField)+1`',
'`abs(numberField) + 1`',
...getFunctionSignaturesByReturnType('eval', 'any', { evalMath: true }),
],
' '
Expand Down
Loading

0 comments on commit e7b775b

Please sign in to comment.