[9.6] [Logs] Bound `size` and column count in the log entries search strategy (#305692) #305929
All Vouch review confidence checks passed
Residual risk 0.45 = Change Risk (0.52) × (1 − Review Confidence (0.14)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 3% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #305929"
general
weight: 0.35
github-actions[bot]
Backport
This will backport the following commits from
mainto9.6:- [[Logs] Bound
sizeand column count in the log entries search strategy (#305692)](https://github.com/elastic/kibana/pull/305692)<!--- Backport version: 12.1.2 -->
Questions ?
Please refer to the Backport tool documentation
<!--BACKPORT [{"author":{"name":"Lucas Francisco López","email":"lucaslopezf@gmail.com"},"sourceCommit":{"committedDate":"2026-11-17T14:54:39Z","message":"[Logs] Bound
sizeand column count in the log entries search strategy (#305692)\n\nTheinfra-log-entriessearch strategy inlogs_sharedaccepted any\nsizeand any number of columns. The response holds one value per hit\nand column, and every message column carries its own copy of the\nformatted message. So memory per request grew withsize × columns,\nwith no limit.\n\nThis PR bounds both inputs:\n\n-sizemust be between 1 andLOG_ENTRIES_MAX_SIZE(1000). The\nrequest codec enforces this withinRangeRtfrom@kbn/io-ts-utils.\n- Request-supplied columns are limited toLOG_ENTRIES_MAX_COLUMNS\n(20). That covers bothparams.columnsand thelogColumnsof an\ninline log view (type: 'log-view-inline'), which is how an\nunprivileged user can send arbitrary columns. The check runs as soon as\nthe request is decoded, before the log view is resolved. So an oversized\nrequest never reaches Elasticsearch, including polling requests.\n- Persisted log views are not capped. Only users with write\nprivileges on log views can create them. On 8.19, the Logs settings page\nlets users add as many columns as they want, so existing views may\nlegitimately have more than 20.\n\nRejected requests now return 400 (KbnServerError) instead of 500.\nThis applies to every request that fails the codec, which were\npreviously reported as server errors.\n\nIn 9.x, nothing in the shipped UI calls this strategy. In 8.19, Logs\nStream does, and it keeps working with saved views of any width (see the\nscreenshots below).\n\n### How to test\n\n1. Runnode scripts/jest\nx-pack/platform/plugins/shared/logs_shared/server/services/log_entries.\n2. Run the new Scout API spec:\nnode scripts/scout run-tests --arch stateful --domain classic --config\nx-pack/platform/plugins/shared/logs_shared/test/scout/api/playwright.config.ts\n It checks that these are rejected with 400:\n -size: 1001\n - 21 request columns\n - an inline log view with 21 columns\n - a polling request with 21 columns\n\nIt also checks that a persisted log view with 21 columns, and an inline\nview at the 20-column limit, still return entries.\n3. On 8.19 (optional):\n - Enable theobservability:enableLogsStreamadvanced setting.\n - Open Logs → Settings, add more than 20 columns, and click Apply.\n - Open Logs → Stream. Entries should render without errors.\n\n### Screenshots (8.19)\n\nLogs settings with 22 columns, saved through the UI\n\n<img width=\"1920\" height=\"2721\" alt=\"02-8 19-settings-22-columns-saved\"\nsrc=\"https://github.com/user-attachments/assets/4651d393-1eca-437e-baac-5aaf926258fc\"\n/>\n\n\nLogs Stream rendering entries with that 22-column view\n\n<img width=\"1920\" height=\"1080\" alt=\"03-8 19-stream-22-columns-renders\"\nsrc=\"https://github.com/user-attachments/assets/2ca9220b-29e4-45e7-9166-34ab35efe9f7\"\n/>\n\n\n### Checklist\n\n- [x] Unit or functional\ntests\nwere updated or added to match the most common scenarios\n- [x] This was checked for breaking HTTP API changes. The route is\ninternal, persisted log views are unaffected, and the request limits are\nwell above what its only client (8.19 LogStream) sends.\n- [ ] The correctrelease_note:type label (orrelease_note:skip)\nis applied, the PR title reads as a release note, and the description\nhas a## Release notesection if a custom summary is needed, per the\nguidelines.\n- [ ] Review the backport\nguidelines\nand apply applicablebackport:labels.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"221a9d08a5fc3315cbc9ea04212da93a40add82b","branchLabelMapping":{"^v9.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","Team:obs-signals-logs","v9.7.0"],"title":"[Logs] Boundsizeand column count in the log entries search strategy","number":305692,"url":"https://github.com/elastic/kibana/pull/305692","mergeCommit":{"message":"[Logs] Boundsizeand column count in the log entries search strategy (#305692)\n\nTheinfra-log-entriessearch strategy inlogs_sharedaccepted any\nsizeand any number of columns. The response holds one value per hit\nand column, and every message column carries its own copy of the\nformatted message. So memory per request grew withsize × columns,\nwith no limit.\n\nThis PR bounds both inputs:\n\n-sizemust be between 1 andLOG_ENTRIES_MAX_SIZE(1000). The\nrequest codec enforces this withinRangeRtfrom@kbn/io-ts-utils.\n- Request-supplied columns are limited toLOG_ENTRIES_MAX_COLUMNS\n(20). That covers bothparams.columnsand thelogColumnsof an\ninline log view (type: 'log-view-inline'), which is how an\nunprivileged user can send arbitrary columns. The check runs as soon as\nthe request is decoded, before the log view is resolved. So an oversized\nrequest never reaches Elasticsearch, including polling requests.\n- Persisted log views are not capped. Only users with write\nprivileges on log views can create them. On 8.19, the Logs settings page\nlets users add as many columns as they want, so existing views may\nlegitimately have more than 20.\n\nRejected requests now return 400 (KbnServerError) instead of 500.\nThis applies to every request that fails the codec, which were\npreviously reported as server errors.\n\nIn 9.x, nothing in the shipped UI calls this strategy. In 8.19, Logs\nStream does, and it keeps working with saved views of any width (see the\nscreenshots below).\n\n### How to test\n\n1. Runnode scripts/jest\nx-pack/platform/plugins/shared/logs_shared/server/services/log_entries.\n2. Run the new Scout API spec:\nnode scripts/scout run-tests --arch stateful --domain classic --config\nx-pack/platform/plugins/shared/logs_shared/test/scout/api/playwright.config.ts\n It checks that these are rejected with 400:\n -size: 1001\n - 21 request columns\n - an inline log view with 21 columns\n - a polling request with 21 columns\n\nIt also checks that a persisted log view with 21 columns, and an inline\nview at the 20-column limit, still return entries.\n3. On 8.19 (optional):\n - Enable theobservability:enableLogsStreamadvanced setting.\n - Open Logs → Settings, add more than 20 columns, and click Apply.\n - Open Logs → Stream. Entries should render without errors.\n\n### Screenshots (8.19)\n\nLogs settings with 22 columns, saved through the UI\n\n<img width=\"1920\" height=\"2721\" alt=\"02-8 19-settings-22-columns-saved\"\nsrc=\"https://github.com/user-attachments/assets/4651d393-1eca-437e-baac-5aaf926258fc\"\n/>\n\n\nLogs Stream rendering entries with that 22-column view\n\n<img width=\"1920\" height=\"1080\" alt=\"03-8 19-stream-22-columns-renders\"\nsrc=\"https://github.com/user-attachments/assets/2ca9220b-29e4-45e7-9166-34ab35efe9f7\"\n/>\n\n\n### Checklist\n\n- [x] Unit or functional\ntests\nwere updated or added to match the most common scenarios\n- [x] This was checked for breaking HTTP API changes. The route is\ninternal, persisted log views are unaffected, and the request limits are\nwell above what its only client (8.19 LogStream) sends.\n- [ ] The correctrelease_note:type label (orrelease_note:skip)\nis applied, the PR title reads as a release note, and the description\nhas a## Release notesection if a custom summary is needed, per the\nguidelines.\n- [ ] Review the backport\nguidelines\nand apply applicablebackport:labels.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"221a9d08a5fc3315cbc9ea04212da93a40add82b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.7.0","branchLabelMappingKey":"^v9.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/305692","number":305692,"mergeCommit":{"message":"[Logs] Boundsizeand column count in the log entries search strategy (#305692)\n\nTheinfra-log-entriessearch strategy inlogs_sharedaccepted any\nsizeand any number of columns. The response holds one value per hit\nand column, and every message column carries its own copy of the\nformatted message. So memory per request grew withsize × columns,\nwith no limit.\n\nThis PR bounds both inputs:\n\n-sizemust be between 1 andLOG_ENTRIES_MAX_SIZE(1000). The\nrequest codec enforces this withinRangeRtfrom@kbn/io-ts-utils.\n- Request-supplied columns are limited toLOG_ENTRIES_MAX_COLUMNS\n(20). That covers bothparams.columnsand thelogColumnsof an\ninline log view (type: 'log-view-inline'), which is how an\nunprivileged user can send arbitrary columns. The check runs as soon as\nthe request is decoded, before the log view is resolved. So an oversized\nrequest never reaches Elasticsearch, including polling requests.\n- Persisted log views are not capped. Only users with write\nprivileges on log views can create them. On 8.19, the Logs settings page\nlets users add as many columns as they want, so existing views may\nlegitimately have more than 20.\n\nRejected requests now return 400 (KbnServerError) instead of 500.\nThis applies to every request that fails the codec, which were\npreviously reported as server errors.\n\nIn 9.x, nothing in the shipped UI calls this strategy. In 8.19, Logs\nStream does, and it keeps working with saved views of any width (see the\nscreenshots below).\n\n### How to test\n\n1. Runnode scripts/jest\nx-pack/platform/plugins/shared/logs_shared/server/services/log_entries.\n2. Run the new Scout API spec:\nnode scripts/scout run-tests --arch stateful --domain classic --config\nx-pack/platform/plugins/shared/logs_shared/test/scout/api/playwright.config.ts\n It checks that these are rejected with 400:\n -size: 1001\n - 21 request columns\n - an inline log view with 21 columns\n - a polling request with 21 columns\n\nIt also checks that a persisted log view with 21 columns, and an inline\nview at the 20-column limit, still return entries.\n3. On 8.19 (optional):\n - Enable theobservability:enableLogsStreamadvanced setting.\n - Open Logs → Settings, add more than 20 columns, and click Apply.\n - Open Logs → Stream. Entries should render without errors.\n\n### Screenshots (8.19)\n\nLogs settings with 22 columns, saved through the UI\n\n<img width=\"1920\" height=\"2721\" alt=\"02-8 19-settings-22-columns-saved\"\nsrc=\"https://github.com/user-attachments/assets/4651d393-1eca-437e-baac-5aaf926258fc\"\n/>\n\n\nLogs Stream rendering entries with that 22-column view\n\n<img width=\"1920\" height=\"1080\" alt=\"03-8 19-stream-22-columns-renders\"\nsrc=\"https://github.com/user-attachments/assets/2ca9220b-29e4-45e7-9166-34ab35efe9f7\"\n/>\n\n\n### Checklist\n\n- [x] Unit or functional\ntests\nwere updated or added to match the most common scenarios\n- [x] This was checked for breaking HTTP API changes. The route is\ninternal, persisted log views are unaffected, and the request limits are\nwell above what its only client (8.19 LogStream) sends.\n- [ ] The correctrelease_note:type label (orrelease_note:skip)\nis applied, the PR title reads as a release note, and the description\nhas a## Release notesection if a custom summary is needed, per the\nguidelines.\n- [ ] Review the backport\nguidelines\nand apply applicablebackport:labels.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"221a9d08a5fc3315cbc9ea04212da93a40add82b"}}]}] BACKPORT-->