Skip to content

Conversation

@jkelas
Copy link
Contributor

@jkelas jkelas commented Sep 12, 2025

Partially resolves: #140369

Summary

This PR is a follow up for the #234571, where I am introducing telemetry event with array of primitive string values.
In order to display these values in Kibana Lens, a runtime mapping needs to be done in the security-solution-ebt-kibana-server data view. Before that, it was done manually. I am introducing support for arrays, so that manual intervention is not needed for them.

Checklist

  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

@jkelas jkelas self-assigned this Sep 12, 2025
@jkelas jkelas added Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area backport:version Backport to applied version labels v9.2.0 v8.18.8 v8.19.5 v9.0.8 v9.1.5 labels Sep 12, 2025
@jkelas jkelas force-pushed the add_support_for_arrays_in_build_ebt_views_script branch from 936ca5f to 413a065 Compare September 12, 2025 13:27
@jkelas jkelas added the release_note:skip Skip the PR/issue when compiling release notes label Sep 12, 2025
@jkelas jkelas marked this pull request as ready for review September 12, 2025 14:25
@jkelas jkelas requested a review from a team as a code owner September 12, 2025 14:25
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the script improvement!

Copy link
Contributor

@maximpn maximpn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jkelas Thanks for extending the schema flattening logic to support different array types 🙏

My main concern is maintainability. It might be required to extend the logic in the future so it has to be readable. Unfortunately five folded if's aren't very readable. In fact we have BFS searching for type fields so we could re-write the implementation based on that idea. I've made a code sketch how it could look like in a simpler way but it's it's not tested.

So we could have some unit tests to make sure the implementation works as expected.

Comment on lines 172 to 183
const item = node.items;
if (item && typeof item === 'object') {
if ('type' in item && item.type) {
// array of primitive types
result[newKey] = String(item.type);
} else if (item.properties) {
// array of objects
queue.push({ obj: item.properties, prefix: `${newKey}.` });
} else {
// unknown array item type, leave it unaffected
result[newKey] = 'array';
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it being extracted to a separate function and restructured to avoid deep folded ifs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I played around to come up with a simpler version and ended up with the following

function flattenSchema(inputObj: NestedObject): Record<string, string> {
  const result: { [key: string]: string } = {};
  const queue: Array<{ obj: NestedObject; prefix: string }> = [{ obj: inputObj, prefix: '' }];
  while (queue.length > 0) {
    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
    const { obj, prefix } = queue.shift()!;
    for (const key in obj) {
      if (typeof obj[key] === 'object' && obj[key] !== null) {
        const newKey = `${prefix}${key}`;

        const { childToInspect, nodeType } = inspectSchemaNode(obj[key]);

        if (childToInspect) {
          queue.push({ obj: childToInspect, prefix: `${newKey}.` });
        }

        if (nodeType) {
          result[newKey] = nodeType;
        }
      }
    }
  }

  return result;
}

interface InspectSchemaNodeResult {
  childToInspect?: NestedObject | NestedSchemaNode;
  nodeType?: string;
}

function inspectSchemaNode(node: NestedSchemaNode): InspectSchemaNodeResult {
  if (!node.type) {
    const objectNode = node.properties ?? node;

    return { childToInspect: objectNode };
  }

  if (node.type === 'array' && node.items) {
    return inspectArraySchemaNode(node);
  }

  return { nodeType: String(node.type) };
}

function inspectArraySchemaNode(node: NestedSchemaNode): InspectSchemaNodeResult {
  const itemSchema = node.items;

  if (typeof itemSchema !== 'object' || itemSchema === null) {
    // "items" schema is not defined or not an object, leave it unaffected
    return { nodeType: 'array' };
  }

  if ('type' in itemSchema && itemSchema.type) {
    // array of primitive types
    return { nodeType: String(itemSchema.type) };
  }

  if (itemSchema.properties) {
    // array of objects
    return { childToInspect: itemSchema.properties };
  }

  return {};
}

There is an issue with types. To make it working types should be defined as a union of object and array schemas.

And I haven't tested my code so I could missed an if condition.

@jkelas
Copy link
Contributor Author

jkelas commented Sep 16, 2025

@jkelas Thanks for extending the schema flattening logic to support different array types 🙏

My main concern is maintainability. It might be required to extend the logic in the future so it has to be readable. Unfortunately five folded if's aren't very readable. In fact we have BFS searching for type fields so we could re-write the implementation based on that idea. I've made a code sketch how it could look like in a simpler way but it's it's not tested.

So we could have some unit tests to make sure the implementation works as expected.

Yes, I agree. I was trying to make the changes as little invasive as possible, because there were no unit tests and I tried to push this quickly, but I agree, I can add the tests and then restructure the code.

@jkelas jkelas requested a review from maximpn September 16, 2025 08:49
Copy link
Contributor

@maximpn maximpn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jkelas Thanks for addressing my comments and adding tests 🙏

I've left nit comments to further make the implementation simpler.

Comment on lines 164 to 166
function isObjectRecord(x: unknown): x is Record<string, unknown> {
return typeof x === 'object' && x !== null;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: isObjectRecord might be removed in favor of Lodash's isObject.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will improve

Comment on lines 168 to 205
function inspectArraySchemaNode(node: NestedSchemaNode): InspectSchemaNodeResult {
const item = node.items;

if (!isObjectRecord(item)) {
return { nodeType: 'array' };
}

if ('type' in item && (item as NestedSchemaNode).type) {
const t = String((item as NestedSchemaNode).type);
if (t === 'array') return { nodeType: 'array' }; // array-of-arrays -> keep "array"
return { nodeType: t }; // array of primitives
}

if (
(item as NestedSchemaNode).properties &&
isObjectRecord((item as NestedSchemaNode).properties)
) {
return { childToInspect: (item as NestedSchemaNode).properties as NestedObject }; // array of objects
}

return { nodeType: 'array' };
}

function flattenSchema(inputObj: NestedObject): { [key: string]: string } {
const result: { [key: string]: string } = {};
function inspectSchemaNode(node: NestedSchemaNode): InspectSchemaNodeResult {
if (!node.type) {
const objectNode = node.properties ?? (node as unknown as NestedObject);
return { childToInspect: objectNode };
}

if (node.type === 'array') {
return inspectArraySchemaNode(node);
}

return { nodeType: String(node.type) };
}

export function flattenSchema(inputObj: NestedObject): Record<string, string> {
const result: Record<string, string> = {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Let's move these functions to this file's bottom. These inspect functions are implementation details so it's logical to see the exported members first.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

return { nodeType: 'array' };
}

if ('type' in item && (item as NestedSchemaNode).type) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To get rid of type casting node schema TS type could be simplified to

interface NestedSchemaNode {
  type?: string;
  properties?: NestedSchemaNode;
  items?: NestedSchemaNode;
  [key: string]: unknown;
}

This simplified type could be used in args and return types. With that you'd need only a single casting in flattenSchema

const { childToInspect, nodeType } = inspectSchemaNode(node as NestedSchemaNode);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, thx, will improve

},
},
},
} as any;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of any it's possible to use @ts-expect-error above const out = flattenSchema(schema); line.

@jkelas jkelas removed the request for review from marshallmain September 17, 2025 07:00
@jkelas jkelas merged commit f0e38a3 into elastic:main Sep 17, 2025
12 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.18, 8.19, 9.0, 9.1

https://github.com/elastic/kibana/actions/runs/17790809288

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Saved Objects .kibana field count

Every field in each saved object type adds overhead to Elasticsearch. Kibana needs to keep the total field count below Elasticsearch's default limit of 1000 fields. Only specify field mappings for the fields you wish to search on or query. See https://www.elastic.co/guide/en/kibana/master/saved-objects-service.html#_mappings

id before after diff
_data_stream_timestamp 1 - -1
_doc_count 1 - -1
_ignored_source 1 - -1
_index_mode 1 - -1
_inference_fields 1 - -1
_tier 1 - -1
apm-custom-dashboards 5 - -5
apm-server-schema 2 - -2
apm-service-group 5 - -5
application_usage_daily 2 - -2
config 2 - -2
config-global 2 - -2
coreMigrationVersion 1 - -1
created_at 1 - -1
created_by 1 - -1
entity-definition 9 - -9
entity-discovery-api-key 2 - -2
event_loop_delays_daily 2 - -2
favorites 4 - -4
file 11 - -11
file-upload-usage-collection-telemetry 3 - -3
fileShare 5 - -5
infra-custom-dashboards 4 - -4
infrastructure-monitoring-log-view 2 - -2
intercept_trigger_record 5 - -5
legacy-url-alias 7 - -7
managed 1 - -1
ml-job 6 - -6
ml-module 13 - -13
ml-trained-model 7 - -7
monitoring-telemetry 2 - -2
namespace 1 - -1
namespaces 1 - -1
observability-onboarding-state 2 - -2
originId 1 - -1
product-doc-install-status 7 - -7
references 4 - -4
sample-data-telemetry 3 - -3
security-ai-prompt 8 - -8
slo 11 - -11
space 5 - -5
synthetics-monitor 34 - -34
synthetics-monitor-multi-space 34 - -34
tag 4 - -4
type 1 - -1
typeMigrationVersion 1 - -1
ui-metric 2 - -2
updated_at 1 - -1
updated_by 1 - -1
upgrade-assistant-ml-upgrade-operation 3 - -3
upgrade-assistant-reindex-operation 3 - -3
uptime-synthetics-api-key 2 - -2
url 5 - -5
usage-counters 2 - -2
total -246
Unknown metric groups

ESLint disabled in files

id before after diff
securitySolution 102 103 +1

ESLint disabled line counts

id before after diff
securitySolution 677 678 +1

Total ESLint disabled count

id before after diff
securitySolution 779 781 +2

History

cc @jkelas

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 17, 2025
…s script (elastic#234905)

**Partially resolves: elastic#140369**

## Summary

This PR is a follow up for the elastic#234571, where I am introducing telemetry
event with array of primitive string values.
In order to display these values in Kibana Lens, a runtime mapping needs
to be done in the `security-solution-ebt-kibana-server` data view.
Before that, it was done manually. I am introducing support for arrays,
so that manual intervention is not needed for them.

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

---------

Co-authored-by: Maxim Palenov <[email protected]>
(cherry picked from commit f0e38a3)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 17, 2025
…s script (elastic#234905)

**Partially resolves: elastic#140369**

## Summary

This PR is a follow up for the elastic#234571, where I am introducing telemetry
event with array of primitive string values.
In order to display these values in Kibana Lens, a runtime mapping needs
to be done in the `security-solution-ebt-kibana-server` data view.
Before that, it was done manually. I am introducing support for arrays,
so that manual intervention is not needed for them.

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

---------

Co-authored-by: Maxim Palenov <[email protected]>
(cherry picked from commit f0e38a3)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 17, 2025
…s script (elastic#234905)

**Partially resolves: elastic#140369**

## Summary

This PR is a follow up for the elastic#234571, where I am introducing telemetry
event with array of primitive string values.
In order to display these values in Kibana Lens, a runtime mapping needs
to be done in the `security-solution-ebt-kibana-server` data view.
Before that, it was done manually. I am introducing support for arrays,
so that manual intervention is not needed for them.

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

---------

Co-authored-by: Maxim Palenov <[email protected]>
(cherry picked from commit f0e38a3)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 17, 2025
…s script (elastic#234905)

**Partially resolves: elastic#140369**

## Summary

This PR is a follow up for the elastic#234571, where I am introducing telemetry
event with array of primitive string values.
In order to display these values in Kibana Lens, a runtime mapping needs
to be done in the `security-solution-ebt-kibana-server` data view.
Before that, it was done manually. I am introducing support for arrays,
so that manual intervention is not needed for them.

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

---------

Co-authored-by: Maxim Palenov <[email protected]>
(cherry picked from commit f0e38a3)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.18
8.19
9.0
9.1

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Sep 17, 2025
…ta_views script (#234905) (#235312)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Security Solution] Add support for arrays in the
build_ebt_data_views script
(#234905)](#234905)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Jacek
Kolezynski","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-09-17T07:58:32Z","message":"[Security
Solution] Add support for arrays in the build_ebt_data_views script
(#234905)\n\n**Partially resolves: #140369**\n\n## Summary\n\nThis PR is
a follow up for the #234571, where I am introducing telemetry\nevent
with array of primitive string values.\nIn order to display these values
in Kibana Lens, a runtime mapping needs\nto be done in the
`security-solution-ebt-kibana-server` data view.\nBefore that, it was
done manually. I am introducing support for arrays,\nso that manual
intervention is not needed for them.\n\n\n### Checklist\n\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Maxim Palenov
<[email protected]>","sha":"f0e38a357dfbfe535ca77438d7afabde9c9b9cf2","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","Feature:Prebuilt Detection
Rules","backport:version","v9.2.0","v8.18.8","v8.19.5","v9.0.8","v9.1.5"],"title":"[Security
Solution] Add support for arrays in the build_ebt_data_views
script","number":234905,"url":"https://github.com/elastic/kibana/pull/234905","mergeCommit":{"message":"[Security
Solution] Add support for arrays in the build_ebt_data_views script
(#234905)\n\n**Partially resolves: #140369**\n\n## Summary\n\nThis PR is
a follow up for the #234571, where I am introducing telemetry\nevent
with array of primitive string values.\nIn order to display these values
in Kibana Lens, a runtime mapping needs\nto be done in the
`security-solution-ebt-kibana-server` data view.\nBefore that, it was
done manually. I am introducing support for arrays,\nso that manual
intervention is not needed for them.\n\n\n### Checklist\n\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Maxim Palenov
<[email protected]>","sha":"f0e38a357dfbfe535ca77438d7afabde9c9b9cf2"}},"sourceBranch":"main","suggestedTargetBranches":["8.18","8.19","9.0","9.1"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/234905","number":234905,"mergeCommit":{"message":"[Security
Solution] Add support for arrays in the build_ebt_data_views script
(#234905)\n\n**Partially resolves: #140369**\n\n## Summary\n\nThis PR is
a follow up for the #234571, where I am introducing telemetry\nevent
with array of primitive string values.\nIn order to display these values
in Kibana Lens, a runtime mapping needs\nto be done in the
`security-solution-ebt-kibana-server` data view.\nBefore that, it was
done manually. I am introducing support for arrays,\nso that manual
intervention is not needed for them.\n\n\n### Checklist\n\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Maxim Palenov
<[email protected]>","sha":"f0e38a357dfbfe535ca77438d7afabde9c9b9cf2"}},{"branch":"8.18","label":"v8.18.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jacek Kolezynski <[email protected]>
Co-authored-by: Maxim Palenov <[email protected]>
kibanamachine added a commit that referenced this pull request Sep 17, 2025
…a_views script (#234905) (#235314)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Security Solution] Add support for arrays in the
build_ebt_data_views script
(#234905)](#234905)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Jacek
Kolezynski","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-09-17T07:58:32Z","message":"[Security
Solution] Add support for arrays in the build_ebt_data_views script
(#234905)\n\n**Partially resolves: #140369**\n\n## Summary\n\nThis PR is
a follow up for the #234571, where I am introducing telemetry\nevent
with array of primitive string values.\nIn order to display these values
in Kibana Lens, a runtime mapping needs\nto be done in the
`security-solution-ebt-kibana-server` data view.\nBefore that, it was
done manually. I am introducing support for arrays,\nso that manual
intervention is not needed for them.\n\n\n### Checklist\n\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Maxim Palenov
<[email protected]>","sha":"f0e38a357dfbfe535ca77438d7afabde9c9b9cf2","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","Feature:Prebuilt Detection
Rules","backport:version","v9.2.0","v8.18.8","v8.19.5","v9.0.8","v9.1.5"],"title":"[Security
Solution] Add support for arrays in the build_ebt_data_views
script","number":234905,"url":"https://github.com/elastic/kibana/pull/234905","mergeCommit":{"message":"[Security
Solution] Add support for arrays in the build_ebt_data_views script
(#234905)\n\n**Partially resolves: #140369**\n\n## Summary\n\nThis PR is
a follow up for the #234571, where I am introducing telemetry\nevent
with array of primitive string values.\nIn order to display these values
in Kibana Lens, a runtime mapping needs\nto be done in the
`security-solution-ebt-kibana-server` data view.\nBefore that, it was
done manually. I am introducing support for arrays,\nso that manual
intervention is not needed for them.\n\n\n### Checklist\n\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Maxim Palenov
<[email protected]>","sha":"f0e38a357dfbfe535ca77438d7afabde9c9b9cf2"}},"sourceBranch":"main","suggestedTargetBranches":["8.18","8.19","9.0","9.1"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/234905","number":234905,"mergeCommit":{"message":"[Security
Solution] Add support for arrays in the build_ebt_data_views script
(#234905)\n\n**Partially resolves: #140369**\n\n## Summary\n\nThis PR is
a follow up for the #234571, where I am introducing telemetry\nevent
with array of primitive string values.\nIn order to display these values
in Kibana Lens, a runtime mapping needs\nto be done in the
`security-solution-ebt-kibana-server` data view.\nBefore that, it was
done manually. I am introducing support for arrays,\nso that manual
intervention is not needed for them.\n\n\n### Checklist\n\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Maxim Palenov
<[email protected]>","sha":"f0e38a357dfbfe535ca77438d7afabde9c9b9cf2"}},{"branch":"8.18","label":"v8.18.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jacek Kolezynski <[email protected]>
Co-authored-by: Maxim Palenov <[email protected]>
kibanamachine added a commit that referenced this pull request Sep 17, 2025
…a_views script (#234905) (#235313)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Security Solution] Add support for arrays in the
build_ebt_data_views script
(#234905)](#234905)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Jacek
Kolezynski","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-09-17T07:58:32Z","message":"[Security
Solution] Add support for arrays in the build_ebt_data_views script
(#234905)\n\n**Partially resolves: #140369**\n\n## Summary\n\nThis PR is
a follow up for the #234571, where I am introducing telemetry\nevent
with array of primitive string values.\nIn order to display these values
in Kibana Lens, a runtime mapping needs\nto be done in the
`security-solution-ebt-kibana-server` data view.\nBefore that, it was
done manually. I am introducing support for arrays,\nso that manual
intervention is not needed for them.\n\n\n### Checklist\n\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Maxim Palenov
<[email protected]>","sha":"f0e38a357dfbfe535ca77438d7afabde9c9b9cf2","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","Feature:Prebuilt Detection
Rules","backport:version","v9.2.0","v8.18.8","v8.19.5","v9.0.8","v9.1.5"],"title":"[Security
Solution] Add support for arrays in the build_ebt_data_views
script","number":234905,"url":"https://github.com/elastic/kibana/pull/234905","mergeCommit":{"message":"[Security
Solution] Add support for arrays in the build_ebt_data_views script
(#234905)\n\n**Partially resolves: #140369**\n\n## Summary\n\nThis PR is
a follow up for the #234571, where I am introducing telemetry\nevent
with array of primitive string values.\nIn order to display these values
in Kibana Lens, a runtime mapping needs\nto be done in the
`security-solution-ebt-kibana-server` data view.\nBefore that, it was
done manually. I am introducing support for arrays,\nso that manual
intervention is not needed for them.\n\n\n### Checklist\n\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Maxim Palenov
<[email protected]>","sha":"f0e38a357dfbfe535ca77438d7afabde9c9b9cf2"}},"sourceBranch":"main","suggestedTargetBranches":["8.18","8.19","9.0","9.1"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/234905","number":234905,"mergeCommit":{"message":"[Security
Solution] Add support for arrays in the build_ebt_data_views script
(#234905)\n\n**Partially resolves: #140369**\n\n## Summary\n\nThis PR is
a follow up for the #234571, where I am introducing telemetry\nevent
with array of primitive string values.\nIn order to display these values
in Kibana Lens, a runtime mapping needs\nto be done in the
`security-solution-ebt-kibana-server` data view.\nBefore that, it was
done manually. I am introducing support for arrays,\nso that manual
intervention is not needed for them.\n\n\n### Checklist\n\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Maxim Palenov
<[email protected]>","sha":"f0e38a357dfbfe535ca77438d7afabde9c9b9cf2"}},{"branch":"8.18","label":"v8.18.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jacek Kolezynski <[email protected]>
Co-authored-by: Maxim Palenov <[email protected]>
kibanamachine added a commit that referenced this pull request Sep 17, 2025
…ta_views script (#234905) (#235311)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Security Solution] Add support for arrays in the
build_ebt_data_views script
(#234905)](#234905)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Jacek
Kolezynski","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-09-17T07:58:32Z","message":"[Security
Solution] Add support for arrays in the build_ebt_data_views script
(#234905)\n\n**Partially resolves: #140369**\n\n## Summary\n\nThis PR is
a follow up for the #234571, where I am introducing telemetry\nevent
with array of primitive string values.\nIn order to display these values
in Kibana Lens, a runtime mapping needs\nto be done in the
`security-solution-ebt-kibana-server` data view.\nBefore that, it was
done manually. I am introducing support for arrays,\nso that manual
intervention is not needed for them.\n\n\n### Checklist\n\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Maxim Palenov
<[email protected]>","sha":"f0e38a357dfbfe535ca77438d7afabde9c9b9cf2","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","Feature:Prebuilt Detection
Rules","backport:version","v9.2.0","v8.18.8","v8.19.5","v9.0.8","v9.1.5"],"title":"[Security
Solution] Add support for arrays in the build_ebt_data_views
script","number":234905,"url":"https://github.com/elastic/kibana/pull/234905","mergeCommit":{"message":"[Security
Solution] Add support for arrays in the build_ebt_data_views script
(#234905)\n\n**Partially resolves: #140369**\n\n## Summary\n\nThis PR is
a follow up for the #234571, where I am introducing telemetry\nevent
with array of primitive string values.\nIn order to display these values
in Kibana Lens, a runtime mapping needs\nto be done in the
`security-solution-ebt-kibana-server` data view.\nBefore that, it was
done manually. I am introducing support for arrays,\nso that manual
intervention is not needed for them.\n\n\n### Checklist\n\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Maxim Palenov
<[email protected]>","sha":"f0e38a357dfbfe535ca77438d7afabde9c9b9cf2"}},"sourceBranch":"main","suggestedTargetBranches":["8.18","8.19","9.0","9.1"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/234905","number":234905,"mergeCommit":{"message":"[Security
Solution] Add support for arrays in the build_ebt_data_views script
(#234905)\n\n**Partially resolves: #140369**\n\n## Summary\n\nThis PR is
a follow up for the #234571, where I am introducing telemetry\nevent
with array of primitive string values.\nIn order to display these values
in Kibana Lens, a runtime mapping needs\nto be done in the
`security-solution-ebt-kibana-server` data view.\nBefore that, it was
done manually. I am introducing support for arrays,\nso that manual
intervention is not needed for them.\n\n\n### Checklist\n\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Maxim Palenov
<[email protected]>","sha":"f0e38a357dfbfe535ca77438d7afabde9c9b9cf2"}},{"branch":"8.18","label":"v8.18.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jacek Kolezynski <[email protected]>
Co-authored-by: Maxim Palenov <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Sep 24, 2025
…s script (elastic#234905)

**Partially resolves: elastic#140369**

## Summary

This PR is a follow up for the elastic#234571, where I am introducing telemetry
event with array of primitive string values.
In order to display these values in Kibana Lens, a runtime mapping needs
to be done in the `security-solution-ebt-kibana-server` data view.
Before that, it was done manually. I am introducing support for arrays,
so that manual intervention is not needed for them.


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

---------

Co-authored-by: Maxim Palenov <[email protected]>
niros1 pushed a commit that referenced this pull request Sep 30, 2025
…s script (#234905)

**Partially resolves: #140369**

## Summary

This PR is a follow up for the #234571, where I am introducing telemetry
event with array of primitive string values.
In order to display these values in Kibana Lens, a runtime mapping needs
to be done in the `security-solution-ebt-kibana-server` data view.
Before that, it was done manually. I am introducing support for arrays,
so that manual intervention is not needed for them.


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

---------

Co-authored-by: Maxim Palenov <[email protected]>
rylnd pushed a commit to rylnd/kibana that referenced this pull request Oct 17, 2025
…s script (elastic#234905)

**Partially resolves: elastic#140369**

## Summary

This PR is a follow up for the elastic#234571, where I am introducing telemetry
event with array of primitive string values.
In order to display these values in Kibana Lens, a runtime mapping needs
to be done in the `security-solution-ebt-kibana-server` data view.
Before that, it was done manually. I am introducing support for arrays,
so that manual intervention is not needed for them.


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

---------

Co-authored-by: Maxim Palenov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area release_note:skip Skip the PR/issue when compiling release notes Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.18.7 v8.19.4 v9.0.7 v9.1.4 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Security Solution] Collect usage statistics for prebuilt rule customization

6 participants