[Security Solution][Case] Fix alerts push#91638
Conversation
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
|
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
d3ce362 to
70075bd
Compare
jonathan-buttner
left a comment
There was a problem hiding this comment.
Looks good, I agree with @michaelolo24 about making commentId optional if we can 👍
| id: 'mock-comment-2', | ||
| alertId: ['alert-id-1', 'alert-id-2'], | ||
| index: 'alert-index-1', | ||
| type: CommentType.alert as const, |
There was a problem hiding this comment.
This is cool, didn't realize this added more type safety. Just for my own edification, what does this enforce for type?
There was a problem hiding this comment.
@jonathan-buttner This enforce the variable to be of type "alert" and not string. If you do const x = "test" the type of x is string. If you do const x = "test" as const the type of x is "test", a constant. When we do type: CommentType.alert TS will refer the type of type as string. This will lead to a TS error because the type should be "alert | user | generated_alert". as const resolve this error.
You can read more here: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#const-assertions
|
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / general / X-Pack Endpoint Functional Tests.x-pack/test/security_solution_endpoint/apps/endpoint/policy_details·ts.endpoint When on the Endpoint Policy Details Page and the save button is clicked should have cleared the advanced section when the user deletes the valueStandard OutStack TraceMetrics [docs]Page load bundle
History
To update your PR or re-run it, just comment with: cc @cnasikas |
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* master: (38 commits) Fixes Cypress flake by adding pipe, click, and should (elastic#92762) [Discover] Fix filtering selected sidebar fields (elastic#91828) [ML] Fixes positions of calendar arrow buttons in start datafeed modal (elastic#92625) [dev/build_ts_refs] check that commit in outDirs matches mergeBase (elastic#92513) add dep on `@kbn/config` so it is built first [Expressions] [Lens] Add id and copyMetaFrom arg to mapColumn fn + add configurable onError argument to math fn (elastic#90481) [Lens] Fix Workspace hidden when using Safari (elastic#92616) [Lens] Fixes vertical alignment validation messages (elastic#91878) forbid x-elastic-product-origin header in elasticsearch configuration (elastic#92359) [Security Solution][Detections] Set default indicator path to reduce friction with new filebeat modules (elastic#92081) [ILM][Accessibility] Added A11y test for ILM new policy form. (elastic#92570) [Security Solution][Exceptions] - Fixes exceptions builder UI where invalid values can cause overwrites of other values (elastic#90634) Automatically generated Api documentation (elastic#86232) Increase index pattern select limit to 1000 (elastic#92093) [core.logging] Add RewriteAppender for filtering LogMeta. (elastic#91492) [Security Solution][Detection Rules] Update prebuilt rule threats to match schema (elastic#92281) [Security Solutions][Detection Engine] Fixes bug with not being able to duplicate indicator matches (elastic#92565) [Dashboard] Export appropriate references from byValue panels (elastic#91567) [Upgrade Assistant] Align code between branches (elastic#91862) [Security Solution][Case] Fix alerts push (elastic#91638) ...
Summary
This PR fixes some issues when pushing a case, with alerts attached, to an external service. Specifically:
Elastic Security Alerts attached to the case: <count of alerts>.Checklist
Delete any items that are not applicable to this PR.
For maintainers