Skip to content

Commit 193fb18

Browse files
Merge branch 'main' into lens/2392-2
2 parents 73643f1 + ed36e2c commit 193fb18

1,064 files changed

Lines changed: 4067 additions & 1522 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
2+
apiVersion: backstage.io/v1alpha1
3+
kind: Resource
4+
metadata:
5+
name: bk-kibana-cspm-agentless-scout
6+
description: 'CSPM Agentless Scout E2E Tests - Cloud Security Posture Management agentless integration tests using Scout and Playwright'
7+
links:
8+
- url: 'https://buildkite.com/elastic/kibana-cspm-agentless-scout'
9+
title: Pipeline link
10+
spec:
11+
type: buildkite-pipeline
12+
system: buildkite
13+
owner: 'group:kibana-cloud-security-posture'
14+
implementation:
15+
apiVersion: buildkite.elastic.dev/v1
16+
kind: Pipeline
17+
metadata:
18+
name: kibana / CSPM Agentless Scout
19+
description: 'Runs CSPM Agentless E2E tests with Scout and Playwright for both Stateful and Serverless Security deployments'
20+
spec:
21+
env:
22+
SLACK_NOTIFICATIONS_CHANNEL: '#cloud-security-posture-ci'
23+
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'false'
24+
25+
allow_rebuilds: true
26+
branch_configuration: main
27+
default_branch: main
28+
repository: elastic/kibana
29+
pipeline_file: .buildkite/pipelines/cloud_security_posture/cspm_agentless_scout.yml
30+
provider_settings:
31+
build_branches: true
32+
build_pull_requests: true
33+
publish_commit_status: true
34+
prefix_pull_request_fork_branch_names: false
35+
skip_pull_request_builds_for_existing_commits: true
36+
trigger_mode: none
37+
filter_enabled: true
38+
filter_condition: >
39+
build.pull_request.id != null &&
40+
(
41+
build.pull_request.labels includes "ci:cloud-security-posture-scout" ||
42+
build.pull_request.base_branch == "main"
43+
)
44+
teams:
45+
kibana-operations:
46+
access_level: MANAGE_BUILD_AND_READ
47+
appex-qa:
48+
access_level: MANAGE_BUILD_AND_READ
49+
kibana-tech-leads:
50+
access_level: MANAGE_BUILD_AND_READ
51+
kibana-cloud-security-posture:
52+
access_level: MANAGE_BUILD_AND_READ
53+
everyone:
54+
access_level: BUILD_AND_READ
55+
tags:
56+
- kibana
57+
- cloud-security
58+
- scout
59+

.buildkite/pipeline-resource-definitions/kibana-node-glibc-217.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
SLACK_NOTIFICATIONS_CHANNEL: "#kibana-operations-alerts"
2323
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: "true"
2424
repository: elastic/kibana
25-
branch_configuration: main 9.3 9.2 9.1 8.19
25+
branch_configuration: main
2626
default_branch: main
2727
pipeline_file: ".buildkite/pipelines/node_glibc_217.yml"
2828
provider_settings:
@@ -31,18 +31,6 @@ spec:
3131
Daily run (main):
3232
branch: main
3333
cronline: "@daily"
34-
Daily run (9.3):
35-
branch: '9.3'
36-
cronline: "@daily"
37-
Daily run (9.2):
38-
branch: '9.2'
39-
cronline: "@daily"
40-
Daily run (9.1):
41-
branch: '9.1'
42-
cronline: "@daily"
43-
Daily run (8.19):
44-
branch: '8.19'
45-
cronline: "@daily"
4634
teams:
4735
kibana-operations:
4836
access_level: MANAGE_BUILD_AND_READ

.buildkite/pipeline-resource-definitions/locations.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ metadata:
77
spec:
88
type: url
99
targets:
10+
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/cloud-security-posture/cspm-agentless-scout.yml
1011
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-agent-builder-smoke-tests-daily.yml
1112
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-api-docs.yml
1213
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-apis-capacity-testing-daily.yml
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
env:
2+
IGNORE_SHIP_CI_STATS_ERROR: 'true'
3+
steps:
4+
- command: .buildkite/scripts/lifecycle/pre_build.sh
5+
label: Pre-Build
6+
timeout_in_minutes: 10
7+
agents:
8+
image: family/kibana-ubuntu-2404
9+
imageProject: elastic-images-prod
10+
provider: gcp
11+
machineType: n2-standard-2
12+
retry:
13+
automatic:
14+
- exit_status: '*'
15+
limit: 1
16+
17+
- wait
18+
19+
- command: .buildkite/scripts/steps/build_kibana.sh
20+
label: Build Kibana Distribution
21+
agents:
22+
image: family/kibana-ubuntu-2404
23+
imageProject: elastic-images-prod
24+
provider: gcp
25+
machineType: n2-standard-8
26+
preemptible: true
27+
key: build
28+
timeout_in_minutes: 60
29+
retry:
30+
automatic:
31+
- exit_status: '-1'
32+
limit: 3
33+
34+
- wait
35+
36+
- command: .buildkite/scripts/steps/test/cspm_agentless_scout.sh
37+
label: 'CSPM Agentless Scout E2E Tests'
38+
agents:
39+
image: family/kibana-ubuntu-2404
40+
imageProject: elastic-images-prod
41+
provider: gcp
42+
machineType: n2-standard-8
43+
preemptible: true
44+
depends_on: build
45+
timeout_in_minutes: 60
46+
retry:
47+
automatic:
48+
- exit_status: '-1'
49+
limit: 1
50+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
steps:
2+
- command: .buildkite/scripts/steps/test/cspm_agentless_scout.sh
3+
label: 'CSPM Agentless Scout E2E Tests'
4+
agents:
5+
machineType: n2-standard-8
6+
preemptible: true
7+
depends_on:
8+
- build
9+
- quick_checks
10+
- checks
11+
- linting
12+
- linting_with_types
13+
- check_types
14+
- check_oas_snapshot
15+
timeout_in_minutes: 60
16+
retry:
17+
automatic:
18+
- exit_status: '-1'
19+
limit: 1
20+

.buildkite/scripts/pipelines/pull_request/pipeline.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,21 @@ const SKIPPABLE_PR_MATCHERS = prConfig.skip_ci_on_only_changed!.map((r) => new R
468468
);
469469
}
470470

471+
if (
472+
(await doAnyChangesMatch([
473+
/^x-pack\/platform\/plugins\/shared\/fleet/,
474+
/^x-pack\/packages\/kbn-cloud-security-posture/,
475+
/^x-pack\/solutions\/security\/plugins\/cloud_security_posture/,
476+
/^x-pack\/solutions\/security\/plugins\/security_solution/,
477+
/^src\/platform\/packages\/shared\/kbn-scout\/src\/servers\/configs\/custom\/cspm_agentless/,
478+
])) ||
479+
GITHUB_PR_LABELS.includes('ci:cloud-security-posture-scout')
480+
) {
481+
pipeline.push(
482+
getPipeline('.buildkite/pipelines/pull_request/security_solution/cspm_agentless_scout.yml')
483+
);
484+
}
485+
471486
if (
472487
GITHUB_PR_LABELS.includes('ci:security-genai-run-evals') ||
473488
GITHUB_PR_LABELS.includes('ci:security-genai-run-evals-local-prompts')
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
# CSPM Agentless Scout E2E Tests
6+
# Runs Scout tests with custom server configuration for Cloud Security Posture Management (CSPM) agentless integrations
7+
8+
source .buildkite/scripts/steps/functional/common.sh
9+
10+
CONFIG_PATH="x-pack/solutions/security/plugins/cloud_security_posture/test/scout_cspm_agentless/ui/parallel.playwright.config.ts"
11+
12+
# Run modes for CSPM Agentless tests
13+
RUN_MODES="--stateful --serverless=security"
14+
15+
results=()
16+
failedConfigs=()
17+
18+
FINAL_EXIT_CODE=0
19+
20+
# Function to upload Scout events if available and clean up
21+
upload_events_if_available() {
22+
local mode="$1"
23+
24+
if [[ "${SCOUT_REPORTER_ENABLED:-}" =~ ^(1|true)$ ]]; then
25+
if [ -d ".scout/reports" ] && [ "$(ls -A .scout/reports 2>/dev/null)" ]; then
26+
echo "--- Upload Scout reporter events for CSPM Agentless ($mode)"
27+
set +e
28+
node scripts/scout upload-events --dontFailOnError
29+
UPLOAD_EXIT_CODE=$?
30+
set -e
31+
32+
if [[ $UPLOAD_EXIT_CODE -eq 0 ]]; then
33+
echo "Upload completed for CSPM Agentless ($mode)"
34+
else
35+
echo "Upload failed for CSPM Agentless ($mode) with exit code $UPLOAD_EXIT_CODE"
36+
fi
37+
38+
# Clean up events reports to avoid double ingestion, but preserve failure reports
39+
echo "Cleaning up Scout events reports (preserving failure reports for annotations)"
40+
if [ -d ".scout/reports" ]; then
41+
for dir in .scout/reports/scout-playwright-*; do
42+
if [ -d "$dir" ] && [[ "$dir" != *"scout-playwright-test-failures-"* ]]; then
43+
rm -rf "$dir"
44+
fi
45+
done
46+
fi
47+
else
48+
echo "No Scout reports found for CSPM Agentless ($mode)"
49+
fi
50+
fi
51+
}
52+
53+
echo "--- CSPM Agentless Scout Tests"
54+
echo "Config: $CONFIG_PATH"
55+
echo "Run modes: $RUN_MODES"
56+
57+
for mode in $RUN_MODES; do
58+
echo "--- Running CSPM Agentless tests: $mode"
59+
60+
start=$(date +%s)
61+
62+
# Prevent non-zero exit code from breaking the loop
63+
set +e
64+
node scripts/scout.js run-tests "$mode" --config "$CONFIG_PATH" --kibana-install-dir "$KIBANA_BUILD_LOCATION"
65+
EXIT_CODE=$?
66+
set -e
67+
68+
timeSec=$(($(date +%s)-start))
69+
if [[ $timeSec -gt 60 ]]; then
70+
min=$((timeSec/60))
71+
sec=$((timeSec-(min*60)))
72+
duration="${min}m ${sec}s"
73+
else
74+
duration="${timeSec}s"
75+
fi
76+
77+
if [[ $EXIT_CODE -eq 2 ]]; then
78+
# No tests found
79+
echo "No tests found for CSPM Agentless ($mode)"
80+
elif [[ $EXIT_CODE -ne 0 ]]; then
81+
# Test run failed
82+
upload_events_if_available "$mode"
83+
failedConfigs+=("CSPM Agentless ($mode)")
84+
FINAL_EXIT_CODE=10
85+
echo "Scout test exited with code $EXIT_CODE for CSPM Agentless ($mode)"
86+
echo "^^^ +++"
87+
else
88+
# Test run was successful
89+
upload_events_if_available "$mode"
90+
results+=("CSPM Agentless ($mode) (${duration})")
91+
fi
92+
done
93+
94+
echo "--- CSPM Agentless Scout Tests: Summary"
95+
echo "Passed: ${#results[@]}"
96+
echo "Failed: ${#failedConfigs[@]}"
97+
98+
if [[ ${#results[@]} -gt 0 ]]; then
99+
echo "Successful tests:"
100+
printf '%s\n' "${results[@]}"
101+
fi
102+
103+
if [[ ${#failedConfigs[@]} -gt 0 ]]; then
104+
echo "Failed tests:"
105+
for config in "${failedConfigs[@]}"; do
106+
echo " $config"
107+
done
108+
fi
109+
110+
exit $FINAL_EXIT_CODE
111+

.eslintrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2595,6 +2595,12 @@ module.exports = {
25952595
message: "Platform tests should import only from '@kbn/scout'.",
25962596
},
25972597
],
2598+
patterns: [
2599+
{
2600+
group: ['@kbn/scout-*', '@playwright/test/**', 'playwright/**'],
2601+
message: "Platform tests should import only from '@kbn/scout'.",
2602+
},
2603+
],
25982604
},
25992605
],
26002606
},

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,6 +1232,7 @@ x-pack/solutions/security/plugins/cloud_security_posture @elastic/contextual-sec
12321232
x-pack/solutions/security/plugins/ecs_data_quality_dashboard @elastic/security-threat-hunting-investigations
12331233
x-pack/solutions/security/plugins/elastic_assistant @elastic/security-generative-ai
12341234
x-pack/solutions/security/plugins/elastic_assistant_shared_state @elastic/security-generative-ai
1235+
x-pack/solutions/security/plugins/entity_store @elastic/core-analysis
12351236
x-pack/solutions/security/plugins/kubernetes_security @elastic/kibana-cloud-security-posture
12361237
x-pack/solutions/security/plugins/lists @elastic/security-detection-engine
12371238
x-pack/solutions/security/plugins/security_solution @elastic/security-solution
@@ -2569,6 +2570,7 @@ x-pack/platform/test/api_integration/apis/entity_manager @elastic/core-analysis
25692570
x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store @elastic/core-analysis
25702571
x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/entity_store @elastic/core-analysis
25712572
x-pack/solutions/security/test/security_solution_api_integration/test_suites/entity_analytics/entity_store/ @elastic/core-analysis
2573+
x-pack/solutions/security/plugins/entity_store @elastic/core-analysis
25722574

25732575
## Security Solution sub teams - Threat Hunting
25742576

api_docs/actions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions
88
title: "actions"
99
image: https://source.unsplash.com/400x175/?github
1010
description: API docs for the actions plugin
11-
date: 2025-12-28
11+
date: 2025-12-30
1212
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
1313
---
1414
import actionsObj from './actions.devdocs.json';

0 commit comments

Comments
 (0)