Skip to content

[Security Solution] Adds customized_fields and has_base_version fields to internal rule schema#235394

Merged
dplumlee merged 4 commits intoelastic:mainfrom
dplumlee:rule-customizations-field-internal-schema
Sep 20, 2025
Merged

[Security Solution] Adds customized_fields and has_base_version fields to internal rule schema#235394
dplumlee merged 4 commits intoelastic:mainfrom
dplumlee:rule-customizations-field-internal-schema

Conversation

@dplumlee
Copy link
Contributor

@dplumlee dplumlee commented Sep 17, 2025

Summary

Precursor to #234793

Must go into serverless before that PR is merged in

Adds new fields related to customized rule alert telemetry to the internal rule schema, an addition that must be done before adding them to the security rule schemas (e.g. RuleResponse, etc.)

@dplumlee dplumlee self-assigned this Sep 17, 2025
@dplumlee dplumlee added release_note:enhancement 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 v9.1.5 labels Sep 17, 2025
@dplumlee dplumlee marked this pull request as ready for review September 17, 2025 15:26
@dplumlee dplumlee requested review from a team as code owners September 17, 2025 15:26
@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

@jkelas jkelas left a comment

Choose a reason for hiding this comment

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

LGTM.
Done some basic exploratory testing to make sure that our features work correctly.
Approving.

z.object({
type: z.literal('external'),
isCustomized: IsExternalRuleCustomized,
customizedFields: z
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to add new parameter to external schemas too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's what this PR is doing. We need to add it to the internal rule schemas first due to our intermediate release practice with rule schema modifications

@dplumlee dplumlee enabled auto-merge (squash) September 20, 2025 15:31
@dplumlee dplumlee merged commit a15e334 into elastic:main Sep 20, 2025
12 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 9.1

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

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

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

History

cc @dplumlee

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 20, 2025
…ields to internal rule schema (elastic#235394)

## Summary

Precursor to elastic#234793

**Must go into serverless before that PR is merged in**

Adds new fields related to [customized rule alert
telemetry](elastic#230856) to the
internal rule schema, an addition that must be done before adding them
to the security rule schemas (e.g. `RuleResponse`, etc.)

(cherry picked from commit a15e334)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
9.1

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

Questions ?

Please refer to the Backport tool documentation

delanni pushed a commit that referenced this pull request Sep 22, 2025
…35922)

Adds the missing props added by
#235394 to the registered rule
types schema snapshot.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 22, 2025
…astic#235922)

Adds the missing props added by
elastic#235394 to the registered rule
types schema snapshot.

(cherry picked from commit fa205bc)
@dplumlee dplumlee deleted the rule-customizations-field-internal-schema branch September 22, 2025 13:04
kibanamachine added a commit that referenced this pull request Sep 23, 2025
…ion` fields to internal rule schema (#235394) (#235897)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Security Solution] Adds `customized_fields` and `has_base_version`
fields to internal rule schema
(#235394)](#235394)

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

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

<!--BACKPORT [{"author":{"name":"Davis
Plumlee","email":"56367316+dplumlee@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-09-20T19:09:45Z","message":"[Security
Solution] Adds `customized_fields` and `has_base_version` fields to
internal rule schema (#235394)\n\n## Summary\n\nPrecursor to
https://github.com/elastic/kibana/pull/234793\n\n**Must go into
serverless before that PR is merged in**\n\nAdds new fields related to
[customized rule
alert\ntelemetry](#230856) to
the\ninternal rule schema, an addition that must be done before adding
them\nto the security rule schemas (e.g. `RuleResponse`,
etc.)","sha":"a15e3345fe5c7cc7171112710d27b555f517acaa","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","Feature:Prebuilt Detection
Rules","backport:version","v9.2.0","v9.1.5"],"title":"[Security
Solution] Adds `customized_fields` and `has_base_version` fields to
internal rule
schema","number":235394,"url":"https://github.com/elastic/kibana/pull/235394","mergeCommit":{"message":"[Security
Solution] Adds `customized_fields` and `has_base_version` fields to
internal rule schema (#235394)\n\n## Summary\n\nPrecursor to
https://github.com/elastic/kibana/pull/234793\n\n**Must go into
serverless before that PR is merged in**\n\nAdds new fields related to
[customized rule
alert\ntelemetry](#230856) to
the\ninternal rule schema, an addition that must be done before adding
them\nto the security rule schemas (e.g. `RuleResponse`,
etc.)","sha":"a15e3345fe5c7cc7171112710d27b555f517acaa"}},"sourceBranch":"main","suggestedTargetBranches":["9.1"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/235394","number":235394,"mergeCommit":{"message":"[Security
Solution] Adds `customized_fields` and `has_base_version` fields to
internal rule schema (#235394)\n\n## Summary\n\nPrecursor to
https://github.com/elastic/kibana/pull/234793\n\n**Must go into
serverless before that PR is merged in**\n\nAdds new fields related to
[customized rule
alert\ntelemetry](#230856) to
the\ninternal rule schema, an addition that must be done before adding
them\nto the security rule schemas (e.g. `RuleResponse`,
etc.)","sha":"a15e3345fe5c7cc7171112710d27b555f517acaa"}},{"branch":"9.1","label":"v9.1.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: Davis Plumlee <56367316+dplumlee@users.noreply.github.com>
Co-authored-by: Davis Plumlee <davis.plumlee@elastic.co>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Sep 24, 2025
…ields to internal rule schema (elastic#235394)

## Summary

Precursor to elastic#234793

**Must go into serverless before that PR is merged in**

Adds new fields related to [customized rule alert
telemetry](elastic#230856) to the
internal rule schema, an addition that must be done before adding them
to the security rule schemas (e.g. `RuleResponse`, etc.)
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Sep 24, 2025
…astic#235922)

Adds the missing props added by
elastic#235394 to the registered rule
types schema snapshot.
niros1 pushed a commit that referenced this pull request Sep 30, 2025
…ields to internal rule schema (#235394)

## Summary

Precursor to #234793

**Must go into serverless before that PR is merged in**

Adds new fields related to [customized rule alert
telemetry](#230856) to the
internal rule schema, an addition that must be done before adding them
to the security rule schemas (e.g. `RuleResponse`, etc.)
niros1 pushed a commit that referenced this pull request Sep 30, 2025
…35922)

Adds the missing props added by
#235394 to the registered rule
types schema snapshot.
@banderror banderror added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:enhancement labels Oct 6, 2025
rylnd pushed a commit to rylnd/kibana that referenced this pull request Oct 17, 2025
…ields to internal rule schema (elastic#235394)

## Summary

Precursor to elastic#234793

**Must go into serverless before that PR is merged in**

Adds new fields related to [customized rule alert
telemetry](elastic#230856) to the
internal rule schema, an addition that must be done before adding them
to the security rule schemas (e.g. `RuleResponse`, etc.)
rylnd pushed a commit to rylnd/kibana that referenced this pull request Oct 17, 2025
…astic#235922)

Adds the missing props added by
elastic#235394 to the registered rule
types schema snapshot.
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. v9.1.5 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants