You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Backport
This will backport the following commits from `main` to `9.0`:
- [[EDR Workflows] Workflow Insights - filter trusted apps by policy
(#209340)](#209340)
<!--- Backport version: 9.4.3 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Konrad
Szwarc","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-07T08:48:21Z","message":"[EDR
Workflows] Workflow Insights - filter trusted apps by policy
(#209340)\n\nThis PR updates the logic for determining whether an
Insight has already\nbeen addressed by Trusted Apps. While we’ve been
querying Trusted Apps\nbased on the Insight’s reported path and, for
Windows and macOS, the\nsignature, this approach had a limitation: it
didn’t account for cases\nwhere a matching Trusted App existed but was
assigned to a policy\nunrelated to the endpoint where the Insight was
generated.\n\nTo address this, we’ve extended the query to include an
additional\nfilter for the specific policy ID associated with the
endpoint, as well\nas any global policies
(policy:all).\n\n\nhttps://github.com/user-attachments/assets/96470d0b-b7ea-4f59-af0a-e865ad7fd22c","sha":"8831e5b25d7151398e219539664530c3eec916ef","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Defend
Workflows","backport:prev-minor","v9.1.0"],"title":"[EDR Workflows]
Workflow Insights - filter trusted apps by
policy","number":209340,"url":"https://github.com/elastic/kibana/pull/209340","mergeCommit":{"message":"[EDR
Workflows] Workflow Insights - filter trusted apps by policy
(#209340)\n\nThis PR updates the logic for determining whether an
Insight has already\nbeen addressed by Trusted Apps. While we’ve been
querying Trusted Apps\nbased on the Insight’s reported path and, for
Windows and macOS, the\nsignature, this approach had a limitation: it
didn’t account for cases\nwhere a matching Trusted App existed but was
assigned to a policy\nunrelated to the endpoint where the Insight was
generated.\n\nTo address this, we’ve extended the query to include an
additional\nfilter for the specific policy ID associated with the
endpoint, as well\nas any global policies
(policy:all).\n\n\nhttps://github.com/user-attachments/assets/96470d0b-b7ea-4f59-af0a-e865ad7fd22c","sha":"8831e5b25d7151398e219539664530c3eec916ef"}},"sourceBranch":"main","suggestedTargetBranches":["9.0"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209340","number":209340,"mergeCommit":{"message":"[EDR
Workflows] Workflow Insights - filter trusted apps by policy
(#209340)\n\nThis PR updates the logic for determining whether an
Insight has already\nbeen addressed by Trusted Apps. While we’ve been
querying Trusted Apps\nbased on the Insight’s reported path and, for
Windows and macOS, the\nsignature, this approach had a limitation: it
didn’t account for cases\nwhere a matching Trusted App existed but was
assigned to a policy\nunrelated to the endpoint where the Insight was
generated.\n\nTo address this, we’ve extended the query to include an
additional\nfilter for the specific policy ID associated with the
endpoint, as well\nas any global policies
(policy:all).\n\n\nhttps://github.com/user-attachments/assets/96470d0b-b7ea-4f59-af0a-e865ad7fd22c","sha":"8831e5b25d7151398e219539664530c3eec916ef"}}]}]
BACKPORT-->
Co-authored-by: Konrad Szwarc <[email protected]>
Copy file name to clipboardExpand all lines: x-pack/solutions/security/plugins/security_solution/server/endpoint/services/workflow_insights/helpers.test.ts
+81-19Lines changed: 81 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -267,7 +267,6 @@ describe('helpers', () => {
267
267
expect(result).toBe(expectedHash);
268
268
});
269
269
});
270
-
271
270
describe('generateTrustedAppsFilter',()=>{
272
271
it('should generate a filter for process.executable.caseless entries',()=>{
'(exception-list-agnostic.attributes.tags:"policy:test-id" OR exception-list-agnostic.attributes.tags:"policy:all") AND exception-list-agnostic.attributes.entries.value:"example-value"'
292
+
);
293
293
});
294
294
295
295
it('should generate a filter for process.code_signature entries',()=>{
'(exception-list-agnostic.attributes.tags:"policy:test-id" OR exception-list-agnostic.attributes.tags:"policy:all") AND exception-list-agnostic.attributes.entries.entries.value:(*Example,*Inc.*)'
317
316
);
318
317
});
319
318
@@ -341,14 +340,13 @@ describe('helpers', () => {
341
340
},
342
341
}asPartial<SecurityWorkflowInsight>);
343
342
344
-
constfilter=generateTrustedAppsFilter(insight);
345
-
346
-
expect(filter).toContain(
347
-
'exception-list-agnostic.attributes.entries.entries.value:(*Example,*\\(Inc.\\)*http\\://example.com*[example]*) AND exception-list-agnostic.attributes.entries.value:"example-value"'
'(exception-list-agnostic.attributes.tags:"policy:test-id" OR exception-list-agnostic.attributes.tags:"policy:all") AND exception-list-agnostic.attributes.entries.entries.value:(*Example,*\\(Inc.\\)*http\\://example.com*[example]*) AND exception-list-agnostic.attributes.entries.value:"example-value"'
348
346
);
349
347
});
350
348
351
-
it('should return empty string if no valid entries are present',()=>{
349
+
it('should return undefined if no valid entries are present',()=>{
'(exception-list-agnostic.attributes.tags:"policy:abc123" OR exception-list-agnostic.attributes.tags:"policy:all") AND exception-list-agnostic.attributes.entries.value:"example-value"',
421
442
sortField: 'created_at',
422
443
sortOrder: 'desc',
423
444
});
424
445
expect(result).toBe(true);
425
446
});
447
+
448
+
it('should return false if no valid entries exist even when a policy id is provided',async()=>{
0 commit comments