Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution] Coverage Overview page: console errors when changing a filter #164846

Closed
banderror opened this issue Aug 25, 2023 · 4 comments · Fixed by #178126
Closed

[Security Solution] Coverage Overview page: console errors when changing a filter #164846

banderror opened this issue Aug 25, 2023 · 4 comments · Fixed by #178126
Assignees
Labels
8.14 candidate bug Fixes for quality problems that affect the customer experience Feature:Rule Management Security Solution Detection Rule Management area impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. 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.13.0 v8.14.0

Comments

@banderror
Copy link
Contributor

Epic: https://github.com/elastic/security-team/issues/2905

Summary

When I change the selected options in the Installed rule status filter on the MITRE ATT&CK® Coverage page, I see multiple errors in the console saying that Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list. The number of logged errors seem to correlate with the number of rules shown on the page:

Screenshot 2023-08-25 at 16 08 30
[2023-08-25T16:06:10.071+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:06:10.071+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:06:10.071+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:06:10.072+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:06:10.072+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:06:10.072+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:06:15.732+02:00][DEBUG][plugins.securitySolution.endpoint:user-artifact-packager:1.0.0] Last computed manifest not available yet
[2023-08-25T16:06:15.733+02:00][DEBUG][plugins.securitySolution.endpoint:user-artifact-packager:1.0.0] endpoint:user-artifact-packager task run took 2ms
[2023-08-25T16:06:18.909+02:00][WARN ][http.server.Kibana] Event loop utilization for /kbn/api/detection_engine/rules/_find exceeded threshold of 250ms (497ms out of 507ms) and 15% (98%)
[2023-08-25T16:06:19.169+02:00][WARN ][http.server.Kibana] Event loop utilization for /kbn/internal/ml/modules/recognize/apm-*-transaction*,auditbeat-*,endgame-*,filebeat-*,logs-*,packetbeat-*,traces-apm*,winlogbeat-*,-*elastic-cloud-logs-* exceeded threshold of 250ms (758ms out of 768ms) and 15% (99%)
[2023-08-25T16:06:20.457+02:00][WARN ][http.server.Kibana] Event loop utilization for /kbn/internal/detection_engine/prebuilt_rules/status exceeded threshold of 250ms (2043ms out of 2053ms) and 15% (100%)
[2023-08-25T16:06:20.458+02:00][WARN ][http.server.Kibana] Event loop utilization for /kbn/internal/detection_engine/rules/_rule_management_filters exceeded threshold of 250ms (1552ms out of 1552ms) and 15% (100%)
[2023-08-25T16:06:20.492+02:00][WARN ][http.server.Kibana] Event loop utilization for /kbn/internal/alerting/rules/_find exceeded threshold of 250ms (532ms out of 533ms) and 15% (100%)
[2023-08-25T16:06:20.501+02:00][WARN ][http.server.Kibana] Event loop utilization for /kbn/internal/ml/modules/get_module/ exceeded threshold of 250ms (2091ms out of 2103ms) and 15% (99%)
[2023-08-25T16:06:20.551+02:00][WARN ][http.server.Kibana] Event loop utilization for /kbn/internal/detection_engine/fleet/integrations/installed exceeded threshold of 250ms (1614ms out of 1644ms) and 15% (98%)
[2023-08-25T16:06:38.076+02:00][WARN ][http.server.Kibana] Event loop utilization for /kbn/api/detection_engine/rules/_bulk_action exceeded threshold of 250ms (446ms out of 1322ms) and 15% (34%)
[2023-08-25T16:06:39.742+02:00][INFO ][plugins.fleet] Fleet Usage: {"agents_enabled":true,"agents":{"total_enrolled":0,"healthy":0,"unhealthy":0,"offline":0,"inactive":0,"unenrolled":0,"total_all_statuses":0,"updating":0},"fleet_server":{"total_all_statuses":0,"total_enrolled":0,"healthy":0,"unhealthy":0,"offline":0,"updating":0,"num_host_urls":0}}
[2023-08-25T16:06:42.740+02:00][DEBUG][plugins.securitySolution.telemetry_events] [task security:endpoint-diagnostics:1.0.0]: attempting to run
[2023-08-25T16:06:42.741+02:00][DEBUG][plugins.securitySolution.telemetry_events] [task security:endpoint-diagnostics:1.0.0]: telemetry is not opted-in
[2023-08-25T16:06:42.744+02:00][DEBUG][plugins.alerting] Total invalidated API keys "0"
[2023-08-25T16:07:17.519+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.519+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.519+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.519+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.520+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.520+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.520+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.521+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.521+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.521+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.521+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.521+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.522+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.522+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.522+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.522+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.522+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.522+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.522+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.523+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.523+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.523+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.523+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.523+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.523+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.524+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.524+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.524+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.524+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.524+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.525+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.525+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.525+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.525+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.525+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.525+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.526+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.526+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.526+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.526+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.527+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.527+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.527+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.527+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.527+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.528+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.528+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.528+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.528+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.528+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.528+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.529+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.529+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.529+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
[2023-08-25T16:07:17.529+02:00][ERROR][plugins.securitySolution] Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list
@banderror banderror added bug Fixes for quality problems that affect the customer experience Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Feature:Rule Management Security Solution Detection Rule Management area Team:Detection Rule Management Security Detection Rule Management Team 8.11 candidate labels Aug 25, 2023
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@banderror
Copy link
Contributor Author

FYI @dplumlee @maximpn

@banderror banderror added 8.14 candidate impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels Mar 5, 2024
@banderror
Copy link
Contributor Author

The error is being logged from here:

if (exceptionsList == null) {
logger.error(
'Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list'
);

@maximpn maximpn self-assigned this Mar 6, 2024
maximpn added a commit that referenced this issue Mar 11, 2024
**Fixes: #164846

## Summary

This PR fixes MITRE ATT&CK® Coverage Overview dashboard console errors when the page loads or filter is changed.

## Details

An error message `Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list` appears each time MITRE ATT&CK® Coverage Overview dashboard is loaded or filter is changed (which lead to data reloading).

If one tried to find the source of the console error message it lead to [kibana/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/saved_object_references/inject_exceptions_list.ts](https://github.com/elastic/kibana/blob/6cb73aaec15b230a65d2e17a9d6ef970a1061709/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/saved_object_references/inject_exceptions_list.ts#L30-L33). It happens whenever there is an attempt to inject rule exceptions from SO references. This operations happens for every rule wrapped in `securityRuleTypeWrapper` and registered in `alerting` plugin. Whenever such rule if fetched via `rulesClient.find()` it invokes registered `useSavedObjectReferences.injectReferences` finally invoking mentioned above `inject_exceptions_list.ts`. Coverage Overview API endpoint fetches only necessary set of rule fields (`name`, `enabled`, `params.threat`) to reduce transferring unnecessary data. It's not hard to guess that `params.exceptionsList` is missed  and it ends up to be `undefined` (it's always an array in a SO) when the validation happens in `inject_exceptions_list.ts`. So it leads to the warning message appearing.

This PR removes redundant `exceptionsList` injection validation.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Mar 11, 2024
)

**Fixes: elastic#164846

## Summary

This PR fixes MITRE ATT&CK® Coverage Overview dashboard console errors when the page loads or filter is changed.

## Details

An error message `Exception list is null when it never should be. This indicates potentially that saved object migrations did not run correctly. Returning empty exception list` appears each time MITRE ATT&CK® Coverage Overview dashboard is loaded or filter is changed (which lead to data reloading).

If one tried to find the source of the console error message it lead to [kibana/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/saved_object_references/inject_exceptions_list.ts](https://github.com/elastic/kibana/blob/6cb73aaec15b230a65d2e17a9d6ef970a1061709/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/saved_object_references/inject_exceptions_list.ts#L30-L33). It happens whenever there is an attempt to inject rule exceptions from SO references. This operations happens for every rule wrapped in `securityRuleTypeWrapper` and registered in `alerting` plugin. Whenever such rule if fetched via `rulesClient.find()` it invokes registered `useSavedObjectReferences.injectReferences` finally invoking mentioned above `inject_exceptions_list.ts`. Coverage Overview API endpoint fetches only necessary set of rule fields (`name`, `enabled`, `params.threat`) to reduce transferring unnecessary data. It's not hard to guess that `params.exceptionsList` is missed  and it ends up to be `undefined` (it's always an array in a SO) when the validation happens in `inject_exceptions_list.ts`. So it leads to the warning message appearing.

This PR removes redundant `exceptionsList` injection validation.

(cherry picked from commit cd16d03)
kibanamachine referenced this issue Mar 11, 2024
) (#178441)

# Backport

This will backport the following commits from `main` to `8.13`:
- [[Security Solution] Fix coverage overview console errors
(#178126)](#178126)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Maxim
Palenov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-03-11T20:40:00Z","message":"[Security
Solution] Fix coverage overview console errors (#178126)\n\n**Fixes:
https://github.com/elastic/kibana/issues/164846**\r\n\r\n##
Summary\r\n\r\nThis PR fixes MITRE ATT&CK® Coverage Overview dashboard
console errors when the page loads or filter is changed.\r\n\r\n##
Details\r\n\r\nAn error message `Exception list is null when it never
should be. This indicates potentially that saved object migrations did
not run correctly. Returning empty exception list` appears each time
MITRE ATT&CK® Coverage Overview dashboard is loaded or filter is changed
(which lead to data reloading).\r\n\r\nIf one tried to find the source
of the console error message it lead to
[kibana/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/saved_object_references/inject_exceptions_list.ts](https://github.com/elastic/kibana/blob/6cb73aaec15b230a65d2e17a9d6ef970a1061709/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/saved_object_references/inject_exceptions_list.ts#L30-L33).
It happens whenever there is an attempt to inject rule exceptions from
SO references. This operations happens for every rule wrapped in
`securityRuleTypeWrapper` and registered in `alerting` plugin. Whenever
such rule if fetched via `rulesClient.find()` it invokes registered
`useSavedObjectReferences.injectReferences` finally invoking mentioned
above `inject_exceptions_list.ts`. Coverage Overview API endpoint
fetches only necessary set of rule fields (`name`, `enabled`,
`params.threat`) to reduce transferring unnecessary data. It's not hard
to guess that `params.exceptionsList` is missed and it ends up to be
`undefined` (it's always an array in a SO) when the validation happens
in `inject_exceptions_list.ts`. So it leads to the warning message
appearing.\r\n\r\nThis PR removes redundant `exceptionsList` injection
validation.","sha":"cd16d03ca9627b21452eff6b72d771318e85557f","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","impact:medium","Team:Detections
and Resp","Team: SecuritySolution","Feature:Rule
Management","Team:Detection Rule
Management","v8.13.0","v8.14.0"],"title":"[Security Solution] Fix
coverage overview console
errors","number":178126,"url":"https://github.com/elastic/kibana/pull/178126","mergeCommit":{"message":"[Security
Solution] Fix coverage overview console errors (#178126)\n\n**Fixes:
https://github.com/elastic/kibana/issues/164846**\r\n\r\n##
Summary\r\n\r\nThis PR fixes MITRE ATT&CK® Coverage Overview dashboard
console errors when the page loads or filter is changed.\r\n\r\n##
Details\r\n\r\nAn error message `Exception list is null when it never
should be. This indicates potentially that saved object migrations did
not run correctly. Returning empty exception list` appears each time
MITRE ATT&CK® Coverage Overview dashboard is loaded or filter is changed
(which lead to data reloading).\r\n\r\nIf one tried to find the source
of the console error message it lead to
[kibana/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/saved_object_references/inject_exceptions_list.ts](https://github.com/elastic/kibana/blob/6cb73aaec15b230a65d2e17a9d6ef970a1061709/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/saved_object_references/inject_exceptions_list.ts#L30-L33).
It happens whenever there is an attempt to inject rule exceptions from
SO references. This operations happens for every rule wrapped in
`securityRuleTypeWrapper` and registered in `alerting` plugin. Whenever
such rule if fetched via `rulesClient.find()` it invokes registered
`useSavedObjectReferences.injectReferences` finally invoking mentioned
above `inject_exceptions_list.ts`. Coverage Overview API endpoint
fetches only necessary set of rule fields (`name`, `enabled`,
`params.threat`) to reduce transferring unnecessary data. It's not hard
to guess that `params.exceptionsList` is missed and it ends up to be
`undefined` (it's always an array in a SO) when the validation happens
in `inject_exceptions_list.ts`. So it leads to the warning message
appearing.\r\n\r\nThis PR removes redundant `exceptionsList` injection
validation.","sha":"cd16d03ca9627b21452eff6b72d771318e85557f"}},"sourceBranch":"main","suggestedTargetBranches":["8.13"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/178126","number":178126,"mergeCommit":{"message":"[Security
Solution] Fix coverage overview console errors (#178126)\n\n**Fixes:
https://github.com/elastic/kibana/issues/164846**\r\n\r\n##
Summary\r\n\r\nThis PR fixes MITRE ATT&CK® Coverage Overview dashboard
console errors when the page loads or filter is changed.\r\n\r\n##
Details\r\n\r\nAn error message `Exception list is null when it never
should be. This indicates potentially that saved object migrations did
not run correctly. Returning empty exception list` appears each time
MITRE ATT&CK® Coverage Overview dashboard is loaded or filter is changed
(which lead to data reloading).\r\n\r\nIf one tried to find the source
of the console error message it lead to
[kibana/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/saved_object_references/inject_exceptions_list.ts](https://github.com/elastic/kibana/blob/6cb73aaec15b230a65d2e17a9d6ef970a1061709/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/saved_object_references/inject_exceptions_list.ts#L30-L33).
It happens whenever there is an attempt to inject rule exceptions from
SO references. This operations happens for every rule wrapped in
`securityRuleTypeWrapper` and registered in `alerting` plugin. Whenever
such rule if fetched via `rulesClient.find()` it invokes registered
`useSavedObjectReferences.injectReferences` finally invoking mentioned
above `inject_exceptions_list.ts`. Coverage Overview API endpoint
fetches only necessary set of rule fields (`name`, `enabled`,
`params.threat`) to reduce transferring unnecessary data. It's not hard
to guess that `params.exceptionsList` is missed and it ends up to be
`undefined` (it's always an array in a SO) when the validation happens
in `inject_exceptions_list.ts`. So it leads to the warning message
appearing.\r\n\r\nThis PR removes redundant `exceptionsList` injection
validation.","sha":"cd16d03ca9627b21452eff6b72d771318e85557f"}}]}]
BACKPORT-->

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
8.14 candidate bug Fixes for quality problems that affect the customer experience Feature:Rule Management Security Solution Detection Rule Management area impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. 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.13.0 v8.14.0
Projects
Status: To do
Development

Successfully merging a pull request may close this issue.

3 participants