[EDR Workflow] Default Endpoint exception as Global when creating from Alerts page#262282
Conversation
|
Pinging @elastic/security-defend-workflows (Team:Defend Workflows) |
tomsonpl
left a comment
There was a problem hiding this comment.
Nice clean change! Small, well-scoped, and good test coverage for both privilege branches. Left one minor nit about defensive tag merging, but otherwise LGTM 👍
| )[0] as CreateExceptionListItemSchema), | ||
|
|
||
| os_types: retrieveAlertOsTypes(alertData), | ||
| tags: canManageGlobalArtifacts ? [GLOBAL_ARTIFACT_TAG] : [], |
There was a problem hiding this comment.
nit (non-blocking): The tags field here overwrites whatever defaultEndpointExceptionItems returns. Currently that's likely empty, but as a defensive measure you could mergeinstead of replace:
| tags: canManageGlobalArtifacts ? [GLOBAL_ARTIFACT_TAG] : [], | |
| tags: [ | |
| ...(initialException.tags ?? []), | |
| ...(canManageGlobalArtifacts ? [GLOBAL_ARTIFACT_TAG] : []), | |
| ], |
This way if defaultEndpointExceptionItems ever evolves to set tags, they won't be silently dropped.
There was a problem hiding this comment.
that's a really good point, thanks. updated:
341184a
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
|
Summary
Note
After
endpointExceptionsMovedUnderManagementFF is enabled, and after user has opted in to per-policy Endpoint exceptions......the Endpoint exception create form shows the Policy selector:

This should be defaulted to 'Global' when trying to create an Endpoint exception on the Alerts page:
Screen recording
User with Global artifact management privilege
Screen.Recording.2026-04-09.at.15.12.35.mov
User without Global artifact management privilege
Screen.Recording.2026-04-09.at.15.15.39.mov
Note
actually this cannot be tested in this PR manually, because it is hidden behind another hidden bug: https://github.com/elastic/security-team/issues/16784
but the unit test shows the behavior
Todo
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.