Commit graph

1457 commits

Author SHA1 Message Date
Steph Milovic
13906cbb76
[Stack connector] Forward telemetryMetadata.pluginId to EIS use case header (#214269) 2025-03-13 09:44:06 -06:00
jennypavlova
ebe7ef6da0
[APM][OTel] Fix: Pass telemetry.sdk* data when loading a dashboard (#214356)
Closes #214328 

## Summary

This PR fixes the issue with loading an otel native dashboard

## Testing
- Run ` node scripts/synthtrace otel_edot_simple_trace.ts`
- ⚠️ As our test data has only a java service there is a small manual
step needed (it will be listed below **^**)
- Open the metrics tab for the service (currently we don't have a
dashboard):


![image](https://github.com/user-attachments/assets/e5f1461c-be6f-4d18-9185-7cb25698764b)


- **^** Go to the `dashboard_catalog.ts` and add mapping for otel native
java case:
  - first: `'otel_native-edot-java',`


![image](https://github.com/user-attachments/assets/a3463f5b-6db9-466e-95fc-3ccd44a4a016)
  - second: 
      ```js   
     case 'otel_native-edot-java': {
      return import(
        /* webpackChunkName: "lazyJavaOtelNativeDashboard" */
        './opentelemetry_java.json'
      );
    }
   ``

-
![image](https://github.com/user-attachments/assets/34c12147-db1e-4494-8ea6-95dffc5975d4)

- Check the same page after refresh

![image](https://github.com/user-attachments/assets/e12b7046-9868-421b-9f9e-df004f82ddfc)
2025-03-13 16:20:17 +01:00
Joey F. Poon
448fda4111
[Security Solution] remove group from AV workflow insight value (#214327)
## Summary

Removes group from the incompatible antivirus workflow insight type
value.

Resolves:
- https://github.com/elastic/kibana/issues/213681


### 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
2025-03-13 23:56:14 +09:00
Nikita Indik
9f2e07f2de
[Security Solution] Hide conflict badges when rule customization is not enabled (#214365)
**Resolves: https://github.com/elastic/kibana/issues/214301**

## Summary

This PR removes conflict badges from the Rule Updates table for users
with license that is insufficient for prebuilt rule customization.

**Before (on Basic license)**
<img width="1014" alt="Scherm­afbeelding 2025-03-13 om 13 44 07"
src="https://github.com/user-attachments/assets/fd830253-80d0-4250-861c-88b0a11d6786"
/>


**After (on Basic license)**
<img width="1014" alt="Scherm­afbeelding 2025-03-13 om 13 39 01"
src="https://github.com/user-attachments/assets/f8b00964-72bf-4d0a-9f03-9e47231c5227"
/>

Since users on Basic license can't customize rules, it doesn't make
sense to show these badges - they are not actionable anyways.

Users will still see a callout mentioning that their modifications will
be erased if they open a flyout for a customized rule.

<img width="953" alt="Scherm­afbeelding 2025-03-13 om 13 41 21"
src="https://github.com/user-attachments/assets/b2a2514e-2b19-4653-9076-d742130b30b6"
/>
2025-03-13 14:52:48 +00:00
Efe Gürkan YALAMAN
c42d763ce4
[Search] [Synonyms] Synonym Rule flyout update (#213433)
## Summary

Updates Synonym Rule Flyout to match the designs. 


https://github.com/user-attachments/assets/8c034c2a-0b12-4a98-a627-fbef3a2542c7

Flyout tries to handle invalid cases which would throw from the endpoint
call

<img width="497" alt="Screenshot 2025-03-07 at 17 11 51"
src="https://github.com/user-attachments/assets/6e610177-ec56-4420-bcee-4c72935cdbb9"
/>
<img width="495" alt="Screenshot 2025-03-07 at 17 12 07"
src="https://github.com/user-attachments/assets/3fed1ed1-4be4-449e-a30c-c8c13e7d7968"
/>
<img width="509" alt="Screenshot 2025-03-07 at 17 12 33"
src="https://github.com/user-attachments/assets/117dbac5-dfbe-4160-a9d4-a92bcb3bcf89"
/>
<img width="472" alt="Screenshot 2025-03-07 at 17 12 44"
src="https://github.com/user-attachments/assets/70d50693-b2bf-4af4-b363-65f92d6812fd"
/>
<img width="484" alt="Screenshot 2025-03-07 at 17 12 53"
src="https://github.com/user-attachments/assets/ebb8f401-4dd6-4180-9028-396680091a4c"
/>
<img width="458" alt="Screenshot 2025-03-07 at 17 13 27"
src="https://github.com/user-attachments/assets/a7c1244b-3334-44d3-bd4c-e26b463e1b68"
/>

The text added needs a quick check as well cc: @leemthompo 


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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
- [ ] [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)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-13 14:35:11 +00:00
Shahzad
005124a9ed
[Synthetics] Fix broken tests !! (#214357)
## Summary

Fix broken tests !!

These got broken due to changes on alerts overview page, i am also
expanding the scope to run on all observability plugin changes !!
2025-03-13 15:11:32 +01:00
Maxim Palenov
d782b71637
[Security Solution] Avoid showing rules update confirmation modal on basic license (#214340)
**Resolves:** https://github.com/elastic/kibana/issues/214302

## Summary

This PR prevents showing rule upgrade confirmation modal on lower licenses where prebuilt rules customization is not allowed.

## Details

Users may see a rules upgrade confirmation modal when trying to upgrade prebuilt rules even if prebuilt rules customization is disabled due to insufficient license. It happens due to improper response from `upgrade/_perform` which doesn't respect `pick_version`. It's expected rule upgrade goes smoothly when `pick_version` is one of `BASE`, `CURRENT` or `TARGET`.

The fix makes sure dry run request isn't fired and a prebuilt rules upgrade confirmation modal isn't shown when running with insufficient for prebuilt rules customization license.

There is a [ticket](https://github.com/elastic/kibana/issues/214338) to address this issue in the API endpoint.
2025-03-13 14:47:30 +01:00
Saarika Bhasi
d0aecedbb3
[Onboarding]Replace GuideSelectorTiles card description with EuiTextColor (#214286)
## Summary
Replace card description EuiText component with EuiTextColor in
GuideSelectorTiles.

By default [EuiCard description
](https://eui.elastic.co/#/display/card#basic-card) places within small
EuiText in a`<p>` tag , adding another
[EuiText](https://eui.elastic.co/#/display/text) by default places its
child component with `<div> `. So the warning was shown.

Fixed in Create index code view & details page in stateful & stateless 

### Screenshot of problem
<img width="965" alt="Screenshot 2025-03-12 at 5 19 24 PM"
src="https://github.com/user-attachments/assets/850d7b6b-3405-42bb-806e-551f7a3988f8"
/>
2025-03-13 09:18:29 -04:00
Paul Tavares
2b9d2cff6c
[Security Solution][Endpoint] Disable Artifact card menu under space awareness conditions where user is not allowed to edit item under active space (#213820)
## Summary

The following changes are being done to Artifact Card's Menu (which
displays the option to Delete or Update the artifact) in support of
space awareness feature (currently behind Feature Flag:
`endpointManagementSpaceAwarenessEnabled`):

- Global Artifacts: If displaying a global artifact and user does not
have the new Global Artifact Management privilege - disable the Edit
menu icon and display a tooltip on hover
- Per-Policy Artifacts: if displaying a per-policy artifact in a space
other than one of the `ownerSpaceId` spaces that the artifact is
associated with and the user does not have the new Global Artifact
Management privilege - disable the Edit menu icon and display a tooltip
when the user hover over that button


> [!NOTE]
> Changes were **NOT** done to Endpoint Exceptions with this PR.
2025-03-13 08:52:33 -04:00
Carlos Crespo
9ea6de27cc
[APM] Fix service map showing duplicate nodes (#214184)
fixes [214167](https://github.com/elastic/kibana/issues/214167)
## Summary

Fixes a problem affecting the new service map api, causing the service
map to show duplicate exit span nodes



<img width="1476" alt="image"
src="https://github.com/user-attachments/assets/f7bf6035-17f5-4265-9950-5c764f1e7f0b"
/>

### how to test

- Enable the new service map api by adding
`xpack.apm.ui.serviceMapApiV2Enabled: true` to `kibana.dev.yml`
- Run the `service_map` synthtrace scenario
- Navigate to APM and view the service map for the `frontend-rum`
service

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-13 12:20:04 +00:00
Vitalii Dmyterko
686a4cb64f
[Security Solution][Detection Engine] adds support of MV_EXPAND for ES|QL rule type (#212675)
## Summary

 - addresses https://github.com/elastic/kibana/issues/197130
- allows deduplication of alerts for non-aggregating ES|QL queries, when
`mv_expand` used
- when `mv_expand` command used, id of alerts is constructed with
additional value from expanded field
- if expanded field(column) is not present in ES|QL response, we hash
the whole source object when generate alert id. Field can be absent,
because it was renamed or dropped. When field was renamed, it still
allow us to create unique alert id. When field is dropped, expanded
results would be identical. In this case, duplicated alerts won't be
created (refer to FTR tests)
2025-03-13 11:24:13 +00:00
Dzmitry Lemechko
1b30686181
[scout] use project deps as global hooks for parallel tests (#211409)
## Summary

Currently we are using `globalSetup` [script in configuration
file](https://playwright.dev/docs/test-global-setup-teardown#option-2-configure-globalsetup-and-globalteardown)
to ingest Elasticsearch data before running the tests in parallel
against the same ES/Kibana instances.

This approach doesn't work well when you need to adjust `globalSetup`
logic based on specific condition, e.g. configuration file defining
where servers are hosted, its credentials, etc.

Not only global hook, but `ScoutConfig` fixture expects an argument to
define where servers configuration is defined:


cd502acea1/packages/kbn-scout/src/playwright/fixtures/worker/core_fixtures.ts (L65-L75)

`testInfo` is how Playwright exposes currently running configuration in
a form of `project` interface:
[projects](https://playwright.dev/docs/test-projects) can be used to
group tests, e.g. for specific envs or browsers.

Unfortunately `testInfo` is not exposed in global scripts, because in
Playwright project design `globalSetup` scripts are run before multiple
projects and projects can have its own `setup` hooks via
[dependencies](https://playwright.dev/docs/test-global-setup-teardown#option-1-project-dependencies):

```
    {
      name: 'setup',
      testMatch: /global.setup\.ts/,
    },
    {
      name: 'local',
      use: { ...devices['Desktop Chrome'], configName: 'local' },
      dependencies: 'setup',
    },
``` 

We already use project API to get `serversConfigDir` path, where we plan
to store local and cloud server configurations. This PR proposes to
define projects as `local` and `cloud` (maybe even separate `cloud-mki`,
`cloud-ech`) as a way to provide playwright information about servers
configuration.

Advantages:
1. we can re-use existing fixtures as-is, without adding custom exported
helper functions for ES data ingestion
2. project dependency is displayed as `setup` in Playwright report
3. way better and simpler design for consumers:
```
import { globalSetupHook } from '@kbn/scout';

globalSetupHook('Ingest data to Elasticsearch', async ({ esArchiver, log }) => {
  // add archives to load, if needed
  const archives = [
    testData.ES_ARCHIVES.LOGSTASH,
  ];

  log.debug('[setup] loading test data (only if indexes do not exist)...');
  for (const archive of archives) {
    await esArchiver.loadIfNeeded(archive);
  }
});
```
4. it is supported by VSCode Playwright plugin
<img width="1271" alt="Screenshot 2025-02-17 at 11 26 12"
src="https://github.com/user-attachments/assets/ba7eeb38-d39d-4785-9c11-18647599ec4a"
/>

I find it extremely useful because you don't need to change env var when
you want to switch b/w local or cloud run, all the configurations are
loaded automatically and you just tick the checkbox!

Disadvantages:
1. it is important to run `playwright test` with `--project` flag to use
the proper configuration
2. we have to define how `projects` are used for local and cloud
configuration, and make sure it meets requirements of multiple teams. We
can expose a way to pass custom project definitions in
`createPlaywrightConfig` function, but it might complicate the support
effort when every Team has too many custom projects.
3. `project` term is something we can't change and might be confusing
4. Since it is a Playwright feature, we might not have consistency with
API tests runner under Scout

For reviewers: 

Playing with it locally might give a better understanding about the
pros/cons, especially with IDE playwright plugin installed.

Running servers with tests:
```
node scripts/scout.js run-tests --serverless=oblt --testTarget=local --config x-pack/platform/plugins/private/discover_enhanced/ui_tests/playwright.config.ts

node scripts/scout.js run-tests --serverless=oblt --config x-pack/platform/plugins/private/discover_enhanced/ui_tests/playwright.config.ts
```

Running test only requires passing `project` argument:

```
npx playwright test --project=local --config x-pack/platform/plugins/private/discover_enhanced/ui_tests/playwright.config.ts

npx playwright test --project=local --config x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: jennypavlova <jennypavlova94@gmail.com>
2025-03-13 10:06:26 +01:00
Miriam
9fb25a155c
[ObsUX][APM] Add tooltip for exit spans missing destination (#213714)
Closes https://github.com/elastic/kibana/issues/212638

### Summary

In order to help users, support agents and engineers to spot eventual
problems on the Service Map, we want to display a warning on the exit
spans that lack the span.destination.service.resource on the trace
waterfall.


![image](https://github.com/user-attachments/assets/eee3f962-a91c-49bb-9f06-c989ed8500c5)
2025-03-13 09:45:56 +01:00
Saarika Bhasi
5475bd0d32
[Onboarding] Fix languages not being cut off from language selector drop down (#214275)
## Summary

Replace `maxWidth: '300px'` with` minWidth: '150px'` in LanguageSelector
parent FlexGroup. This would help dropdown languages not being cut off.

With this change, LanguageSelector rendered from [add documents code
example](https://github.com/elastic/kibana/blob/main/x-pack/solutions/search/plugins/search_indices/public/components/index_documents/add_documents_code_example.tsx#L104)
is not changed.

Fixes in both Serverless & Stateful 

### Screenshot of problem
<img width="965" alt="Screenshot 2025-03-12 at 3 51 17 PM"
src="https://github.com/user-attachments/assets/0d6c9a3d-b75a-40e9-8fe0-950924213423"
/>

### Screen recording with Solution


https://github.com/user-attachments/assets/ae45197c-4784-475f-99cb-346f9f61c7db
2025-03-12 22:36:04 +01:00
Saarika Bhasi
154f031944
[Onboarding] Fix console warning in quick stats component (#214230)
## Summary

Added unique key to each react jsx array component in
[QuickStats](https://github.com/elastic/kibana/blob/main/x-pack/solutions/search/plugins/search_indices/public/components/quick_stats/quick_stats.tsx#L48-L84),
this fixes warning shown in the console.
Fixes for both Stateful & Stateless

### Screenshot of Warning
<img width="1447" alt="Screenshot 2025-03-12 at 1 18 11 PM"
src="https://github.com/user-attachments/assets/b5a566e7-4eda-45d5-ae84-490f8ae3eb0d"
/>
2025-03-12 16:20:16 -04:00
Saikat Sarkar
900041ec0c
[Playground] Keep existing indices selected when filtering other indices (#213833)
## Summary

This PR ensures that the previously selected indices remain selected
even when the user enters a term in the filter. The following screen
recording demonstrates the effect of this change.



https://github.com/user-attachments/assets/d15afbf7-fc26-4837-b5f0-7e44fa91d343




### 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
- [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
- [ ] 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-03-12 13:52:36 -06:00
Ryland Herrick
01e31ea5f2
Alerts table in Rule Preview panel fills container width (#214028)
## Summary

Addresses https://github.com/elastic/kibana/issues/213706.

I suspect that this stopped working when #206523 removed the
`FullScreenContainer` from the inner StatefulEventsViewer component;
that change combined with the `display:flex` on this parent element
caused the table to no longer grow as expected.

Luckily, the fix here was simply not using flexbox on the container.
Since the table is the only element within this container, I saw no
reason why flexbox was needed here; testing has confirmed this.

### Screenshot (after fix; see bug for "before" image)
<kbd><img width="1709" alt="Screenshot 2025-03-11 at 5 35 43 PM"
src="https://github.com/user-attachments/assets/108be815-00e2-48b7-8821-e63566eefa09"
/></kbd>
2025-03-12 14:21:33 -05:00
Maryam Saeidi
14b9a4828a
[Alert search bar] Replace the status filter with controls on the observability pages (#198495)
Closes #197953

## Summary

This PR replaces the alert status filter with filter controls. In this
PR, I also covered backward compatibility when we have a `status` URL
parameter by passing that value to filters, as shown below:

|State|Screenshot|
|---|---|

|Before|![Image](https://github.com/user-attachments/assets/f7783866-5b84-4004-9e70-3a22675b9a7a)|

|After|![image](https://github.com/user-attachments/assets/162d2e2a-3535-4f1f-ba7f-1fe2bfa8a478)|


https://github.com/user-attachments/assets/86e82a19-f68e-4127-9fd8-e0efe0d41ece

I checked in Serverless and we have access to controls in viewer mode as
well:


https://github.com/user-attachments/assets/2c90ba3a-7d95-4682-b722-e5b327f7334d


### 🐞 Known issue

1. Privilege
In Stateful, if a user has Kibana privilege but not the `.alert*` es
privilege, then the controls do not work as expected. This issue will be
tackled in a separate ticket:

  <details>
  <summary>This is the error that we show in this scenario</summary>
  

![image](https://github.com/user-attachments/assets/7b2faab5-794b-4a96-b7e8-6dccd205cdd3)
  </details>

2. Initial load
Related ticket: https://github.com/elastic/kibana/issues/183412


### 🗒️ Tasks

- [x] ~~Solving the permission issue~~ This issue does not happen in
Serverless and for stateful, we will fix it in a separate ticket:
https://github.com/elastic/kibana/issues/208225
- The main issue will be fixed in this
[PR](https://github.com/elastic/kibana/pull/191110)
- In the above [PR](https://github.com/elastic/kibana/pull/191110), we
remove controls if the user does not have the privilege for alert
indices, but we need to figure out how to adjust filter controls to
access the data based on Kibana privileges.
- [x] We should configure the filters to allow the selection of one item
for alert status but still show the other options
- [x] We need to see how we can make this work with the current status
field. Ideally, if there is a status field, we would apply it and remove
it from the URL.
- Fixed in
[c6cad2d](c6cad2dbe1)
- [x] Changing the URL does not update the page filters correctly. ~~It
might be related to https://github.com/elastic/kibana/issues/183412.~~
- [x] We need to make sure these adjustments work as expected in APM as
they use the observability alert search bar.
- [x] Check if the tags filter can be improved, and if not, whether it
makes sense to keep it in its current form.
- It works based on how array filtering works in ES, which seems like a
good start to me.
- [x] Check with Maciej: Do we need to disable changing control configs?
- Checked with Maciej: it is fine to keep the option of editing
controls.
- [x] Do we need to have a different local storage item for each page
(apm/rule details/alert details/alerts)?
        - How can we disable syncing with the local storage?
- Added the possibility of disabling sync in
[24bab21](24bab210b0)
and disabled it for the rule details and alert details pages.
            - Also, disabled it for the APM alert search bar.
- [x] Setting default status as active on the related alerts tab

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Shahzad <shahzad31comp@gmail.com>
2025-03-12 19:23:42 +01:00
Jan Monschke
e3311c516b
[Threat Hunting Investigations] Improve API docs for notes/timeline (#213584)
## Summary

[META
issue](https://github.com/elastic/security-docs-internal/issues/57)

This PR improves the API documentation for timeline/notes/pinned events
as per the definition in the meta issue.

### Notes
#### Timeline API
- `eventType`:
	- is always set to `all`
	- looks like it's been superseded by dataView?
	- I marked it as `deperecated` 
- `eventIdToNoteIds`:
- there's a type mismatch between what the frontend expects and what is
returned
	- also it does not seem to be used anymore?
	- it needs to be investigated further
#### Notes API
- `GlobalNote`:
	- looks like it's not used anymore
	- I removed it, nothing broke
- `eventIngested`, `eventTimestamp`, `eventDataView` and `overrideOwner`
are all not used on the patch note endpoint, I removed them. The
`event*` ones I have never seen before to be honest.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-12 18:55:54 +01:00
Nikita Indik
07012811b2
[Security Solution] Force upgrading to target version for "Reference URLs" when base version is missing (#214161)
**Resolves: https://github.com/elastic/kibana/issues/214171**

## Summary

This PR fixes an issue with "references" field in -AB situations. When
the base version is missing we try to merge current and target arrays
which leads to old and potentially broken URLs from the current version
ending up in the result.

Now the behaviour is changed to always force merged version to be equal
to target (which always has correct URLs).
2025-03-12 18:41:32 +01:00
Efe Gürkan YALAMAN
455b1cca8d
Removes BA callout from AI Search Guide (#214195)
## Summary

<img width="1728" alt="Screenshot 2025-03-12 at 16 03 57"
src="https://github.com/user-attachments/assets/c51516a9-3cda-4b3d-aa63-e24e37c39359"
/>

Removes a leftover callout from AI Search guide.
This page is only reachable if the user is using classic navigation in
Stack.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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)
- [ ]
[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)
2025-03-12 17:56:37 +01:00
Nathan Reese
377a812784
[dashboard] clean up dashboard setup and start contracts (#212968)
* remove `locator` from setup and start contract
* remove `dashboardFeatureFlagConfig` from start contract

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-12 10:36:37 -06:00
Umberto Pepato
f8a3051605
[ResponseOps][Rules] Add solution field to rule types (#212079)
We need to add a `solution` field to rule types in order to provide a
root-level categorization based on the Kibana solution/area that owns
each rule type. This will serve as a more reliable alternative to
previous attempts at `featureId`-based filtering.

## Summary

- Adds a `solution` field to rule type objects, accepting the values
`observability`, `security` and `stack`.
- Categorizes existing rule types.
- Updates tests with the new field.

## Verification steps

1. Check that the rule types you own have been categorized under the
correct solution
2. Create rules in multiple areas of Kibana
3. Check that those rules show up correctly in their UIs and work
correctly

## References

Closes #212017
2025-03-12 17:19:58 +01:00
jennypavlova
ded1b15b87
[APM][OTel] Add EDOT support in the Synthtrace OTel client (#214141)
Closes #212564 

## Summary

This PR adds EDOT data and scenarios to the OTel synthtrace client. The
previous OTel class now lives in `otel_native` folder and the EDOT one
in `otel_edot`. It updates the otel native service name and the old
tests and adds a simple test for EDOT.
⚠️ Currently the edot service doesn't have an error document (on the
[otel demo env](https://otel.demo.elastic.co) I couldn't find any) so
there won't be any errors for the `adservice-edot-synth` - same as in
[the
demo](https://otel.demo.elastic.co/app/apm/services/adservice/errors?comparisonEnabled=true&environment=ENVIRONMENT_ALL&kuery=&latencyAggregationType=avg&offset=1d&rangeFrom=2025-03-12T12:49:15.506Z&rangeTo=2025-03-12T13:04:19.779Z&serviceGroup=&transactionType=request)

## Testing
Run: 
- ```node scripts/synthtrace otel_edot_simple_trace.ts ```
- and ```node scripts/synthtrace otel_simple_trace.ts```

Go to APM service inventory
- Both services should be visible
  

![image](https://github.com/user-attachments/assets/b698cc14-d40a-4925-861f-4da0d9707f48)

- Service overview and other tabs should be visible 
  - Otel native case: 
  

![image](https://github.com/user-attachments/assets/4c423ff0-2dee-4eb4-b69b-057bad3a4747)

![image](https://github.com/user-attachments/assets/407907bd-212e-486e-bc2a-0e2370f21be5)

  - EDOT case
 

![image](https://github.com/user-attachments/assets/3766e1e2-a8d7-45d4-887d-b67533a1b3eb)

![image](https://github.com/user-attachments/assets/aff544fa-72b5-4826-963f-2b4c44d517bb)
2025-03-12 16:50:51 +01:00
Gergő Ábrahám
ad3b7fce11
[EDR Workflows] Update description on data reduction advanced options (#213970)
## Summary

- refines description for
- 9 `(win|mac|linux).advanced.events.hash.(md5|sha1|sha256)`:
9e7bbcf767
> Compute and include (MD5|SHA-1|SHA-256) hashes for processes and
libraries in events? This will increase CPU usage and event sizes. If
any user event filter or trustlists reference this hash type, Endpoint
will ignore this setting and automatically enable this hash type.
- 6 `(win|mac|linux).advanced.alerts.hash.(md5|sha1)`:
8fc0f51ab4
> Compute and include (MD5|SHA-1) hashes for processes and libraries in
alerts? This will increase CPU usage and alert sizes. If any user
exceptionlist, trustlist, or blocklists reference this hash type,
Endpoint will ignore this setting and automatically enable this hash
type.
- provides a 'history' for default behavior changes (e.g. `<=8.17
default: true, >=8.18 default: false`) for
- 12 `(win|mac|linux).advanced.(events|alerts).hash.(md5|sha1)`:
05b0ebe8ea
  (note that events sha256 is not changed)
    >  <=8.17 default: true, >=8.18 default: false
- 3 `(win|mac|linux).advanced.events.aggregate_process`:
5984d8e90a
    > <=8.17 default: false, >=8.18 default: true
- 3 `(win|mac|linux).advanced.events.set_extended_host_information`:
5da25a3592
    >  <=8.17 default: true, >=8.18 default: false

> [!IMPORTANT]
> The plan is to backport this PR to all open branches:
> - `8.18`/`8.x`/`9.0`/`main` will contain all modifications,
> - but `8.16`/`8.17` manual backports will only contain the description
refinement

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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)
2025-03-12 16:42:27 +01:00
Bailey Cash
256817b281
chore/slo: add cursor based pagination fields to slo schema, show slo definition api (#213835)
## Summary

Resolves #213238 

- Adds SLO definition API doc
- Adds fields for cursor based pagination to Find SLO docs


[bundled.json](https://github.com/user-attachments/files/19186322/bundled.json)

---------

Co-authored-by: Kevin Delemme <kdelemme@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-12 11:18:23 -04:00
Davis Plumlee
0485578022
[Security Solution] Adds check for license level for rule editing callout message (#213995)
## Summary

Resolves https://github.com/elastic/kibana/issues/213983

Adds gating logic to only display the rule upgrade related warning
callout on the rule editing page if the user has the appropriate license
level, otherwise the message is irrelevant as the user wouldn't be able
to edit a prebuilt rule in the way the message refers to

### Testing

**Steps to reproduce:**

1. Use a Platinum license or any tier that does not allow prebuilt rule
updates.
2. Navigate to the Rule Management page and select a prebuilt rule with
an available update.
3. Open Rule Details page -> Edit rule settings
4. Observe the callout message is not displayed at the top of the page

NOTE: When using the enterprise license, the callout should still be
displayed
2025-03-12 16:03:38 +01:00
Sergi Massaneda
065790e20a
[Security Solution] Siem migrations copy changes in the upload flyout (#213975)
## Summary

## Summary

2/3 of https://github.com/elastic/security-team/issues/11696

**Done**
- UI changes in the onboarding cards
- UI changes in the upload form

**Pending**
- UI changes in the translated rules page

### Screenshots


![rules](https://github.com/user-attachments/assets/d6db959c-914c-461f-a590-f5d26cf9e0f2)


![macros](https://github.com/user-attachments/assets/5d7b0682-60eb-413e-a902-ab77f86dfea4)


![lookups](https://github.com/user-attachments/assets/95958728-e969-422e-9403-43da5355a1d6)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-12 15:58:33 +01:00
Riccardo Magliocchetti
70b49b2084
Add working default metrics dashboard for Python OTel (#213599)
## Summary

Create a custom metrics dashboard for OpenTelemetry Python since the
current one displays two empty charts by default. I've tested this with
some data ingested from the otel native path.

This is how it is rendered:
 
![Schermata del 2025-03-10
14-26-21](https://github.com/user-attachments/assets/766eef8a-def8-45f8-8df1-d601b235fd47)

While working on this I noticed something strange, sometimes the first
element of the triplet that is the data format is `otel_native` and
sometime it is `classic_apm` and in practice an entry with `otel_native`
is required to be present in `
existingDashboardFileNames` but the entry with `classic_apm` is used in
`loadDashboardFile`.

Added some console.log to the function:

![Schermata del 2025-03-10
14-26-57](https://github.com/user-attachments/assets/1236495e-9f56-4a90-b095-f92171cd351c)

### 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

I don't think this introduces any risk since there are no functioning dashboard at the moment.
2025-03-12 15:03:17 +01:00
Jatin Kathuria
bbc91a2691
[Siem Migrations] Add Translated Rules Empty Page (#213438)
## Summary

This PR adds empty state for Translated Rules Page.



https://github.com/user-attachments/assets/b8222151-526c-435e-b9bb-403e1097c056





### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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
2025-03-12 14:59:12 +01:00
Steph Milovic
ddacda5a4c
[Security solution] Fix assistant apiConfig set by Security getting started page (#213964) 2025-03-12 07:57:02 -06:00
Sid
f918fd59af
Update platform security modules (main) (#213903)
Copied from the Renovate PR

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[@types/lodash](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash)
([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash))
| devDependencies | patch | [`^4.17.14` ->
`^4.17.16`](https://renovatebot.com/diffs/npm/@types%2flodash/4.17.14/4.17.16)
|
|
[dependency-cruiser](https://redirect.github.com/sverweij/dependency-cruiser)
| devDependencies | minor | [`^16.8.0` ->
`^16.10.0`](https://renovatebot.com/diffs/npm/dependency-cruiser/16.9.0/16.10.0)
|
|
[require-in-the-middle](https://redirect.github.com/nodejs/require-in-the-middle)
| dependencies | minor | [`^7.4.0` ->
`^7.5.2`](https://renovatebot.com/diffs/npm/require-in-the-middle/7.4.0/7.5.2)
|
| [tough-cookie](https://redirect.github.com/salesforce/tough-cookie) |
devDependencies | minor | [`^5.0.0` ->
`^5.1.2`](https://renovatebot.com/diffs/npm/tough-cookie/5.0.0/5.1.2) |
| [uuid](https://redirect.github.com/uuidjs/uuid) | dependencies | major
| [`10.0.0` ->
`11.1.0`](https://renovatebot.com/diffs/npm/uuid/10.0.0/11.1.0) |

---

### Release Notes

<details>
<summary>sverweij/dependency-cruiser (dependency-cruiser)</summary>

###
[`v16.10.0`](https://redirect.github.com/sverweij/dependency-cruiser/releases/tag/v16.10.0)

[Compare
Source](https://redirect.github.com/sverweij/dependency-cruiser/compare/v16.9.0...v16.10.0)

####  features

-
[`3b06cbb`](3b06cbbb)
feat(extract): improves detection of protocol-only built-ins (node &
bun)
([#&#8203;983](https://redirect.github.com/sverweij/dependency-cruiser/issues/983))
-
[`0ebae97`](0ebae974)
feat(cli): adds init option for bun
([#&#8203;984](https://redirect.github.com/sverweij/dependency-cruiser/issues/984))

#### 👷 maintenance

##### ♻️ life cycle management

-
[`4f25389`](4f253893)
build(npm): updates external dependencies

##### 🧹  chores

-
[`eea753a`](eea753a3)
chore(stale bot): bumps stale period to better align with maintainer
availability
-
[`ff8aa28`](ff8aa287)
chore(progress): updates copy
-
[`f82135e`](f82135ea)
refactor(schema|report): fixes small lint issues

</details>

<details>
<summary>nodejs/require-in-the-middle (require-in-the-middle)</summary>

###
[`v7.5.2`](https://redirect.github.com/nodejs/require-in-the-middle/blob/HEAD/CHANGELOG.md#752-2025-02-21)

[Compare
Source](https://redirect.github.com/nodejs/require-in-the-middle/compare/require-in-the-middle-v7.5.1...require-in-the-middle-v7.5.2)

##### Bug Fixes

- Remove side effect to fix pnpm + vite issue
([#&#8203;111](https://redirect.github.com/nodejs/require-in-the-middle/issues/111))
([8039296](80392968f5))

###
[`v7.5.1`](https://redirect.github.com/nodejs/require-in-the-middle/blob/HEAD/CHANGELOG.md#751-2025-02-06)

[Compare
Source](https://redirect.github.com/nodejs/require-in-the-middle/compare/v7.5.0...require-in-the-middle-v7.5.1)

##### Bug Fixes

- Runtime exception in Node SEA mode
([#&#8203;106](https://redirect.github.com/nodejs/require-in-the-middle/issues/106))
([d99df4b](d99df4b20a))

###
[`v7.5.0`](https://redirect.github.com/nodejs/require-in-the-middle/blob/HEAD/CHANGELOG.md#v750)

[Compare
Source](https://redirect.github.com/nodejs/require-in-the-middle/compare/v7.4.0...v7.5.0)

- Use Node.js core `require.resolve()`, rather than
`require('resolve').sync()`, when available.
This can be a performance
improvemen[https://github.com/nodejs/require-in-the-middle/pull/96](https://redirect.github.com/nodejs/require-in-the-middle/pull/96)/pull/96)

</details>

<details>
<summary>salesforce/tough-cookie (tough-cookie)</summary>

###
[`v5.1.2`](https://redirect.github.com/salesforce/tough-cookie/releases/tag/v5.1.2)

[Compare
Source](https://redirect.github.com/salesforce/tough-cookie/compare/v5.1.1...v5.1.2)

#### What's Changed

- Fix regression bug in `domainMatch` by
[@&#8203;colincasey](https://redirect.github.com/colincasey) in
[https://github.com/salesforce/tough-cookie/pull/500](https://redirect.github.com/salesforce/tough-cookie/pull/500)
- Prepare v5.1.2 by
[@&#8203;colincasey](https://redirect.github.com/colincasey) in
[https://github.com/salesforce/tough-cookie/pull/501](https://redirect.github.com/salesforce/tough-cookie/pull/501)

**Full Changelog**:
https://github.com/salesforce/tough-cookie/compare/v5.1.1...v5.1.2

###
[`v5.1.1`](https://redirect.github.com/salesforce/tough-cookie/releases/tag/v5.1.1)

[Compare
Source](https://redirect.github.com/salesforce/tough-cookie/compare/v5.1.0...v5.1.1)

#### What's Changed

- chore: avoid nodejs modules by
[@&#8203;wjhsf](https://redirect.github.com/wjhsf) in
[https://github.com/salesforce/tough-cookie/pull/487](https://redirect.github.com/salesforce/tough-cookie/pull/487)
- Bump the dev-dependencies group with 7 updates by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/salesforce/tough-cookie/pull/490](https://redirect.github.com/salesforce/tough-cookie/pull/490)
- Bump tldts from 6.1.71 to 6.1.76 in the production-dependencies group
by [@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/salesforce/tough-cookie/pull/489](https://redirect.github.com/salesforce/tough-cookie/pull/489)
- Bump eslint-config-prettier from 9.1.0 to 10.0.1 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/salesforce/tough-cookie/pull/491](https://redirect.github.com/salesforce/tough-cookie/pull/491)
- isolated modules and almost isolated declarations by
[@&#8203;wjhsf](https://redirect.github.com/wjhsf) in
[https://github.com/salesforce/tough-cookie/pull/486](https://redirect.github.com/salesforce/tough-cookie/pull/486)
- chore: auto-close spam PRs by
[@&#8203;wjhsf](https://redirect.github.com/wjhsf) in
[https://github.com/salesforce/tough-cookie/pull/493](https://redirect.github.com/salesforce/tough-cookie/pull/493)

**Full Changelog**:
https://github.com/salesforce/tough-cookie/compare/v5.1.0...v5.1.1

###
[`v5.1.0`](https://redirect.github.com/salesforce/tough-cookie/releases/tag/v5.1.0)

[Compare
Source](https://redirect.github.com/salesforce/tough-cookie/compare/v5.0.0...v5.1.0)

#### What's Changed

- Scheduled integration test with jsdom by
[@&#8203;colincasey](https://redirect.github.com/colincasey) in
[https://github.com/salesforce/tough-cookie/pull/450](https://redirect.github.com/salesforce/tough-cookie/pull/450)
- Update README.md by
[@&#8203;colincasey](https://redirect.github.com/colincasey) in
[https://github.com/salesforce/tough-cookie/pull/454](https://redirect.github.com/salesforce/tough-cookie/pull/454)
- fix: remove cookies that expire at epoch time of `0` by
[@&#8203;colincasey](https://redirect.github.com/colincasey) in
[https://github.com/salesforce/tough-cookie/pull/457](https://redirect.github.com/salesforce/tough-cookie/pull/457)
- Restore missing `expiryDate` method by
[@&#8203;colincasey](https://redirect.github.com/colincasey) in
[https://github.com/salesforce/tough-cookie/pull/459](https://redirect.github.com/salesforce/tough-cookie/pull/459)
- Bump tldts from 6.1.41 to 6.1.48 in the production-dependencies group
by [@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/salesforce/tough-cookie/pull/461](https://redirect.github.com/salesforce/tough-cookie/pull/461)
- Bump the dev-dependencies group with 7 updates by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/salesforce/tough-cookie/pull/462](https://redirect.github.com/salesforce/tough-cookie/pull/462)
- fix(path-match): avoid parsing path as regex by
[@&#8203;wjhsf](https://redirect.github.com/wjhsf) in
[https://github.com/salesforce/tough-cookie/pull/465](https://redirect.github.com/salesforce/tough-cookie/pull/465)
- Bump tldts from 6.1.48 to 6.1.57 in the production-dependencies group
by [@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/salesforce/tough-cookie/pull/466](https://redirect.github.com/salesforce/tough-cookie/pull/466)
- Bump the dev-dependencies group with 8 updates by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/salesforce/tough-cookie/pull/467](https://redirect.github.com/salesforce/tough-cookie/pull/467)
- Bump tldts from 6.1.57 to 6.1.65 in the production-dependencies group
by [@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/salesforce/tough-cookie/pull/468](https://redirect.github.com/salesforce/tough-cookie/pull/468)
- Bump the dev-dependencies group across 1 directory with 8 updates by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/salesforce/tough-cookie/pull/471](https://redirect.github.com/salesforce/tough-cookie/pull/471)
- chore: streamline package publishing by
[@&#8203;wjhsf](https://redirect.github.com/wjhsf) in
[https://github.com/salesforce/tough-cookie/pull/453](https://redirect.github.com/salesforce/tough-cookie/pull/453)
- Bump the dev-dependencies group across 1 directory with 8 updates by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/salesforce/tough-cookie/pull/476](https://redirect.github.com/salesforce/tough-cookie/pull/476)
- Bump tldts from 6.1.65 to 6.1.71 in the production-dependencies group
across 1 directory by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/salesforce/tough-cookie/pull/478](https://redirect.github.com/salesforce/tough-cookie/pull/478)
- Fix npm token config for publish by
[@&#8203;colincasey](https://redirect.github.com/colincasey) in
[https://github.com/salesforce/tough-cookie/pull/482](https://redirect.github.com/salesforce/tough-cookie/pull/482)
- Give permissions for provenance generation by
[@&#8203;colincasey](https://redirect.github.com/colincasey) in
[https://github.com/salesforce/tough-cookie/pull/483](https://redirect.github.com/salesforce/tough-cookie/pull/483)
- revert: use runtime-agnostic `domainToASCII` by
[@&#8203;wjhsf](https://redirect.github.com/wjhsf) in
[https://github.com/salesforce/tough-cookie/pull/480](https://redirect.github.com/salesforce/tough-cookie/pull/480)
- Prepare release v5.1.0 by
[@&#8203;colincasey](https://redirect.github.com/colincasey) in
[https://github.com/salesforce/tough-cookie/pull/484](https://redirect.github.com/salesforce/tough-cookie/pull/484)

**Full Changelog**:
https://github.com/salesforce/tough-cookie/compare/v5.0.0...v5.1.0

</details>

<details>
<summary>uuidjs/uuid (uuid)</summary>

###
[`v11.1.0`](https://redirect.github.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1110-2025-02-19)

[Compare
Source](https://redirect.github.com/uuidjs/uuid/compare/v11.0.5...v11.1.0)

##### Features

- update TS types to allow`Uint8Array` subtypes for `buffer` option
([#&#8203;865](https://redirect.github.com/uuidjs/uuid/issues/865))
([a5231e7](a5231e7e1b))

###
[`v11.0.5`](https://redirect.github.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1105-2025-01-09)

[Compare
Source](https://redirect.github.com/uuidjs/uuid/compare/v11.0.4...v11.0.5)

##### Bug Fixes

- add TS unit test, pin to typescript@5.0.4
([#&#8203;860](https://redirect.github.com/uuidjs/uuid/issues/860))
([24ac2fd](24ac2fd067))

###
[`v11.0.4`](https://redirect.github.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1104-2025-01-05)

[Compare
Source](https://redirect.github.com/uuidjs/uuid/compare/v11.0.3...v11.0.4)

##### Bug Fixes

- **docs:** insure -> ensure
([#&#8203;843](https://redirect.github.com/uuidjs/uuid/issues/843))
([d2a61e1](d2a61e154d))
- exclude tests from published package
([#&#8203;840](https://redirect.github.com/uuidjs/uuid/issues/840))
([f992ff4](f992ff4780))
- Test for invalid byte array sizes and ranges in `v1()`, `v4()`, and
`v7()`
([#&#8203;845](https://redirect.github.com/uuidjs/uuid/issues/845))
([e0ee900](e0ee90051e))

###
[`v11.0.3`](https://redirect.github.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1103-2024-11-04)

[Compare
Source](https://redirect.github.com/uuidjs/uuid/compare/v11.0.2...v11.0.3)

##### Bug Fixes

- apply stricter typing to the v\* signatures
([#&#8203;831](https://redirect.github.com/uuidjs/uuid/issues/831))
([c2d3fed](c2d3fed22c))
- export internal uuid types
([#&#8203;833](https://redirect.github.com/uuidjs/uuid/issues/833))
([341edf4](341edf444c))
- remove sourcemaps
([#&#8203;827](https://redirect.github.com/uuidjs/uuid/issues/827))
([b93ea10](b93ea101af))
- revert "simplify type for v3 and v5"
([#&#8203;835](https://redirect.github.com/uuidjs/uuid/issues/835))
([e2dee69](e2dee691e9))

###
[`v11.0.2`](https://redirect.github.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1102-2024-10-28)

[Compare
Source](https://redirect.github.com/uuidjs/uuid/compare/v11.0.1...v11.0.2)

##### Bug Fixes

- remove wrapper.mjs
([#&#8203;822](https://redirect.github.com/uuidjs/uuid/issues/822))
([6683ad3](6683ad38b0))

###
[`v11.0.1`](https://redirect.github.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1101-2024-10-27)

[Compare
Source](https://redirect.github.com/uuidjs/uuid/compare/v11.0.0...v11.0.1)

##### Bug Fixes

- restore package.json#browser field
([#&#8203;817](https://redirect.github.com/uuidjs/uuid/issues/817))
([ae8f386](ae8f38657b))

###
[`v11.0.0`](https://redirect.github.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1100-2024-10-26)

[Compare
Source](https://redirect.github.com/uuidjs/uuid/compare/v10.0.0...v11.0.0)

##### ⚠ BREAKING CHANGES

- refactor v1 internal state and options logic
([#&#8203;780](https://redirect.github.com/uuidjs/uuid/issues/780))
- refactor v7 internal state and options logic, fixes
[#&#8203;764](https://redirect.github.com/uuidjs/uuid/issues/764)
([#&#8203;779](https://redirect.github.com/uuidjs/uuid/issues/779))
- Port to TypeScript, closes
[#&#8203;762](https://redirect.github.com/uuidjs/uuid/issues/762)
([#&#8203;763](https://redirect.github.com/uuidjs/uuid/issues/763))
- update node support matrix (only support node 16-20)
([#&#8203;750](https://redirect.github.com/uuidjs/uuid/issues/750))

##### Features

- Port to TypeScript, closes
[#&#8203;762](https://redirect.github.com/uuidjs/uuid/issues/762)
([#&#8203;763](https://redirect.github.com/uuidjs/uuid/issues/763))
([1e0f987](1e0f9870db))
- update node support matrix (only support node 16-20)
([#&#8203;750](https://redirect.github.com/uuidjs/uuid/issues/750))
([883b163](883b163b9a))

##### Bug Fixes

- missing v7 expectations in browser spec
([#&#8203;751](https://redirect.github.com/uuidjs/uuid/issues/751))
([f54a866](f54a866ced))
- refactor v1 internal state and options logic
([#&#8203;780](https://redirect.github.com/uuidjs/uuid/issues/780))
([031b3d3](031b3d3d73))
- refactor v7 internal state and options logic, fixes
[#&#8203;764](https://redirect.github.com/uuidjs/uuid/issues/764)
([#&#8203;779](https://redirect.github.com/uuidjs/uuid/issues/779))
([9dbd1cd](9dbd1cd417))
- remove v4 options default assignment preventing native.randomUUID from
being used
([#&#8203;786](https://redirect.github.com/uuidjs/uuid/issues/786))
([afe6232](afe62323c4)),
closes [#&#8203;763](https://redirect.github.com/uuidjs/uuid/issues/763)
- seq_hi shift for byte 6
([#&#8203;775](https://redirect.github.com/uuidjs/uuid/issues/775))
([1d532ca](1d532ca374))
- tsconfig module type
([#&#8203;778](https://redirect.github.com/uuidjs/uuid/issues/778))
([7eff835](7eff835cba))

</details>
2025-03-12 14:44:25 +01:00
Elena Shostak
fcb15aca84
[Authz]: added reason for authorization opt-out for search routes (#213879)
## Summary

Added justification for opting out of authorization for search routes.


### Checklist

- [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-03-12 14:40:47 +01:00
Francesco Fagnani
1b8fcd21e3
[Synthetics] Fix UI issue on Last test run panel and changed breadcrumb string when creating a monitor (#213874)
This PR fixes #200921.

This is the final result, where the step details button is correctly
shown.
<img width="511" alt="Screenshot 2025-03-11 at 09 57 33"
src="https://github.com/user-attachments/assets/c6017848-635a-4af5-aebc-68979ae115f9"
/>

This PR also fixes #212246.
<img width="1143" alt="Screenshot 2025-03-11 at 11 09 55"
src="https://github.com/user-attachments/assets/20b75ba4-ce99-4cc9-a827-11e5cb03a6da"
/>
2025-03-12 14:21:06 +01:00
Kevin Qualters
887f82ebed
[SIEM migrations] Make lookup indices space aware (#213458)
## Summary

Changes how we use lookup indices so that they are now space aware, in
the form
```
`${LOOKUPS_INDEX_PREFIX}${this.spaceId}_${lookupName}`
```

### 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-03-12 14:18:47 +01:00
Maxim Palenov
6b87869dc0
[Security Solution] Fix inconsistent rule's modified status after applying bulk actions (#214115)
## Summary

Fixes a problem [`Bulk adding tags to rules marks some rules as customized and doesn't mark other rules as customized. It looks like it depends on the existence of the base version.`](https://github.com/elastic/kibana/pull/212761#pullrequestreview-2675994950) discovered while smoke testing after enabling Prebuilt Rules Customization FF.

## Details

The problems manifests as some rules have `Modified` badge missing after modifying tags via bulk actions.

The root cause is that current bulk actions implementation expects unmodified rule's data in `paramsModifier()` callback. But Alerting Framework's Rules Client invokes `paramsModifier()` providing already modified rule. Alerting Framework managed fields like `rule.tags` have modified values.

The fix makes sure rule customizartion state is calculated by using unmodified rule data.

## Screenshots

Before:

https://github.com/user-attachments/assets/eeb65b18-c51f-4c5e-b0e6-6552e442994e

After:

https://github.com/user-attachments/assets/d18d8765-4f40-4513-95a1-2cd84ac2a0a9
2025-03-12 14:10:38 +01:00
Carlos Crespo
4502a930d5
[APM] Storybook support for the new service map API response (#213980)
closes [213126](https://github.com/elastic/kibana/issues/213126)

## Summary

Add support for the new API response to the Service Map storybook



![storybook](https://github.com/user-attachments/assets/3e5fbf96-ccee-43a7-b64f-b5a81fd52998)
2025-03-12 12:38:11 +01:00
Paulina Shakirova
e10f16ae69
[WIP] Home plugin js-ts migration (Part 1) (#208375)
## Summary

- Moving last Home plugin components from `js` to `tsx`
- Adding TS support
- Styling changes/ clean up
- Fixing bugs that were unnoticed without ts support
- Creating or updating unit tests
         -  shifting from `enzyme` to `testing-library/react`
         - removing snapshots in favor of selectors
2025-03-12 12:05:37 +01:00
David Sánchez
87e2edd599
[Security Solution] [Defend Workflows] Enables skipped tests in 9.0 (#213399)
## Summary

Enables skipped tests in 9.0 and previous stack versions.

closes: https://github.com/elastic/kibana/issues/180401
closes: https://github.com/elastic/kibana/issues/203894
closes: https://github.com/elastic/kibana/issues/205141
closes: https://github.com/elastic/kibana/issues/206204
closes: https://github.com/elastic/kibana/issues/209056
closes: https://github.com/elastic/kibana/issues/209064
closes: https://github.com/elastic/kibana/issues/209063
closes: https://github.com/elastic/kibana/issues/209066
closes: https://github.com/elastic/kibana/issues/209065

This one will be tracked in a follow up pr:
https://github.com/elastic/kibana/issues/203916

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-12 11:43:40 +01:00
Shahzad
9100170e29
[Synthetics] Refactor: Create monitor configs repository !! (#202325)
## Summary

Create monitor configs repository around monitor saved object to make
sure all operations are performed from same class.

This will be helpful when we create a new saved object to support
multiple-spaces !!

### Testing
All unit tests, api tests passing should be more than enough !!

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-12 10:43:25 +01:00
Pierre Gayvallet
ed7178674c
Use inferenceChatModel for playground (#210756)
## Summary

Part of https://github.com/elastic/kibana/issues/206710

Wire the new `InferenceChatModel` into playground. Please refer to
https://github.com/elastic/kibana/pull/210756 for the reasons behind
that change.

### testing

Tested with all 4 supported connectors:

<img width="1673" alt="Screenshot 2025-02-12 at 10 32 43"
src="https://github.com/user-attachments/assets/45d76fc1-79c5-4e17-bc4d-4f7aa173f892"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-12 09:18:18 +01:00
Shahzad
40dd061823
[Synthetics] Fix service name usage from project monitors !! (#212229)
## Summary

In support of https://github.com/elastic/synthetics/pull/974

Fix service name usage from project monitors !!

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/cb88cb9c-f4a2-41e9-a869-96c25d14ec67"
/>
2025-03-12 05:45:11 +01:00
Paulo Silva
5f05349930
[Asset Inventory] Onboarding No Data Found component (#213506)
## Summary

It closes #210715

This PR introduces the No Data Found onboarding screen, which displays
the Asset Inventory Enabled success callout and the Integrations Card
Grid component from Security Onboarding.

Success Callout visibility is stored in local storage for persisting
visibility dismissal, also, the callout is only enabled for the user who
initiated the enablement.

This PR also includes:
- Moving the renderWithTestProvider into a reusable function
- Moving some onboarding test subj to the constants file
- Added the missing test file for the navigation onboarding screen.

**Note:** Customization of the Integrations Card Grid component for
asset inventory will be done in a separate task.

## Recording


https://github.com/user-attachments/assets/e8f4b363-7d31-4bd8-a2d3-d234f4a0b34b
2025-03-11 19:52:17 -07:00
Patryk Kopyciński
0b9cceb574
[Attack discovery] Fix error handling in LM studio (#213855)
## Summary

Error were not properly propagated to the user and instead of meaningful
message we were displaying just `API Error`.

<img width="1813" alt="Zrzut ekranu 2025-03-11 o 03 47 59"
src="https://github.com/user-attachments/assets/8d059159-f020-4944-a463-b10799e7fa46"
/>
 
 
 

Steps to reproduce, Thank you @andrew-goldstein 🙇 

**Desk testing**

To reproduce:

1. In LM Studio, download the `MLX` variant (optimized for Mac) of
`Llama-3.2-3B-Instruct-4bit`:

```
mlx-community/Llama-3.2-3B-Instruct-4bit
```

2. Configure the model to have a context length of `131072` tokens, as
illustrated by the screenshot below:


![context_length](https://github.com/user-attachments/assets/505f64af-6d03-4f66-a485-7b25ebc4cae2)

3. Serve ONLY the model above in LM Studio. (Ensure no other models are
running in LM Studio), as illustrated by the screenshot below:


![one_model_running](https://github.com/user-attachments/assets/af29bea5-4cc3-401c-87d8-4b5778acdfe6)

4. Configure a connector via the details in
<https://www.elastic.co/guide/en/security/current/connect-to-byo-llm.html>

but change:

```
local-model
```

to the name of the model when configuring the connector:

```
llama-3.2-3b-instruct
```

as illustrated by the screenshot below:


![connector](https://github.com/user-attachments/assets/5c2bcba3-6cc0-4066-833b-fe68d4c64569)

5. Generate Attack discoveries

**Expected results**

- Generation does NOT fail with the error described in the later steps
below.
- Progress on generating discoveries is visible in Langsmith, as
illustrated by the screenshot below:


![langsmith](https://github.com/user-attachments/assets/ac2f36f4-35de-4cc9-b9aa-8b9e09d32569)

Note: `Llama-3.2-3B-Instruct-4bit` may not reliably generate Attack
discoveries, so generation may still fail after `10` generation /
refinement steps.

6. In LM studio, serve a _second_ model, as illustrated by the
screenshot below:


![llm_studio_2nd_model](https://github.com/user-attachments/assets/93eda24c-c016-4f81-919c-0cbf5ffb63b0)

7. Once again, generate Attack discoveries

**Expected results**

- Generation does NOT fail with the errors below
- Progress on generating discoveries is visible in Langsmith, though as
noted above, generation may still fail after `10` attempts if the model
does not produce output that conforms to the expected schema

**Actual results**

- Generation fails with an error similar to:

```
generate node is unable to parse (openai) response from attempt 0; (this may be an incomplete response from the model): Status code: 400. Message: API Error:
Bad Request: ActionsClientLlm: action result status is error: an error occurred while running the action - Status code: 400. Message: API Error: Bad Request,
```

or

```
generate node is unable to parse (openai) response from attempt 0; (this may be an incomplete response from the model): Status code: 404. Message: API Error: Not Found - Model "llama-3.2-3b-instruct" not found. Please specify a valid model.
```

as illustrated by the following screenshot:


![error](https://github.com/user-attachments/assets/8d059159-f020-4944-a463-b10799e7fa46)
2025-03-12 03:06:48 +01:00
Lisa Cawley
86ddd8cf3a
[DOCS] Add APM rule parameter descriptions (#213186) 2025-03-12 00:55:21 +01:00
Rodney Norris
59bf352f0a
[Search] refactor(search_playground): use routes for playground views (#213976)
## Summary

Updated playground rendering to utilize routes for when to render query
vs preview and search vs chat instead of maintain state for both of
these. The page mode was controled by both a route and state, but now
it's always read from a route parameter instead of using state.

This is to cleanup how we decide what to render in the playground
overview component and make it easier to reason about what is being
shown.

### 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)
- [ ]
[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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-12 00:26:16 +01:00
Maxim Palenov
f7d4f19096
[Security Solution] Enable prebuilt rules customization feature flag (#212761)
**Addresses:** https://github.com/elastic/kibana/issues/180267

## Summary

This PR enables `prebuiltRulesCustomizationEnabled` feature flag.

## Details

Besides simply enabling `prebuiltRulesCustomizationEnabled` feature flag the following required changes were done

- failed tests due enabling the FF were fixed
- FF setting was removed from test configurations (integrations and Cypress tests)
- FF logic was removed from the codebase. Disabling the FF would require roll back test changes as well. So just in case we have to disable the FF it's simpler to roll back the PR's commit.
2025-03-11 22:45:49 +01:00
Søren Louv-Jansen
3ed6e4583e
[Obs AI Assistant] Add API test for execute_query tool (#213517)
- Adds test for `execute_query` function
- Add `drop_null_columns` to esql query in order to avoid column
explosion

Depends on: https://github.com/elastic/kibana/pull/213231

---------

Co-authored-by: Viduni Wickramarachchi <viduni.ushanka@gmail.com>
2025-03-11 22:45:28 +01:00
Marshall Main
323cbdb9cd
[Detection Engine] Add apm context info for security rule executions (#211088)
## Summary

Adds extra labels and context for security rule executions. Follow up
work will add more context specific to the different security rule type.
This PR focuses on capturing information about the configuration in
logic shared across all rule types.

The info collected is generally intended for use to narrow down _why_ a
rule might be performing poorly. The `rule_id` param is collected so we
can aggregate and identify prebuilt rules that perform poorly across
many environments and ask the TRaDE team to help tune the rule
query/config.

## Testing

![image](https://github.com/user-attachments/assets/f207265a-47ba-4f1f-a19e-3cfbd85461b1)

1. Spin up an Observability cluster on cloud.elastic.co
2. Setup your local cluster to send APM data to the cloud cluster
```
elastic:
  apm:
    active: true
    serverUrl: <apm url from cloud console>
    secretToken: <secret token>
```
To find the secret token, login to Kibana on your cloud obs cluster and
go to `Management -> Fleet -> Elastic cloud agent policy -> Elastic APM
-> Agent Authorization -> Secret token`
3. Run rules in your local test environment. Observe APM data in the
cloud cluster

## Uses
In addition to debugging, we can use this new apm data to create
dashboards like the screenshot below, showing the slowest rules by
`rule_id` (only one rule in the test environment, but in production this
would show the slowest rules across all apm enabled clusters).

![image](https://github.com/user-attachments/assets/59e8af39-49e6-40df-9b1d-1b4005e256d8)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-11 15:29:06 -04:00
Maxim Palenov
d01b9c6911
[Security Solution] Disallow merging critical rule field values upon rule upgrade when base version is missing (#213757)
## Summary

This PR makes changes to force target version for critical rule fields upon upgrade when rule's base version isn't found.

## Details

In case of missing base version rule upgrade diff algorithm isn't able to detect rule customizations. The only thing it's able to determine is different current and target field values. It tries to merge mergeable fields whenever possible. In fact mergeable fields are only scalar arrays. There are 4 fields processed that way

- `tags`
- `references`
- `threat_index`
- `new_terms`

However, `threat_index` and `new_terms` are critical rule fields impacting what alerts rule is gonna generate. Auto-merged values have much higher chance to be improper.

This PR **changes** the current behavior for `threat_index` and `new_terms`. It forces target field version when base rule version isn't found.

## How to test

To test this fix an updated prebuilt rule asset should be created. Follow the next steps for that

- Start fresh ES and Kibana (clear any ES data before)
- Open Rules Management page to install the latest prebuilt rules package (`8.17.6` currently)
- Install a threat match rule (e.g. `Threat Intel Hash Indicator Match`) and a new terms rule (e.g. `AWS EC2 Route Table Modified or Deleted`)
- Create new prebuilt rule assets. You may copy and paste suggested queries below. Make sure to run them under `system_indicies_superuser`/`changeme` user.

    <details>
    <summary>PUT a new Threat Match prebuilt rule asset</summary>
    
    ```
    PUT  .kibana_security_solution/_doc/security-rule:aab184d3-72b3-4639-b242-6597c99d8bca_10
    {
        "security-rule": {
        "author": [
            "Elastic"
        ],
        "description": "This rule is triggered when a hash indicator from the Threat Intel Filebeat module or integrations has a match against an event that contains file hashes, such as antivirus alerts, process creation, library load, and file operation events.",
        "from": "now-65m",
        "index": [
            "auditbeat-*",
            "endgame-*",
            "filebeat-*",
            "logs-*",
            "winlogbeat-*"
        ],
        "interval": "1h",
        "language": "kuery",
        "license": "Elastic License v2",
        "name": "Threat Intel Hash Indicator Match",
        "note": """## Triage and analysis
    
    ### Investigating Threat Intel Hash Indicator Match
    
    Threat Intel indicator match rules allow matching from a local observation, such as an endpoint event that records a file hash with an entry of a file hash stored within the Threat Intel integrations index.
    
    Matches are based on threat intelligence data that's been ingested during the last 30 days. Some integrations don't place expiration dates on their threat indicators, so we strongly recommend validating ingested threat indicators and reviewing match results. When reviewing match results, check associated activity to determine whether the event requires additional investigation.
    
    This rule is triggered when a hash indicator from the Threat Intel Filebeat module or an indicator ingested from a threat intelligence integration matches against an event that contains file hashes, such as antivirus alerts, file operation events, etc.
    
    > **Note**:
    > This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/current/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.
    
    #### Possible investigation steps
    
    - Gain context about the field that matched the local observation. This information can be found in the `threat.indicator.matched.field` field.
    - Investigate the hash , which can be found in the `threat.indicator.matched.atomic` field:
    - Search for the existence and reputation of the hash in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.
    - Scope other potentially compromised hosts in your environment by mapping hosts with file operations involving the same hash.
    - Identify the process that created the file.
    - Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
    - Enrich the information that you have right now by determining how the file was dropped, where it was downloaded from, etc. This can help you determine if the event is part of an ongoing campaign against the organization.
    - Retrieve the involved file and examine the host for derived artifacts that indicate suspicious activities:
    - Analyze the process executable using a private sandboxed analysis system.
    - Observe and collect information about the following activities in both the sandbox and the alert subject host:
    - Attempts to contact external domains and addresses.
    - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.
    - Examine the DNS cache for suspicious or anomalous entries.
    - !{osquery{"label":"Osquery - Retrieve DNS Cache","query":"SELECT * FROM dns_cache"}}
    - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.
    - Examine the host services for suspicious or anomalous entries.
    - !{osquery{"label":"Osquery - Retrieve All Services","query":"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services"}}
    - !{osquery{"label":"Osquery - Retrieve Services Running on User Accounts","query":"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\nuser_account == null)\n"}}
    - !{osquery{"label":"Osquery - Retrieve Service Unsigned Executables with Virustotal Link","query":"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\n"}}
    - Using the data collected through the analysis, scope users targeted and other machines infected in the environment.
    
    ### False Positive Analysis
    
    - Adversaries often use legitimate tools as network administrators, such as `PsExec` or `AdFind`. These tools are often included in indicator lists, which creates the potential for false positives.
    
    ### Response and Remediation
    
    - Initiate the incident response process based on the outcome of the triage.
    - Isolate the involved host to prevent further post-compromise behavior.
    - If the triage identified malware, search the environment for additional compromised hosts.
    - Implement temporary network rules, procedures, and segmentation to contain the malware.
    - Stop suspicious processes.
    - Immediately block the identified indicators of compromise (IoCs).
    - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
    - Remove and block malicious artifacts identified during triage.
    - Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
    - Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
    - Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
    """,
        "query": """file.hash.*:* or process.hash.*:* or dll.hash.*:*
    """,
        "references": [
            "https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-threatintel.html",
            "https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html",
            "https://www.elastic.co/security/tip"
        ],
        "required_fields": [
            {
            "ecs": false,
            "name": "dll.hash.*",
            "type": "unknown"
            },
            {
            "ecs": false,
            "name": "file.hash.*",
            "type": "unknown"
            },
            {
            "ecs": false,
            "name": "process.hash.*",
            "type": "unknown"
            }
        ],
        "risk_score": 99,
        "rule_id": "aab184d3-72b3-4639-b242-6597c99d8bca",
        "setup": """## Setup
    
    This rule needs threat intelligence indicators to work.
    Threat intelligence indicators can be collected using an [Elastic Agent integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#agent-ti-integration),
    the [Threat Intel module](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#ti-mod-integration),
    or a [custom integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#custom-ti-integration).
    
    More information can be found [here](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html).
    """,
        "severity": "critical",
        "tags": [
            "OS: Windows",
            "Data Source: Elastic Endgame",
            "Rule Type: Threat Match",
            "Resources: Investigation Guide"
        ],
        "threat_filters": [
            {
            "$state": {
                "store": "appState"
            },
            "meta": {
                "disabled": false,
                "key": "event.category",
                "negate": false,
                "params": {
                "query": "threat"
                },
                "type": "phrase"
            },
            "query": {
                "match_phrase": {
                "event.category": "threat"
                }
            }
            },
            {
            "$state": {
                "store": "appState"
            },
            "meta": {
                "disabled": false,
                "key": "event.kind",
                "negate": false,
                "params": {
                "query": "enrichment"
                },
                "type": "phrase"
            },
            "query": {
                "match_phrase": {
                "event.kind": "enrichment"
                }
            }
            },
            {
            "$state": {
                "store": "appState"
            },
            "meta": {
                "disabled": false,
                "key": "event.type",
                "negate": false,
                "params": {
                "query": "indicator"
                },
                "type": "phrase"
            },
            "query": {
                "match_phrase": {
                "event.type": "indicator"
                }
            }
            }
        ],
        "threat_index": [
            "logs-ti_*"
        ],
        "threat_indicator_path": "threat.indicator",
        "threat_language": "kuery",
        "threat_mapping": [
            {
            "entries": [
                {
                "field": "file.hash.md5",
                "type": "mapping",
                "value": "threat.indicator.file.hash.md5"
                }
            ]
            },
            {
            "entries": [
                {
                "field": "file.hash.sha1",
                "type": "mapping",
                "value": "threat.indicator.file.hash.sha1"
                }
            ]
            },
            {
            "entries": [
                {
                "field": "file.hash.sha256",
                "type": "mapping",
                "value": "threat.indicator.file.hash.sha256"
                }
            ]
            },
            {
            "entries": [
                {
                "field": "dll.hash.md5",
                "type": "mapping",
                "value": "threat.indicator.file.hash.md5"
                }
            ]
            },
            {
            "entries": [
                {
                "field": "dll.hash.sha1",
                "type": "mapping",
                "value": "threat.indicator.file.hash.sha1"
                }
            ]
            },
            {
            "entries": [
                {
                "field": "dll.hash.sha256",
                "type": "mapping",
                "value": "threat.indicator.file.hash.sha256"
                }
            ]
            },
            {
            "entries": [
                {
                "field": "process.hash.md5",
                "type": "mapping",
                "value": "threat.indicator.file.hash.md5"
                }
            ]
            },
            {
            "entries": [
                {
                "field": "process.hash.sha1",
                "type": "mapping",
                "value": "threat.indicator.file.hash.sha1"
                }
            ]
            },
            {
            "entries": [
                {
                "field": "process.hash.sha256",
                "type": "mapping",
                "value": "threat.indicator.file.hash.sha256"
                }
            ]
            }
        ],
        "threat_query": "@timestamp >= \"now-30d/d\" and event.module:(threatintel or ti_*) and (threat.indicator.file.hash.*:* or threat.indicator.file.pe.imphash:*) and not labels.is_ioc_transform_source:\"true\"",
        "timeline_id": "495ad7a7-316e-4544-8a0f-9c098daee76e",
        "timeline_title": "Generic Threat Match Timeline",
        "timestamp_override": "event.ingested",
        "type": "threat_match",
        "version": 10
        },
        "type": "security-rule",
        "references": [],
        "managed": true,
        "coreMigrationVersion": "8.8.0",
        "updated_at": "2025-03-11T07:21:44.100Z",
        "created_at": "2025-03-11T07:21:44.100Z"
    }
    ```
    </details>

     <details>
    <summary>PUT a new New Terms prebuilt rule asset</summary>
    
    ```
   PUT  .kibana_security_solution/_doc/security-rule:e7cd5982-17c8-4959-874c-633acde7d426_209
    {
        "security-rule": {
        "author": [
            "Elastic",
            "Austin Songer"
        ],
        "description": "Identifies AWS CloudTrail events where an EC2 route table or association has been modified or deleted. Route table or association modifications can be used by attackers to disrupt network traffic, reroute communications, or maintain persistence in a compromised environment. This is a [New Terms](https://www.elastic.co/guide/en/security/current/rules-ui-create.html#create-new-terms-rule) rule that detects the first instance of this behavior by the `aws.cloudtrail.user_identity.arn` field in the last 10 days.",
        "false_positives": [
            "Route Table could be modified or deleted by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Route Table being modified from unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule. Also automated processes that use Terraform may lead to false positives."
        ],
        "from": "now-9m",
        "history_window_start": "now-10d",
        "index": [
            "filebeat-*",
            "logs-aws.cloudtrail-*"
        ],
        "language": "kuery",
        "license": "Elastic License v2",
        "name": "AWS EC2 Route Table Modified or Deleted",
        "new_terms_fields": [
            "test"
        ],
        "note": """## Triage and Analysis
    
    ### Investigating AWS EC2 Route Table Modified or Deleted
    
    This rule detects modifications or deletions of AWS route tables using actions such as `ReplaceRoute`, `ReplaceRouteTableAssociation`, `DeleteRouteTable`, `DeleteRoute`, or `DisassociateRouteTable`. These actions may indicate legitimate administrative activity, but they can also be abused by attackers to disrupt network traffic, reroute communications, or maintain persistence in a compromised environment.
    
    #### Possible Investigation Steps
    
    - **Review Request Parameters:**
    - Check the `aws.cloudtrail.flattened.request_parameters` field. The sub-fields may vary depending on the `event.action` (e.g., `routeTableId` for `DeleteRouteTable`, `destinationCidrBlock` for `ReplaceRoute`).
    - Validate the affected route table, routes, or associations based on the API call:
    - For `ReplaceRoute`: Look for changes in specific routes using `destinationCidrBlock`.
    - For `ReplaceRouteTableAssociation`: Review the new association details (e.g., subnet ID).
    - For `DeleteRouteTable`: Confirm the `routeTableId` of the deleted table.
    - For `DisassociateRouteTable`: Verify the disassociated resources.
    
    - **Review User Context**:
    - **User Identity**: Inspect the `aws.cloudtrail.user_identity.arn` field to determine the user or role initiating the action. Investigate whether this user is authorized to perform these operations.
    - **Access Key ID**: Check the `aws.cloudtrail.user_identity.access_key_id` field to identify if the access key used was expected or potentially compromised.
    - **Access Patterns**: Validate whether the user or role has a history of performing route table modifications and whether this aligns with their expected responsibilities.
    
    - **Analyze Request Details**:
    - **Action Type**: Verify the specific API call in the `event.action` field (e.g., `ReplaceRoute`, `DeleteRouteTable`) to understand the nature of the modification.
    - **Source IP and Geolocation**: Examine the `source.address` and `source.geo` fields to confirm whether the request originated from a trusted location. Suspicious geolocations or IPs may indicate adversarial activity.
    - **User Agent**: Review the `user_agent.original` field to determine the tool used for the request (e.g., AWS CLI, Terraform). Unusual or custom user agents may indicate malicious intent.
    
    - **Correlate with Other Activity**:
    - **Concurrent API Calls**: Look for related API calls (e.g., `CreateRoute`, `AuthorizeSecurityGroupIngress`, or `ModifyInstanceAttribute`) from the same user or IP to detect broader attack patterns.
    - **IAM Changes**: Investigate whether any IAM policy updates or privilege escalation attempts preceded this activity.
    - **Unusual Volume of Changes**: Check if the user has performed multiple route table modifications or deletions in a short timeframe.
    
    - **Validate the Intent**:
    - **Planned Changes**: Confirm with administrators whether the route table changes were part of a planned update or maintenance activity.
    - **Permissions and Justification**: Ensure that the user or role has the least privilege necessary for these actions and that there is a valid reason for modifying the route table.
    
    ### False Positive Analysis
    
    - **Routine Administration**: Route table modifications are often part of routine administrative tasks, such as creating new routes, updating associations, or removing unused resources.
    - **Automation Tools**: Automated workflows, such as those executed by Terraform or CloudFormation, may trigger these events. Verify whether the `user_agent.original` field or source IP matches known automation tools.
    - **Maintenance or Scaling**: Confirm whether these actions align with maintenance activities or scaling events (e.g., adding or removing subnets).
    
    ### Response and Remediation
    
    - **Revoke Unauthorized Permissions**: If unauthorized, remove permissions for `ec2:ReplaceRoute`, `ec2:DeleteRouteTable`, or other related actions from the user or role.
    - **Restore the Route Table**:
    - If critical networking was impacted, restore the route table or reapply previous configurations from backups or Terraform state files.
    - Verify connectivity to affected subnets or instances to ensure no disruptions to services.
    - **Audit IAM Policies**:
    - Limit route table modification permissions to specific trusted users, roles, or automation accounts.
    - Implement conditions in IAM policies, such as source IP restrictions, to reduce the risk of unauthorized access.
    - **Monitor and Alert**:
    - Set up additional alerts for unexpected route table modifications or deletions.
    - Use VPC flow logs and CloudTrail to monitor for related suspicious activity.
    - **Secure Automation**: Ensure automation tools, such as Terraform or CloudFormation, are configured securely and that their credentials are stored in secure locations like AWS Secrets Manager.
    """,
        "query": """event.dataset: "aws.cloudtrail"
    and event.provider: "ec2.amazonaws.com"
    and event.action:(
    "ReplaceRoute" or
    "ReplaceRouteTableAssociation" or
    "DeleteRouteTable" or
    "DeleteRoute" or
    "DisassociateRouteTable"
    )
    and event.outcome: "success"
    and not source.address: (
    "cloudformation.amazonaws.com" or
    "servicecatalog.amazonaws.com" or
    "fsx.amazonaws.com"
    )
    """,
        "references": [
            "https://github.com/easttimor/aws-incident-response#network-routing",
            "https://docs.datadoghq.com/security_platform/default_rules/aws-ec2-route-table-modified/",
            "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ReplaceRoute.html",
            "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ReplaceRouteTableAssociation",
            "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteRouteTable.html",
            "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteRoute.html",
            "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateRouteTable.html"
        ],
        "related_integrations": [
            {
            "integration": "cloudtrail",
            "package": "aws",
            "version": "^2.0.0"
            }
        ],
        "required_fields": [
            {
            "ecs": true,
            "name": "event.action",
            "type": "keyword"
            },
            {
            "ecs": true,
            "name": "event.dataset",
            "type": "keyword"
            },
            {
            "ecs": true,
            "name": "event.outcome",
            "type": "keyword"
            },
            {
            "ecs": true,
            "name": "event.provider",
            "type": "keyword"
            },
            {
            "ecs": true,
            "name": "source.address",
            "type": "keyword"
            }
        ],
        "risk_score": 21,
        "rule_id": "e7cd5982-17c8-4959-874c-633acde7d426",
        "severity": "low",
        "tags": [
            "Domain: Cloud",
            "Data Source: AWS",
            "Data Source: Amazon Web Services",
            "Data Source: AWS EC2",
            "Use Case: Network Security Monitoring",
            "Resources: Investigation Guide",
            "Tactic: Persistence"
        ],
        "threat": [
            {
            "framework": "MITRE ATT&CK",
            "tactic": {
                "id": "TA0003",
                "name": "Persistence",
                "reference": "https://attack.mitre.org/tactics/TA0003/"
            },
            "technique": []
            }
        ],
        "timestamp_override": "event.ingested",
        "type": "new_terms",
        "version": 209
        },
        "type": "security-rule",
        "references": [],
        "managed": true,
        "coreMigrationVersion": "8.8.0",
        "updated_at": "2025-03-11T07:21:44.889Z",
        "created_at": "2025-03-11T07:21:44.889Z"
    }
    ```
    </details>

- Remove the base versions

  <details>
    <summary>Remove Threat Match rule's base version</summary>

    ```
    DELETE .kibana_security_solution/_doc/security-rule:aab184d3-72b3-4639-b242-6597c99d8bca_9
    ```
  </details>

    <details>
    <summary>Remove New Terms rule's base version</summary>

    ```
    DELETE .kibana_security_solution/_doc/security-rule:e7cd5982-17c8-4959-874c-633acde7d426_208
    ```
    </details>
 
- Customize rule data source
- Open Prebuilt Rule Upgrade flyout and notice there are fields with solvable conflict
- Bulk update rules
- Notice Threat Match Index and New Terms Fields got target values. Data source value was set to target as well. Rules aren't marked as customized (there is not a "Modified" badge).
2025-03-11 20:06:29 +01:00