Commit graph

85924 commits

Author SHA1 Message Date
Alejandro Fernández Haro
1c57ee2ee0 Merge branch 'main' of github.com:elastic/kibana into renovate/main-@elasticelasticsearch 2025-04-25 03:32:07 +02:00
elastic-renovate-prod[bot]
f4e529907d
Update dependency elasticsearch-8.x to v8.18.1 (main) (#213282)
Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Kurt <kc13greiner@users.noreply.github.com>
2025-04-25 03:08:28 +02:00
Alejandro Fernández Haro
3dc0d78b52 Fix types 2025-04-25 03:02:32 +02:00
Kevin Delemme
18826975c7
feat(slo): bulk delete APIs (#217405) 2025-04-24 20:11:26 -04:00
Graham Hudgins
ddaa9bacb9
Docs: fix broken links in CONTRIBUTING.md (#219158)
## Summary

Fixes a doc issue in CONTRIBUTING guide


### Checklist

N/A, repo doc only 

### Identify risks

None!
2025-04-24 17:25:00 -06:00
Jen Huang
cad38d6db3
[UII] Make output and fleet server non-editable for agentless policies (#218905)
## Summary

Resolves https://github.com/elastic/security-team/issues/10971.

This PR makes it so that on Cloud, agentless policies cannot move off of
the default managed Fleet Server host and ES output. This is done by:

- Explicitly writing `fleet_server_host_id` and `data_output_id` fields
to the agentless policy that is created when adding an agentless
integration
- On ECH, these are `fleet-default-fleet-server-host` and
`fleet-default-output` respectively
- On Serverless, these are `default-fleet-server` and
`es-default-output`
- During Fleet setup, agentless policies without these fields set up
correctly will be backfilled to the correct values

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-04-24 16:20:58 -07:00
Steph Milovic
fc0845256d
[AI4DSOC] Include all connector types (#219154) 2025-04-25 00:47:43 +02:00
Jon
fc226cc198
[quick checks/validate_pipelines] Fix list of changed files (#219150)
Fixes an issue where `validate_pipelines.sh` could attempt to validate a
pipeline file that does not exist.

The check was looking for changed files comparing `elastic/kibana/main`
and the pull request branch, where an out of date pull request could
return a changed file that was not modified in the pr branch.

See
https://buildkite.com/elastic/kibana-pull-request/builds/295938#019668ee-99f0-409e-bd7d-466e6293e982
2025-04-24 17:09:08 -05:00
Elena Shostak
442cf9b7be
Fixed actor name for detecting renovate bot PRs (#219140)
## Summary

Fixed actor name for detecting renovate bot PRs.
2025-04-24 17:01:30 -05:00
Rodney Norris
f7b28d7b5f
[Playground][Backend] Saving Playground CRUD (#217761)
## Summary

This PR creates CRUD endpoints for search playgrounds. This will enable
us to make new pages for saved playgrounds that are shared in a space.

## Notes 

Usages of `ALL_SAVED_OBJECT_INDICES` had to be updated to include
`ignore_unavailable` since a new index was added for search solution
saved objects, but these are not always registered when search plugins
are disabled. Because of this refresh and other calls using
`ALL_SAVED_OBJECT_INDICES` were failing when the new
`.kibana_search_solution` index did not exist.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-24 16:20:31 -05:00
Steph Milovic
bea20769c9
[AI4DSOC] Add eval tab to ai settings (#219155) 2025-04-24 23:13:00 +02:00
Drew Tate
c78aacf2da
[ES|QL] Clean up hover (#218486)
## Summary

The main change here is divorcing the hover code from the
`getAstContext` function which needs to change for
https://github.com/elastic/kibana/pull/218176 to move forward. The
`getAstContext` should just be a completion engine thing.

I also performed some ancillary cleanups including removing the
double-query-parse we had going on for function argument hints.

**Note to reviewers:** All tests are passing, but coverage is low so it
makes sense to test manually.

Some tests I did...

<img width="1346" alt="Screenshot 2025-04-16 at 12 47 36 PM"
src="https://github.com/user-attachments/assets/3d19f80c-6466-4f18-80b1-41b7fefe4350"
/>

_function name_

<img width="415" alt="Screenshot 2025-04-16 at 12 50 28 PM"
src="https://github.com/user-attachments/assets/aedb419f-a29c-496f-8cdc-2d7684335e6a"
/>

_function argument_


<img width="487" alt="Screenshot 2025-04-16 at 12 48 01 PM"
src="https://github.com/user-attachments/assets/d7b99825-0fb2-4c0c-96c8-269d45654e9d"
/>

_time vars_

<img width="337" alt="Screenshot 2025-04-16 at 12 47 23 PM"
src="https://github.com/user-attachments/assets/c4eea087-2195-4103-ac12-e6a84d14c650"
/>

_enrich mode_

<img width="454" alt="Screenshot 2025-04-16 at 12 47 13 PM"
src="https://github.com/user-attachments/assets/804d3af3-88bf-4e03-b8fc-8014789fda55"
/>

_enrich policy_


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-24 23:11:17 +02:00
Steph Milovic
43baac4e11
[AI4DSOC] Use new attack discovery API to populate AttackDiscoveryWidget in alert flyout (#219004) 2025-04-24 14:59:32 -06:00
elastic-renovate-prod[bot]
53f5459f42
Update dependency @launchdarkly/node-server-sdk to ^9.9.0 (main) (#219017)
Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-04-24 16:39:37 -04:00
Philippe Oberti
cc98975ced
[AI4DSOC] Remove Assistant icon from row action in alert summary table (#219141)
## Summary

During testing we discovered an issue related to the Assistant icon
displayed in the AI4DSOC alert summary page table.

The issue is related to the fact that the alert registers its context
with the assistant. When the assistant flyout is opened from the `Ask AI
assistant` button in the alert flyout, we have one flyout which means
one alert in the assistant. But with the Assistant icon shown on each
row of the table, we need to register context for each alert. That means
that x alert buttons equals to x alerts in the assistant.
This is how it translates in the UI:

![Screenshot 2025-04-24 at 12 54
50 PM](https://github.com/user-attachments/assets/d59b1cdd-ceef-499c-ba8c-55af38ea6bac)

Redesigning how the assistant context works is very involved and too
risky to do at such a late time.

This PR removes the Assistant button from the row actions, which solves
the issue:


https://github.com/user-attachments/assets/0fd94cc1-4fbd-4e70-9790-22e4913477ff

Also, @stephmilovic noticed that when the assistant is opened from a
different launch point than the suggested prompt, and the suggested
prompt is still in the DOM, its prompt context shows up empty:
<img width="600" alt="Screenshot 2025-04-24 at 11 41 23 AM"
src="https://github.com/user-attachments/assets/0ceb3ffc-72e5-425c-b550-9b8d5896f359"
/>
She resolved this by adding a check in the ContextPills component for
`description.length > 0`. This would be resolved by the on click issue,
so might be worth coming back to.
This change is visible in the second commit and stolen from [this
PR](https://github.com/elastic/kibana/pull/219144).

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

relates to https://github.com/elastic/security-team/issues/11973
2025-04-24 22:21:52 +02:00
Garrett Spong
821211d035
[AI4DSOC] Disable NLPCleanupTask for search_ai_lake tier (#219006)
## Summary

Updates the `NLPCleanupTask` added in
https://github.com/elastic/kibana/pull/175358 to behave the same as
`complete` for the new `search_ai_lake` tier as we don't want it
periodically running and cleaning up ELSER. The task will run once, and
disable itself if not in the correct tier.

An FTR test was also added to ensure expected behavior in the
`search_ai_lake` tier.

Note: we may want to update this task to still cleanup extraneous NLP
models that _are not_ ELSER, but this can be done in a future PR if
desired.
2025-04-24 14:03:05 -06:00
Michael Wolf
3a8bd29b2e
Osquery: Update exported fields reference for osquery 5.15.0 (#215619)
Update exported fields reference for osquery 5.15.0.
2025-04-24 19:21:38 +00:00
Philippe Oberti
e014955073
[AI4DSOC] Add cell renderer for datetime fields to the alert summary table (#219126)
## Summary

This PR improves the AI4DSOC alert summary table cell renderers by
rendering datetime type fields correctly. That way we have datetime
fields rendered the same way the alerts page alerts table does.

The code uses the `schema` field to know when a field needs to be
rendered accordingly. This field is provided by the EuiDataGrid.

Previous behavior

![Screenshot 2025-04-24 at 10 34
57 AM](https://github.com/user-attachments/assets/151f2b34-109e-4841-bba4-7630b7b53292)

New behavior

![Screenshot 2025-04-24 at 9 32
53 AM](https://github.com/user-attachments/assets/c06459b3-ee3e-42bf-8e69-252749830b82)

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

relates to https://github.com/elastic/security-team/issues/11973
2025-04-24 21:12:35 +02:00
Philippe Oberti
a1b749a796
[AI4DSOC] Disable CellActions and PreviewLinks on the Attack discovery page (#219033)
## Summary

This PR disabled the cell actions and the preview links on the Attack
discovery page for the AI4DSOC (searchLakeAI tier) effort.
For the first phase of AI4DSOC (at least for now) we do not have the
host, user, network... flyouts available, as the interactions between
those flyouts and the normal alert detail flyout are many.
Also, having the cell actions to filter in/out for example don't really
make sense at this time, as the other pages do not listen to these. It
would be confusing to the user to try to click on elements without any
actual actions being performed.

Before fix


https://github.com/user-attachments/assets/46be2f69-ad10-43a8-8c6b-7b56e231cf0b

After fix


https://github.com/user-attachments/assets/aeda65c1-f762-4696-b2fb-5837c6f06c54

## TODO

If the approach looks good to the @elastic/security-generative-ai team,
the following items needs to be done before merging:
- [ ] write unit tests
- [ ] create a ticket for the techdebt and link it in the code

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2025-04-24 20:45:20 +02:00
Bryce Buchanan
94b5851936
remove metrics and logs from get_service_stats api (#218346)
## Summary
Fixes https://github.com/elastic/kibana/issues/214564

This change prevents services only transmitting logs and metrics from
appearing in the service map.

A point of discussion:
With this change the service's 'focused service map' will be empty.
Should a placeholder node be added (no other nodes will be visible), or
should the service map for such services be hidden?

### Testing 
I tested this by using a Otel-instrumented service with EDOT and
disabled all Trace exports. You'll see that without this change, that
service will appear in the service map, and with this change applied, it
will not.

I've created a new synthtrace scenario that will generate the necessary
data to verify this change.
run the `otel_logs_and_metrics_only.ts` scenario for synthtrace, and a
service, named `otel-metrics-and-logs-only`, will be available in the
services inventory, but it will not appear in the service map, or the
focused service map for the service.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-04-24 11:20:46 -07:00
Mason Herron
4f32ae6a0e
[Fleet] Make YML editor expandable on package policy configuration (#218847)
## Summary

Closes #193387 

- Adds expand functionality when editing the YML on a package policy.


https://github.com/user-attachments/assets/f2541766-8d4f-4a11-a117-fc8e7722827e

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

N/A

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-24 19:59:46 +02:00
Garrett Spong
e57663a0cf
[Security Assistant] Adds BuildKite pipeline for running Security GenAI Evaluations weekly (#215254)
## Summary

Introduces a new `security_solution/gen_ai_evals.yml` BuildKite pipeline
for automatically running our Assistant and Attack Discovery evaluation
suites weekly.

### To Run Locally:
Ensure you are authenticated with vault for LLM + LangSmith creds:

> See [internal
docs](https://github.com/elastic/infra/blob/master/docs/vault/README.md#login-with-your-okta)
for setup/login instructions.

Fetch Connectors and LangSmith creds:

> [!NOTE]
> In discussion with @elastic/kibana-operations it was preferred to use
the ci-prod secrets vault, so we cannot self-manage the secrets. To test
this locally though, you can grab the secrets and follow the
instructions in this [paste
bin](https://p.elstc.co/paste/q7k+zYOc#PN0kasw11u2J0XWC2Ls5PMNWreKzKTpgWA1wtsPzeH+).

```
cd x-pack/test/security_solution_api_integration
node scripts/genai/vault/retrieve_secrets.js  
```


Navigate to api integration directory, load the env vars, and start
server:
```
cd x-pack/test/security_solution_api_integration
export KIBANA_SECURITY_TESTING_AI_CONNECTORS=$(base64 -w 0 < scripts/genai/vault/connector_config.json) && export KIBANA_SECURITY_TESTING_LANGSMITH_KEY=$(base64 -w 0 < scripts/genai/vault/langsmith_key.txt)
yarn genai_evals:server:ess
```

Then in another terminal, load vars and run the tests:
```
cd x-pack/test/security_solution_api_integration
export KIBANA_SECURITY_TESTING_AI_CONNECTORS=$(base64 -w 0 < scripts/genai/vault/connector_config.json) && export KIBANA_SECURITY_TESTING_LANGSMITH_KEY=$(base64 -w 0 < scripts/genai/vault/langsmith_key.txt)
yarn genai_evals🏃ess
```

### To manually run on BuildKite:
Navigate to
[BuildKite](https://buildkite.com/elastic?filter=ftr-security-solution-gen-ai-evaluations)
and run `ftr-security-solution-gen-ai-evaluations` pipeline.

### To manually run on BuildKite for specific PR:
In `.buildkite/ftr_security_stateful_configs.yml`, temporarily move the
`genai/evaluations/trial_license_complete_tier/configs/ess.config.ts`
line down to the `enabled` section. Will see if we can do this without
requiring a commit. @elastic/kibana-operations is it possible to set a
buildkite env var that can be read in FTR tests when a specific GitHub
label is added to the PR? I.e. can I create a `SecurityGenAI:Run Evals`
label that when added will run this suite as part of the build?

> [!NOTE]
> Currently the connectors secrets only include `gpt-4o` and
`gpt-4o-mini`. Waiting on finalized list w/ credentials from @jamesspi
and @peluja1012 and then we can have ops update using the scripts
included in this PR.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Patryk Kopycinski <patryk.kopycinski@elastic.co>
2025-04-24 11:46:57 -06:00
Dzmitry Lemechko
91b0988c2c
[kbn-test] check config duplicate entries (#219089)
## Summary

@gsoldevila noticed that we have the same FTR configs listed in
different manifest file. It means that we are running the same configs
multiple time and this PR fixes it.

PR update `scripts/check_ftr_configs.js` to check for duplicate entries
in manifests in advance and throw an error asking developer to remove
duplicates:

```
[kbn-test/check-config-duplicate-entries][~/github/kibana]$ node scripts/check_ftr_configs.js
ERROR Duplicate FTR config entries detected. Please remove the duplicates:

      Config path: x-pack/test/api_integration/apis/logs_ui/config.ts
      Found in manifests:
      .buildkite/ftr_platform_stateful_configs.yml
      .buildkite/ftr_oblt_stateful_configs.yml

      Config path: x-pack/test/api_integration/apis/metrics_ui/config.ts
      Found in manifests:
      .buildkite/ftr_platform_stateful_configs.yml
      .buildkite/ftr_oblt_stateful_configs.yml
     
     ...
```

Check verified in
[CI](https://buildkite.com/elastic/kibana-pull-request/builds/295779#019667cf-bff5-4ea0-b0f2-7044125fe08e)
2025-04-24 19:22:36 +02:00
jennypavlova
6a8827bf75
[Infra UI][OTel] Use fields instead of _source in the metadata endpoint (#218869)
Closes 
## Summary

This PR adds metadata support for OTel in the asset details view. While
debugging the problem, I saw that inside the metadata endpoint query, we
were using `_source` instead of `fields`, so I changed the query. The
difference with the APM queries is that hare we request all `'host.*',
'cloud.*', 'agent.*', 'container.*'` fields and not predefined ones
(depending on the setup the fields may vary) That's why the logic I
added is slightly different from what we have in APM and we don't have
the predefined required/optional fields
- Hosts

![image](https://github.com/user-attachments/assets/21064423-4cf7-4d68-9664-f93e79f2f6e3)

- Containers

![image](https://github.com/user-attachments/assets/5906bd93-9cd8-4985-bb6a-8891cf9e478a)

## Testing
- Using the setup from the issue: 
- As a prerequisite, we need to have any Kubernetes setup locally. I
will add the steps I followed, as IMO it is easier to setup (especially
after adding this summary and not figuring it out):
- I used mini kube: First, follow the guide to install
[minikube](https://minikube.sigs.k8s.io/docs/start/?arch=%2Fmacos%2Farm64%2Fstable%2Fbinary+download)
and then [helm](https://helm.sh/) - I used ` brew install helm` (also
the [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) utility
to interact with the cluster)
      - Then run: `minikube start`
  - Create a serverless deployment 
- ⚠️ I couldn't make it work locally as the serverless auth is hard to
setup in serverless - for some reason the onboarding showed empty
`elastic_otlp_endpoint ` :
  
<img width="1704" alt="image"
src="https://github.com/user-attachments/assets/424b23cf-18dc-4076-8f0e-a3cbf14f00d0"
/>

I also tried with adding a certificate from dev utils as
`--certificate-authority=` and using `https://localhost:9200` but no
luck :/ )
  So I will use the PR project deployment

 Tested on serverless
<img width="1693" alt="image"
src="https://github.com/user-attachments/assets/0a90b1b4-ecf1-43cf-9f96-78c1ee4f0d23"
/>


  - Go to the onboarding page and select:

![image](https://github.com/user-attachments/assets/da10b40f-44e1-4a32-87ab-fb00fe2a9f3a)
   - Follow the steps shown there 
- Go to Infra > inventory and open a host > go to metadata - clicking
one of:
<img width="1452" alt="image"
src="https://github.com/user-attachments/assets/65c3820e-4329-4195-9736-a9fc8bdb4d99"
/>

- Using metricbeat for regressions (as the fields change affect it) 
   - run metricbeat (containers as well)
   - go to Infra > inventory and open a host > go to metadata
- go to Infra > inventory, select "Container" and open a container > go
to metadata
2025-04-24 19:06:35 +02:00
Laura Suarez
abb99adb12
A11y - updating highlighting on surrounded documents UI (#218066)
## Summary

Updating color tokens on anchored documents in Discover to comply with
accessibility recommendations. We're also the using a yellow highlight
(background-base-warning) and adjusted how the anchor document name
appears at the top, using text-warning + bg-base-warning to clearly
highlight the meaning of this yellow highlight.

Closes #213052 


![image](https://github.com/user-attachments/assets/aa71ab0f-3460-4b93-a89d-1aa92b982570)


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Ania Kowalska <63072419+akowalska622@users.noreply.github.com>
2025-04-24 18:27:28 +02:00
Carlos Crespo
34b14170c8
[APM] Improve environment combobox auto-complete (#218935)
fixes https://github.com/elastic/kibana/issues/216974
## Summary

Improve the environment combobox typing behaviour


![env_dropdown](https://github.com/user-attachments/assets/f545f43a-e04e-4a22-b48b-ea68e277af60)



### How to test

- Navigate to Service Inventory
- Interact with the Environment dropdown
- It will fetch from the server when: backspace is hit or when he text
typed can't be matched with any items from the options list

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: jennypavlova <jennypavlova94@gmail.com>
2025-04-24 17:40:29 +02:00
Ievgen Sorokopud
a1826f2e57
[Attack Discovery][Scheduling] Increase timeout for the attack discovery schedules (#219099)
## Summary

With these changes we increase the attack discovery schedule rule
execution timeout to `30m`. The attack discovery generation can take a
while and the default `5m` on ESS and `1m` on Serverless does not give
much time to do complex AI work.

## NOTES

The feature is hidden behind the feature flag (in `kibana.dev.yml`):

```
feature_flags.overrides:
  securitySolution.assistantAttackDiscoverySchedulingEnabled: true
```
2025-04-24 17:25:12 +02:00
Charis Kalpakis
2713a79ba9
[Scout] add painless lab 2025-04-24 18:19:23 +03:00
Drew Tate
3c51e1aef3
[ES|QL] sync operator docs (#217407)
## Summary

Close https://github.com/elastic/kibana/issues/214337


https://github.com/user-attachments/assets/516fb455-600d-4258-838e-d38f53585d7a

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2025-04-24 16:55:51 +02:00
Tre
7b98f64809
[SKIP ON MKI] .../distributed_lock_manager.spec.ts (#219093)
## Summary

see details: https://github.com/elastic/kibana/issues/219091
2025-04-24 16:44:24 +02:00
christineweng
132a93efc3
[Security Solution][Document details flyout] Add tour to table tab (#218886)
## Summary

Added a short tour to highlight new table tab features ([Copy
suggestions](https://github.com/elastic/docs-content/issues/1234#issuecomment-2824971257)).



https://github.com/user-attachments/assets/7c9b7ecb-affd-41b5-91bc-ee88e897092e


### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-04-24 09:23:29 -05:00
Weronika Olejniczak
0eb32cb6d0
chore: update @elastic/eslint-plugin-eui to v0.2.0 (#219066)
`@elastic/eslint-plugin-eui`: `0.1.1`  `0.2.0`

[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)

## Changes

This PR updates the `@elastic/eslint-plugin-eui` version to latest:
[v0.2.0](https://www.npmjs.com/package/@elastic/eslint-plugin-eui/v/0.2.0).

## Package updates

### `@elastic/eslint-plugin-eui`

- Updated the `no-restricted-eui-imports` warning to clarify that JSON
tokens remain supported for server-side or non-React use cases
([#8613](https://github.com/elastic/eui/pull/8613))
2025-04-24 16:07:02 +02:00
Lene Gadewoll
d2d27658f3
Upgrade EUI to v101.4.0 (#218778)
`101.3.0`  `101.4.0`

[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)

## Changes

This PR only updates tests and snapshots related to changes on EUI side:
- updated `aria-current="true"` to `aria-current="page"`
- updated icon usage `userAvatar` to `user`

## Package updates

### `@elastic/eui`

#### [`v101.4.0`](https://github.com/elastic/eui/releases/v101.4.0)

- Spread `labelProps` to the `label` element in `EuiCheckableCard`
([#8586](https://github.com/elastic/eui/pull/8586))
- Add `controls`, `flask`, `comment`, and `readOnly` glyphs to `EuiIcon`
([#8580](https://github.com/elastic/eui/pull/8580))
- Refactored `EuiExpression`, `EuiFacetGroup`, `EuiFacetButton`,
`EuiFilterGroup`, `EuiHeader`, `EuiImage` and `EuiListGroup` to memoize
their internal Emotion styles
([#8565](https://github.com/elastic/eui/pull/8565))
- Updated global `border.radius.medium` token value for default
`Borealis` theme to `4px`
([#8563](https://github.com/elastic/eui/pull/8563))
- Updated `EuiProvider` to build themes including `highContrastMode`
([#8558](https://github.com/elastic/eui/pull/8558))

**Accessibility**

- Removed the `aria-label` attribute from the `ul` element in
`EuiPagination` to avoid duplicate screen reader output
([#8597](https://github.com/elastic/eui/pull/8597))
- Set a more specific `aria-current="page"` on list items in
`EuiPagination` ([#8597](https://github.com/elastic/eui/pull/8597))
- Added `aria-modal` to `EuiFlyout` with `type="overlay"`
([#8591](https://github.com/elastic/eui/pull/8591))

**Dependency updates**

- Updated `@elastic/prismjs-esql` to v1.1.0
([#8587](https://github.com/elastic/eui/pull/8587))

### `@elastic/eui-theme-borealis@0.2.0`

- Updated component tokens to use `computed` values to ensure correct
inheritance from theme overrides
([#8558](https://github.com/elastic/eui/pull/8558))
- Added `overrides.HCM` to `euiThemeBorealis` to support theme internal
overrides ([#8558](https://github.com/elastic/eui/pull/8558))
- Updated `border.radius.medium` token value to `4px`
([#8563](https://github.com/elastic/eui/pull/8563))

### `@elastic/eui-theme-common@0.2.0`

- Added support for theme `overrides` as optional part of
`EuiThemeShape` ([#8558](https://github.com/elastic/eui/pull/8558))
- Updated `getComputed` to support high contrast mode overrides defined
on `overrides.HCM` ([#8558](https://github.com/elastic/eui/pull/8558))

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-24 15:54:52 +02:00
Ash
a40ecdb483
[Ai4dSoc] Add security project tier specific config files to serverless project archives (#219065)
## Summary

Adds the missing changes to allow overriding serverless security project
settings for ai4soc product line.

follow up of https://github.com/elastic/kibana/pull/213577

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
2025-04-24 15:47:38 +02:00
Patrick Mueller
bdef66fa4c
[ResponseOps][Alerting] allow rule types to be disabled via config (#218844)
resolves https://github.com/elastic/kibana/issues/218616

Adds kibana config `xpack.alerting.disabledRuleTypes: string[]`, which
can be used to "disable" specific rule types. The config is checked when
a rule type is registered, and if the rule type should be disabled, it
won't be added to the rule type registry and will log an INFO message
about the rule type being disabled.
2025-04-24 09:43:36 -04:00
Philippe Oberti
10cfa31370
[AI4DSOC] Fix link to the new integrations page (#219030)
## Summary

This PR fixes the links to the integrations page, introduced in [this
PR](https://github.com/elastic/kibana/pull/215246) and [that
one](https://github.com/elastic/kibana/pull/215266). At the time of the
previous PRs, the new AI4DSOC integration page had not been created, so
we were using the link to the normal integrations page. [This recent
PR](https://github.com/elastic/kibana/pull/217905) added the new page,
so we need to update those links

From the landing page


https://github.com/user-attachments/assets/907c12be-84dc-4bbd-a161-c8b16e2ecdba

From the alert summary page


https://github.com/user-attachments/assets/c25be7b3-f7ef-4e5f-8948-40def6a8d026

## How to test

This needs to be ran in Serverless:
- `yarn es serverless --projectType security`
- `yarn serverless-security --no-base-path`

You also need to enable the AI for SOC tier, by adding the following to
your `serverless.security.dev.yaml` file:
```
xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]
```

Use one of these Serverless users:
- `platform_engineer`
- `endpoint_operations_analyst`
- `endpoint_policy_manager`
- `admin`
- `system_indices_superuser`

Then:
- generate data: `yarn test:generate:serverless-dev`
- create 4 catch all rules, each with a name of a AI for SOC integration
(`google_secops`, `microsoft_sentinel`,, `sentinel_one` and
`crowdstrike`)
- change [this
line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_fetch_integrations.ts#L73)
to `installedPackages: availablePackages` to force having some packages
installed
- change [this
line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_integrations.ts#L63)
to `r.name === p.name` to make sure there will be matches between
integrations and rules

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

Relates to https://github.com/elastic/security-team/issues/11955
2025-04-24 08:14:53 -05:00
Kibana Machine
8eba73c87f skip failing test suite (#208138) 2025-04-24 15:09:36 +02:00
elastic-renovate-prod[bot]
c96ebb3c36
Update dependency @openfeature/web-sdk to ^1.5.0 (main) (#218733)
Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Jean-Louis Leysens <jeanlouis.leysens@elastic.co>
Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
2025-04-24 14:29:22 +02:00
Sergi Romeu
5ac2d34cd8
[APM][Settings][Custom Links] Prevent unnecessary suggestion requests (#218927)
## Summary

Closes #190218

This PR aims to fix the multiple requests produced when interacting with
the custom links flyout, using `memo` and `useMemo` from React to
prevent rerenders and redundant api calls.


https://github.com/user-attachments/assets/f8b058cd-dc02-41ef-8389-809a006b8eda

## How to test
1. Start Kibana and run any synthtrace scenario
2. Go to APM -> Settings -> Custom Links
3. Play with the inputs, the calls should be made once per field (if you
already requested service.name, it will be cached, regardless of which
input you are using)
2025-04-24 14:18:14 +02:00
Mykola Harmash
69902671b2
[Dataset Quality] Increase timeout for a flaky test (#218815)
This is a follow up change after [another
failure](https://github.com/elastic/kibana/issues/208220) of the test
because of seemingly poor network conditions in the CI.

[Flaky test
run.](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8204)
2025-04-24 14:15:51 +02:00
Marco Liberati
ef323daf52
[chore] Import common react-use methods in shared bundle (#218640)
## Summary

Similar to #217034, #217202 and #217467 this time applied to
`react-use`.

This is a slightly different approach than #217034 as we're caching here
only the most common/frequently used methods from the `react-use`
library and leaving the rest to be loaded within the specific plugin
chunks.

What this PR does it fundamentally:
* adds `7.x kb` to the shared bundle
* overall the startup bundle size shrinks about `3.5 kb`
* the async bundle size shrinks of about `350 kb` (mainly due to 3
imports which were targeting `react-use/lib`).

An alternative approach would be to just fix the async import strings in
there, but I thought to it was worth it to make the long step here.
Feedback appreciated.
2025-04-24 14:13:25 +02:00
Asuka Nakajima
4f73487143
[Security Solution] Filterlist Update for Endpoint Events (#218929)
## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.

Updates endpoint alerts telemetry filter list to add the following new
fields for the process/dll events.

* origin_referrer_url
* origin_url

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-24 21:12:09 +09:00
Maryam Saeidi
2c736f4441
[Alert controls] Fix refreshing controls and remove extra loading of the alert table (#214612)
## Summary

This PR fixes:
1. refreshing controls when the alert search bar is refreshed
2. the extra initial loading of the alert table in the alerts page
(related to https://github.com/elastic/kibana/issues/183412)
2025-04-24 14:10:28 +02:00
elastic-renovate-prod[bot]
5f6cfc5c05
Update dependency @elastic/elasticsearch to v9.0.0 2025-04-24 12:06:53 +00:00
Edgar Santos
5c41095d1a
Update gap fills table tooltips (#218926)
# Summary
Updated the tooltips for the headings of the table that shows gaps for a
rule as well as a missing tooltip in the rule monitoring tab. For the
detailed list of tooltips refer to the original issue #218345.


# How to test
Make sure you enable the following feature flag in your
`kibana.dev.yaml`:

`xpack.securitySolution.enableExperimental: [
'storeGapsInEventLogEnabled' ]`

Create a rule that runs very often (it could be 1s interval and no look
back). Then disable the rule to generate gaps.
Wait for a bit and enable the rule again. 
You should see the gaps table when visiting the rule details page under
the `execution results` tab.
2025-04-24 13:54:42 +02:00
Agustina Nahir Ruidiaz
f1f14046ee
[Security Solution][Users page] a11y:Fix modal dialog title (#218965)
## Summary

Addresses this `a11y` issue:
https://github.com/elastic/kibana/issues/205329

## Changes made: 

1. Added `aria-labelledb` to the `<ModalInspectQuery />` component in
order to show more meaningful message.

**How to test:**

1. Navigate to `Security -> Explore -> Users page`.
2. Navigate to Inspect button by pressing Tab key.
3. Check the dialog announcement on a screen reader.

### Sample


https://github.com/user-attachments/assets/cdc4bb54-1dae-4ef6-807e-038dbf45cdb4



https://github.com/user-attachments/assets/727d2123-95f5-4d6a-9896-1ead20a01fbc



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2025-04-24 13:51:02 +02:00
Alex Szabo
816421b857
fix: use changed import path (#219051)
## Summary
A variable changed between https://github.com/elastic/kibana/pull/217517
and https://github.com/elastic/kibana/pull/218122 - this PR adjusts the
import
2025-04-24 12:18:30 +02:00
Chris Cowan
7ad307b152
[Obs][Rules] Update custom_eq_avg_bytes_fired.ts test to use a consistent field for the average. (#218874)
## Summary

This PR fixes #218867 by switching to the `host.network.*` gauges. This
also sets a consistent value in the DataForge config so we can get a
reliable value to calculate and compare the results.
2025-04-24 12:08:57 +02:00
Agustina Nahir Ruidiaz
c946ba8d4a
[Security Solution][Users page] a11y:Fix double announcement on tootips (#218982)
## Summary

Addresses this `a11y` issue:
https://github.com/elastic/kibana/issues/205327

## Changes made: 

- Suppress duplicate screen-reader announcements by adding the
`disableScreenReaderOutput` prop to the `EuiToolTip` wrapping the “Add
filter” button.
- Confirmed the `disableScreenReaderOutput` prop (introduced in EUI
v101.2.0) by consulting the official tooltip documentation:
https://eui.elastic.co/#/display/tooltip


**How to test:**

1. Navigate to `Security -> Explore -> Users page`.
2. Navigate to `add filter` button by pressing Tab key.
3. Check the button and tooltip announcement on a screen reader.

### Sample



https://github.com/user-attachments/assets/dd4528fd-9ee3-437e-953f-7fc15fdde7ac



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2025-04-24 11:03:26 +02:00
Elena Shostak
96b46b5b11
[CodeQL] Updated CODE_SCANNING_BRANCHES (#219043)
## Summary

Updated `CODE_SCANNING_BRANCHES`
2025-04-24 08:59:35 +00:00