[EDR Workflows] Update fetchAgentPolicyInfo query in CrowdStrike#234772
[EDR Workflows] Update fetchAgentPolicyInfo query in CrowdStrike#234772tomsonpl merged 5 commits intoelastic:mainfrom
Conversation
|
/ci |
|
Pinging @elastic/security-defend-workflows (Team:Defend Workflows) |
|
Since I am wondering if this bug was introduced in |
| size: 1, | ||
| _source: ['agent', 'device.id', 'event.created'], | ||
| sort: [{ 'event.created': 'desc' }], | ||
| _source: ['agent', 'device.id', '@timestamp'], |
There was a problem hiding this comment.
The goal of this code, that was introduced in 9.1 in support of spaces, is to get the most recent information about the host. I used event.created because my understanding was that was the most appropriate field. If using @timestamp makes more sense for CrowdStrike, then I don't see an issue here.
What is interesting to me is: why/how are CrowdStrike documents being ingested into ES and missing this field? (but that's just me)
There was a problem hiding this comment.
That's a valid question — I was actually looking into it, and my guess is that it may be omitted if timestamp and event.created are identical — but that's just my guess.
https://github.com/elastic/ecs/blob/main/schemas/event.yml#L766
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Saved Objects .kibana field count
History
cc @tomsonpl |
|
Starting backport for target branches: 9.1 https://github.com/elastic/kibana/actions/runs/17799801972 |
|
Starting backport for target branches: 9.1 https://github.com/elastic/kibana/actions/runs/17799801788 |
…stic#234772) (cherry picked from commit a7d04fb)
…stic#234772) (cherry picked from commit a7d04fb)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
1 similar comment
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
#234772) (#235373) # Backport This will backport the following commits from `main` to `9.1`: - [[EDR Workflows] Update fetchAgentPolicyInfo query in CrowdStrike (#234772)](#234772) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Tomasz Ciecierski","email":"tomasz.ciecierski@elastic.co"},"sourceCommit":{"committedDate":"2025-09-17T13:47:57Z","message":"[EDR Workflows] Update fetchAgentPolicyInfo query in CrowdStrike (#234772)","sha":"a7d04fb7c762fa36e0c11f2f5ae33315678093a0","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Defend Workflows","backport:version","v9.2.0","v9.1.5"],"title":"[EDR Workflows] Update fetchAgentPolicyInfo query in CrowdStrike","number":234772,"url":"https://github.com/elastic/kibana/pull/234772","mergeCommit":{"message":"[EDR Workflows] Update fetchAgentPolicyInfo query in CrowdStrike (#234772)","sha":"a7d04fb7c762fa36e0c11f2f5ae33315678093a0"}},"sourceBranch":"main","suggestedTargetBranches":["9.1"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/234772","number":234772,"mergeCommit":{"message":"[EDR Workflows] Update fetchAgentPolicyInfo query in CrowdStrike (#234772)","sha":"a7d04fb7c762fa36e0c11f2f5ae33315678093a0"}},{"branch":"9.1","label":"v9.1.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Tomasz Ciecierski <tomasz.ciecierski@elastic.co>
We identified that some event's coming from CrowdStrike were missing
event.createdfield, thus making usingresponse actionsimpossible. This PR fixes that:Why
[at]timestampis Safer[at]timestampis a standard Elasticsearch field that should be present in virtually all documents indexed into Elasticsearch.It's automatically set by Elasticsearch if not provided by the document.
event.createdis an ECS field that may not always be populated by all data sources.field populated.
event.created, but they should always have @timestamp since it's fundamental to Elasticsearch document lifecycle.