[Cloud Security] handle both rule.references and rule.reference in misconfiguraiton flyout#195932
[Cloud Security] handle both rule.references and rule.reference in misconfiguraiton flyout#195932
Conversation
| title: i18n.translate('xpack.csp.findings.findingsFlyout.ruleTab.referencesTitle', { | ||
| defaultMessage: 'References', | ||
| }), | ||
| description: reference ? <CspFlyoutMarkdown>{reference}</CspFlyoutMarkdown> : EMPTY_VALUE, |
There was a problem hiding this comment.
the only meaningful change in the returned array is here
| profile_applicability: schema.string(), | ||
| rationale: schema.string(), | ||
| references: schema.maybe(schema.string()), | ||
| reference: schema.maybe(schema.string()), |
There was a problem hiding this comment.
a suggestion: maybe it would be simpler to fix it in the ingest pipeline and rely on it here?
There was a problem hiding this comment.
@kfirpeled do you mean in the ingest pipeline of cloud_security_posture copy the value of rule.references into rule.reference to be able to remove rule.references completely? We could do that, but as the change to support both is quite small, I thought it would be safer just to support both at first and then depreciate rule.references. Otherwise I need to think how the UI will work out with the older version of the integration, as integration update is not a given when you update the stack version. Am I missing smth?
There was a problem hiding this comment.
nope, you are not missing anything.
However, since we do have automatic updates of the integration, after 24 hours all the misconfigurations will have the updated field. so it shortens your migration process.
both ways work
|
Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security) |
|
Starting backport for target branches: 8.x |
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
…sconfiguraiton flyout (elastic#195932) ## Summary Fixes: - elastic/security-team#10793 (cherry picked from commit cc46549)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… in misconfiguraiton flyout (#195932) (#196115) # Backport This will backport the following commits from `main` to `8.x`: - [[Cloud Security] handle both rule.references and rule.reference in misconfiguraiton flyout (#195932)](#195932) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Maxim Kholod","email":"maxim.kholod@elastic.co"},"sourceCommit":{"committedDate":"2024-10-14T11:31:59Z","message":"[Cloud Security] handle both rule.references and rule.reference in misconfiguraiton flyout (#195932)\n\n## Summary\r\n\r\nFixes:\r\n- https://github.com/elastic/security-team/issues/10793","sha":"cc46549c2f293bed7d24d8b1abf02c4d65db7bcb","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Cloud Security","backport:prev-minor","Feature:Cloud-Security","v8.16.0"],"title":"[Cloud Security] handle both rule.references and rule.reference in misconfiguraiton flyout","number":195932,"url":"https://github.com/elastic/kibana/pull/195932","mergeCommit":{"message":"[Cloud Security] handle both rule.references and rule.reference in misconfiguraiton flyout (#195932)\n\n## Summary\r\n\r\nFixes:\r\n- https://github.com/elastic/security-team/issues/10793","sha":"cc46549c2f293bed7d24d8b1abf02c4d65db7bcb"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195932","number":195932,"mergeCommit":{"message":"[Cloud Security] handle both rule.references and rule.reference in misconfiguraiton flyout (#195932)\n\n## Summary\r\n\r\nFixes:\r\n- https://github.com/elastic/security-team/issues/10793","sha":"cc46549c2f293bed7d24d8b1abf02c4d65db7bcb"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Maxim Kholod <maxim.kholod@elastic.co>
Summary
Fixes: