Skip to content

[EDR Workflows] Prevent Event Filter list recreation with every new Cloud Workloads Defend integration #221358

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

Conversation

szwarckonrad
Copy link
Contributor

@szwarckonrad szwarckonrad commented May 23, 2025

This PR fixes a missing check for the existence of the event filter list before attempting to create it in the packagePolicy creation callback. This callback is triggered when adding the Cloud Workloads Defend integration.

The fix follows the same pattern used in similar list-creation logic:
https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/lists/server/handlers/create_exception_list_handler.ts#L39

Screen.Recording.2025-05-23.at.13.42.55.mov

@szwarckonrad szwarckonrad self-assigned this May 23, 2025
@szwarckonrad szwarckonrad added release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution backport:version Backport to applied version labels v9.1.0 v8.19.0 labels May 23, 2025
@szwarckonrad szwarckonrad marked this pull request as ready for review May 23, 2025 11:45
@szwarckonrad szwarckonrad requested a review from a team as a code owner May 23, 2025 11:45
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-defend-workflows (Team:Defend Workflows)

Copy link
Contributor

@gergoabraham gergoabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks and works great! 🚀 thanks for the fix

@szwarckonrad szwarckonrad enabled auto-merge (squash) June 3, 2025 08:54
@szwarckonrad szwarckonrad merged commit 539409d into elastic:main Jun 3, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.0

https://github.com/elastic/kibana/actions/runs/15415057579

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

cc @szwarckonrad

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 3, 2025
…loud Workloads Defend integration (elastic#221358)

This PR fixes a missing check for the existence of the event filter list
before attempting to create it in the `packagePolicy` creation callback.
This callback is triggered when adding the Cloud Workloads Defend
integration.

The fix follows the same pattern used in similar list-creation logic:

https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/lists/server/handlers/create_exception_list_handler.ts#L39

https://github.com/user-attachments/assets/81495092-e682-4f2d-ba9c-c149d3c8936c
(cherry picked from commit 539409d)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 3, 2025
…loud Workloads Defend integration (elastic#221358)

This PR fixes a missing check for the existence of the event filter list
before attempting to create it in the `packagePolicy` creation callback.
This callback is triggered when adding the Cloud Workloads Defend
integration.

The fix follows the same pattern used in similar list-creation logic:

https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/lists/server/handlers/create_exception_list_handler.ts#L39

https://github.com/user-attachments/assets/81495092-e682-4f2d-ba9c-c149d3c8936c
(cherry picked from commit 539409d)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19
9.0

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jun 3, 2025
… new Cloud Workloads Defend integration (#221358) (#222329)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[EDR Workflows] Prevent Event Filter list recreation with every new
Cloud Workloads Defend integration
(#221358)](#221358)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Konrad
Szwarc","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-06-03T10:35:12Z","message":"[EDR
Workflows] Prevent Event Filter list recreation with every new Cloud
Workloads Defend integration (#221358)\n\nThis PR fixes a missing check
for the existence of the event filter list\nbefore attempting to create
it in the `packagePolicy` creation callback.\nThis callback is triggered
when adding the Cloud Workloads Defend\nintegration.\n\nThe fix follows
the same pattern used in similar list-creation
logic:\n\nhttps://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/lists/server/handlers/create_exception_list_handler.ts#L39\n\n\n\nhttps://github.com/user-attachments/assets/81495092-e682-4f2d-ba9c-c149d3c8936c","sha":"539409d082f5c1416e650c452ac1474ba4d26fb8","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Defend
Workflows","backport:version","v9.1.0","v8.19.0"],"title":"[EDR
Workflows] Prevent Event Filter list recreation with every new Cloud
Workloads Defend
integration","number":221358,"url":"https://github.com/elastic/kibana/pull/221358","mergeCommit":{"message":"[EDR
Workflows] Prevent Event Filter list recreation with every new Cloud
Workloads Defend integration (#221358)\n\nThis PR fixes a missing check
for the existence of the event filter list\nbefore attempting to create
it in the `packagePolicy` creation callback.\nThis callback is triggered
when adding the Cloud Workloads Defend\nintegration.\n\nThe fix follows
the same pattern used in similar list-creation
logic:\n\nhttps://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/lists/server/handlers/create_exception_list_handler.ts#L39\n\n\n\nhttps://github.com/user-attachments/assets/81495092-e682-4f2d-ba9c-c149d3c8936c","sha":"539409d082f5c1416e650c452ac1474ba4d26fb8"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.19"],"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/221358","number":221358,"mergeCommit":{"message":"[EDR
Workflows] Prevent Event Filter list recreation with every new Cloud
Workloads Defend integration (#221358)\n\nThis PR fixes a missing check
for the existence of the event filter list\nbefore attempting to create
it in the `packagePolicy` creation callback.\nThis callback is triggered
when adding the Cloud Workloads Defend\nintegration.\n\nThe fix follows
the same pattern used in similar list-creation
logic:\n\nhttps://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/lists/server/handlers/create_exception_list_handler.ts#L39\n\n\n\nhttps://github.com/user-attachments/assets/81495092-e682-4f2d-ba9c-c149d3c8936c","sha":"539409d082f5c1416e650c452ac1474ba4d26fb8"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Konrad Szwarc <[email protected]>
kibanamachine added a commit that referenced this pull request Jun 3, 2025
…y new Cloud Workloads Defend integration (#221358) (#222328)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[EDR Workflows] Prevent Event Filter list recreation with every new
Cloud Workloads Defend integration
(#221358)](#221358)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Konrad
Szwarc","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-06-03T10:35:12Z","message":"[EDR
Workflows] Prevent Event Filter list recreation with every new Cloud
Workloads Defend integration (#221358)\n\nThis PR fixes a missing check
for the existence of the event filter list\nbefore attempting to create
it in the `packagePolicy` creation callback.\nThis callback is triggered
when adding the Cloud Workloads Defend\nintegration.\n\nThe fix follows
the same pattern used in similar list-creation
logic:\n\nhttps://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/lists/server/handlers/create_exception_list_handler.ts#L39\n\n\n\nhttps://github.com/user-attachments/assets/81495092-e682-4f2d-ba9c-c149d3c8936c","sha":"539409d082f5c1416e650c452ac1474ba4d26fb8","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Defend
Workflows","backport:version","v9.1.0","v8.19.0"],"title":"[EDR
Workflows] Prevent Event Filter list recreation with every new Cloud
Workloads Defend
integration","number":221358,"url":"https://github.com/elastic/kibana/pull/221358","mergeCommit":{"message":"[EDR
Workflows] Prevent Event Filter list recreation with every new Cloud
Workloads Defend integration (#221358)\n\nThis PR fixes a missing check
for the existence of the event filter list\nbefore attempting to create
it in the `packagePolicy` creation callback.\nThis callback is triggered
when adding the Cloud Workloads Defend\nintegration.\n\nThe fix follows
the same pattern used in similar list-creation
logic:\n\nhttps://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/lists/server/handlers/create_exception_list_handler.ts#L39\n\n\n\nhttps://github.com/user-attachments/assets/81495092-e682-4f2d-ba9c-c149d3c8936c","sha":"539409d082f5c1416e650c452ac1474ba4d26fb8"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.19"],"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/221358","number":221358,"mergeCommit":{"message":"[EDR
Workflows] Prevent Event Filter list recreation with every new Cloud
Workloads Defend integration (#221358)\n\nThis PR fixes a missing check
for the existence of the event filter list\nbefore attempting to create
it in the `packagePolicy` creation callback.\nThis callback is triggered
when adding the Cloud Workloads Defend\nintegration.\n\nThe fix follows
the same pattern used in similar list-creation
logic:\n\nhttps://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/lists/server/handlers/create_exception_list_handler.ts#L39\n\n\n\nhttps://github.com/user-attachments/assets/81495092-e682-4f2d-ba9c-c149d3c8936c","sha":"539409d082f5c1416e650c452ac1474ba4d26fb8"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Konrad Szwarc <[email protected]>
@mistic
Copy link
Member

mistic commented Jun 3, 2025

This PR didn't make it into the latest 9.0.2 BC. Updating the labels.

zacharyparikh pushed a commit to zacharyparikh/kibana that referenced this pull request Jun 4, 2025
…loud Workloads Defend integration (elastic#221358)

This PR fixes a missing check for the existence of the event filter list
before attempting to create it in the `packagePolicy` creation callback.
This callback is triggered when adding the Cloud Workloads Defend
integration.

The fix follows the same pattern used in similar list-creation logic:

https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/lists/server/handlers/create_exception_list_handler.ts#L39



https://github.com/user-attachments/assets/81495092-e682-4f2d-ba9c-c149d3c8936c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v8.19.0 v9.0.3 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants