Skip to content

YAML editor crashes in Defend for Container integration in certain circumstances #207317

@maxcold

Description

@maxcold

Kibana version:
8.17.0

Elasticsearch version:
8.17.0

Browser version:
Chrome 132.0.6834.84

Browser OS version:
Mac OS

Original install method (e.g. download page, yum, from source, etc.):
ECH (ESS)

Describe the bug:
when adding/editing Defend for Container integration, the YAML editor doesn't initialise on the first open and crashes if go back from integration and then return

Steps to reproduce:

  1. Open Defend for Container integration
  2. Switch to YAML editor, it will be empty even though there is always YAML representation of event empty integration
  3. Go back to the list of integrations
  4. Return to Defend for Container integration and open YAML editor again, it will crash with unhandled error

Expected behavior:
YAML editor should render the yaml representation of the D4C settings from the very start and shouldn't crash in general

Screenshots (if relevant):

Image

https://www.loom.com/share/8834f8f2293144539df811112e6f8c6c?sid=0e21cd82-9d2f-4df1-89ab-51ed09a199e0

Errors in browser console (if relevant):
Error: Cannot read properties of null (reading 'setLanguage')

Provide logs and/or server output (if relevant):

Any additional context:
if first user edits the policy in the General view mode (visual editor) and then switch to YAML view, the yaml then rendered fine

Metadata

Metadata

Assignees

Labels

Team:Cloud SecurityCloud Security team relatedbugFixes for quality problems that affect the customer experience

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions