-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only meaningful change in the returned array is here
@@ -37,6 +37,7 @@ export const cspBenchmarkRuleMetadataSchema = schema.object({ | |||
profile_applicability: schema.string(), | |||
rationale: schema.string(), | |||
references: schema.maybe(schema.string()), | |||
reference: schema.maybe(schema.string()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 https://github.com/elastic/kibana/actions/runs/11326667686 |
💚 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":"[email protected]"},"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 <[email protected]>
Summary
Fixes: