[Cloud Security] Only adding safe_posture_type to native csp findings#196064
[Cloud Security] Only adding safe_posture_type to native csp findings#196064JordanSh merged 5 commits intoelastic:mainfrom
safe_posture_type to native csp findings#196064Conversation
|
Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security) |
| def postureTypeAvailable = doc.containsKey("rule.benchmark.posture_type") && | ||
| !doc["rule.benchmark.posture_type"].empty; | ||
| def postureTypeAvailable = doc.containsKey("rule.benchmark.posture_type") && !doc["rule.benchmark.posture_type"].empty; | ||
| boolean isNativeCsp = doc.containsKey("data_stream.dataset") && doc["data_stream.dataset"].value == "cloud_security_posture.findings"; |
There was a problem hiding this comment.
these painless scripts are very brittle, let's add && !doc["data_stream.dataset"].empty as well to the check
There was a problem hiding this comment.
sure, i removed this check because we pretty much know that data_stream.dataset always exist but i can add it back.
Regarding your comment, removing this whole process right now is risky, a lot of pieces are relying on it, not worth taking the risk atm.
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11333284447 |
💚 Build Succeeded
Metrics [docs]
History
cc @JordanSh |
…gs (elastic#196064) (cherry picked from commit 73c9391)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ative csp findings (#196064) (#196200) # Backport This will backport the following commits from `main` to `8.x`: - [[Cloud Security] Only adding `safe_posture_type` to native csp findings (#196064)](#196064) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jordan","email":"51442161+JordanSh@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-14T18:44:48Z","message":"[Cloud Security] Only adding `safe_posture_type` to native csp findings (#196064)","sha":"73c9391c23f6fb52db6d1339da8cc72c602aa855","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"],"title":"[Cloud Security] Only adding `safe_posture_type` to native csp findings","number":196064,"url":"https://github.com/elastic/kibana/pull/196064","mergeCommit":{"message":"[Cloud Security] Only adding `safe_posture_type` to native csp findings (#196064)","sha":"73c9391c23f6fb52db6d1339da8cc72c602aa855"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196064","number":196064,"mergeCommit":{"message":"[Cloud Security] Only adding `safe_posture_type` to native csp findings (#196064)","sha":"73c9391c23f6fb52db6d1339da8cc72c602aa855"}}]}] BACKPORT--> Co-authored-by: Jordan <51442161+JordanSh@users.noreply.github.com>
Summary
Resolves #195202
In the video:
1 Wiz finding
1 Elastic finding with posture type
1 Elastic finding without posture type
You can see when i search for
posture_typei only have 1 finding, when i navigate to kubernetes dashboard 2 findings are showing, including the one without theposture_typefield which is assumed to be of typekspm. and the wiz finding is not showing.Screen.Recording.2024-10-14.at.12.02.28.mov