-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[SecuritySolution][Resolver] Adding siem index and guarding process ancestry #71570
[SecuritySolution][Resolver] Adding siem index and guarding process ancestry #71570
Conversation
Pinging @elastic/endpoint-data-visibility-team (Team:Endpoint Data Visibility) |
Pinging @elastic/endpoint-app-team (Feature:Endpoint) |
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
/* | ||
* The array has a special format. The entity_ids towards the beginning of the array are closer ancestors and the | ||
* values towards the end of the array are more distant ancestors (grandparents). Therefore | ||
* ancestry_array[0] == process.parent.entity_id and ancestry_array[1] == process.parent.parent.entity_id | ||
*/ | ||
ancestry: string[]; | ||
ancestry?: 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.
my understanding is that all fields and subfields are optional (and untyped) in ecs. maybe runtime validation would be a better solution for this issue.
@@ -18,6 +18,11 @@ export function handleEntities(): RequestHandler<unknown, TypeOf<typeof validate | |||
query: { _id, indices }, | |||
} = request; | |||
|
|||
const siemClient = context.securitySolution!.getAppClient(); | |||
const queryIndices = indices; |
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.
why is this reassignment being done?
const siemClient = context.securitySolution!.getAppClient(); | ||
const queryIndices = indices; | ||
// if the alert was promoted by a rule it will exist in the signals index so search there too | ||
queryIndices.push(siemClient.getSignalsIndex()); |
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.
if this route is going to be siem specific, maybe we can rename it?
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.
put some thoughts in
…ncestry (elastic#71570) * Adding siem index and guarding process ancestry * Fixing type errors
* master: (21 commits) [Maps] 7.9 design improvements (elastic#71563) [ML] Changing all calls to ML endpoints to use internal user (elastic#70487) [eventLog] prevent log writing when initialization fails (elastic#71339) [Observability] landing page always being displayed (elastic#71494) [IM] Address data stream copy feedback (elastic#71615) [Logs UI] Anomalies page dataset filtering (elastic#71110) [data.search.aggs] Remove `use_field_mapping` from top hits agg (elastic#71168) [ML] Anomaly swim lane embeddable navigation and filter actions (elastic#71082) Fixes typo in siem_cloudtrail job description (elastic#71569) Require granted API Keys to have a name (elastic#71623) Update getUsageForCollection (elastic#71609) Only fetch saved elements once (elastic#71310) [SecuritySolution][Resolver] Adding siem index and guarding process ancestry (elastic#71570) [APM] Additional data telemetry changes (elastic#71112) [Visualize] Fix export table for table export links (elastic#71249) [Search] Server side search API (elastic#70446) use inclusive language (elastic#71607) [Security Solution] Hide timeline footer when Resolver is open (elastic#71516) [Index template wizard] Remove shadow and use border for components panels (elastic#71606) [ML] Kibana API endpoint for histogram chart data (elastic#70976) ...
This PR fixes two things:
.siem-signals
index to the list of ones queried to find the event that is clicked on in timelineprocess.Ext.ancestry
as to force users of it to check for undefined. There's been a couple cases where the endpoint hasn't sent it which causes a crash in kibanaI tested the siem index retrieval using both generated data and an actual endpoint. I verified that the
/entity
request returns the correctentity_id
for both cases.Working signal resolver using generated data