-
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
Make all risk score decimal places consistent #198450
Conversation
amended mistake quotations in selectedOption entityName
Pinging @elastic/security-entity-analytics (Team:Entity Analytics) |
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.
Hey! Thank for fixing it 🙇
I left a couple of comments. Could you please take a look?
...ity_solution/public/timelines/components/timeline/body/renderers/formatted_field_helpers.tsx
Outdated
Show resolved
Hide resolved
...ity_solution/public/timelines/components/timeline/body/renderers/formatted_field_helpers.tsx
Outdated
Show resolved
Hide resolved
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.
I feel like we should also use the formatRiskScore
function in the alert details flyout also? (see here).
Wdyt?
The flyout is accessed by pressing on the double arrow icon on the alerts table
...ns/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx
Outdated
Show resolved
Hide resolved
…d, or does not render when no value applied
x-pack/plugins/security_solution/public/flyout/document_details/right/components/risk_score.tsx
Outdated
Show resolved
Hide resolved
@PhilippeOberti @CAWilson94 I don't think we should format the Alert risk score with |
@machadoum this is the same for alerts page and the flyout - the risk score here is coming from the search strategy functions which seem to utilise the field API. So, for both cases under alerts, I can revert that risk score formatting change. I think that makes sense. My note here is partially confirmation of findings for my own understanding. 😁 |
@machadoum @PhilippeOberti Hello, updated to only format risk score on host and user entities, reverted the alert risk score changes. Thanks! :) |
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.
Thanks for making these changes @CAWilson94. The @elastic/security-threat-hunting-investigations team is no longer a code owner here so my approval has no value! 😆
I see that some ESS and serverless Cypress test are failing, feel free to reach out if you need any help troubleshooting these!
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.
Thanks for looking into this! From reading the other comments all looks good now 🚢
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
cc @CAWilson94 |
Starting backport for target branches: 8.x |
## Summary This PR updates risk scores to use formatter to 2DP instead of basic Math.round for consistency and accuracy. ![image](https://github.com/user-attachments/assets/ede600ef-acd3-463b-8f0f-8f527271836e) ![image](https://github.com/user-attachments/assets/a49f2a01-e05a-4077-8397-cff18da7cfa5) ![image](https://github.com/user-attachments/assets/599d3bcb-118f-4e32-94e6-ff4aa0a60fa8) With reverted alert score, showing user and host risk scores still have formatting: ![image](https://github.com/user-attachments/assets/94cb4d9e-a468-4cb7-b162-74762b134436) (cherry picked from commit 4b6b1c3)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [Make all risk score decimal places consistent (#198450)](#198450) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Charlotte Alexandra Wilson","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-08T16:33:50Z","message":"Make all risk score decimal places consistent (#198450)\n\n## Summary\r\n\r\nThis PR updates risk scores to use formatter to 2DP instead of basic\r\nMath.round for consistency and accuracy.\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/ede600ef-acd3-463b-8f0f-8f527271836e)\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/a49f2a01-e05a-4077-8397-cff18da7cfa5)\r\n\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/599d3bcb-118f-4e32-94e6-ff4aa0a60fa8)\r\n\r\nWith reverted alert score, showing user and host risk scores still have\r\nformatting:\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/94cb4d9e-a468-4cb7-b162-74762b134436)","sha":"4b6b1c3effaf9918f8332a21af42409092fd8ed5","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Theme: entity_analytics","Team:Entity Analytics","backport:version","v8.17.0"],"title":"Make all risk score decimal places consistent","number":198450,"url":"https://github.com/elastic/kibana/pull/198450","mergeCommit":{"message":"Make all risk score decimal places consistent (#198450)\n\n## Summary\r\n\r\nThis PR updates risk scores to use formatter to 2DP instead of basic\r\nMath.round for consistency and accuracy.\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/ede600ef-acd3-463b-8f0f-8f527271836e)\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/a49f2a01-e05a-4077-8397-cff18da7cfa5)\r\n\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/599d3bcb-118f-4e32-94e6-ff4aa0a60fa8)\r\n\r\nWith reverted alert score, showing user and host risk scores still have\r\nformatting:\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/94cb4d9e-a468-4cb7-b162-74762b134436)","sha":"4b6b1c3effaf9918f8332a21af42409092fd8ed5"}},"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/198450","number":198450,"mergeCommit":{"message":"Make all risk score decimal places consistent (#198450)\n\n## Summary\r\n\r\nThis PR updates risk scores to use formatter to 2DP instead of basic\r\nMath.round for consistency and accuracy.\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/ede600ef-acd3-463b-8f0f-8f527271836e)\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/a49f2a01-e05a-4077-8397-cff18da7cfa5)\r\n\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/599d3bcb-118f-4e32-94e6-ff4aa0a60fa8)\r\n\r\nWith reverted alert score, showing user and host risk scores still have\r\nformatting:\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/94cb4d9e-a468-4cb7-b162-74762b134436)","sha":"4b6b1c3effaf9918f8332a21af42409092fd8ed5"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Charlotte Alexandra Wilson <[email protected]>
Summary
This PR updates risk scores to use formatter to 2DP instead of basic Math.round for consistency and accuracy.
With reverted alert score, showing user and host risk scores still have formatting: