Skip to content

[Defend Workflows][Trusted Apps][Exceptions builder][Bug] Trusted apps allows for copy paste in advanced mode conditions values#248537

Merged
parkiino merged 52 commits intoelastic:mainfrom
parkiino:bug/ta-copy-paste
Feb 25, 2026
Merged

[Defend Workflows][Trusted Apps][Exceptions builder][Bug] Trusted apps allows for copy paste in advanced mode conditions values#248537
parkiino merged 52 commits intoelastic:mainfrom
parkiino:bug/ta-copy-paste

Conversation

@parkiino
Copy link
Contributor

@parkiino parkiino commented Jan 9, 2026

Summary

  • Copy pasted values are properly updated into the Trusted Apps matches operator values and saved
  • Refactors the trusted apps form exception builder handler to properly handle duplicate condition entries and shows the "Wildcard with wrong operator" callout in basic mode

Screenshots

copypaste

@parkiino parkiino requested review from a team as code owners January 9, 2026 20:53
@parkiino parkiino added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:Defend Workflows “EDR Workflows” sub-team of Security Solution ci:cloud-deploy Create or update a Cloud deployment labels Jan 9, 2026
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@rylnd rylnd left a comment

Choose a reason for hiding this comment

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

Detection Engine code changes LGTM; just had one question about a logical change (seemingly) tangential to the intent of the PR.

const [newValue] = newOptions.map(({ label }) => optionsMemo[labels.indexOf(label)]);
handleError(undefined);
handleSpacesWarning(newValue);
setShowSpacesWarning(false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you find that this state change was unnecessary? We still call it in several other places, here and I didn't see any explanation on why it was removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah i found it unnecessary since setShowSpaces is called in handleSpacesWarning anyways.

// TODO: I have to use any here for now, but once this is available below, we should use the correct types, https://github.com/elastic/kibana/issues/100715
// import { AutocompleteStart } from '../../../../../../../../../../src/plugins/unified_search/public';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type AutocompleteStart = any;
Copy link
Contributor

Choose a reason for hiding this comment

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

Fantastic! 🥇

@parkiino parkiino enabled auto-merge (squash) February 17, 2026 06:22
@parkiino parkiino disabled auto-merge February 18, 2026 06:39
@parkiino parkiino enabled auto-merge (squash) February 19, 2026 05:52
@parkiino parkiino disabled auto-merge February 19, 2026 05:52
@parkiino parkiino requested a review from ashokaditya February 20, 2026 16:17
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.

hey @parkiino,

just tested this and it seems that the issue is still present. it does not come up with the IS, only with the MATCHES operator

Screen.Recording.2026-02-23.at.17.11.16.mov

@parkiino
Copy link
Contributor Author

hey @parkiino,

just tested this and it seems that the issue is still present. it does not come up with the IS, only with the MATCHES operator

Screen.Recording.2026-02-23.at.17.11.16.mov

Good catch Gergo! It seems I accidentally got rid of some code during a merge upstream 😵‍💫. If possible, would you be able to retest? I think it should work now.

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.

hey @parkiino,

after you fix the lint error, it's gonna work well.

it's always worth to play around a bit before (re)opening for review, and also when merging upstream, to see if everything still works as expected

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch Gergo! It seems I accidentally got rid of some code during a merge upstream 😵‍💫. If possible, would you be able to retest? I think it should work now.

please make sure to add automated tests, that catch if the feature is not working anymore.

@elasticmachine
Copy link
Contributor

elasticmachine commented Feb 25, 2026

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lists 64.3KB 64.3KB +4.0B
securitySolution 11.1MB 11.2MB +633.0B
total +637.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
@kbn/securitysolution-autocomplete 6 4 -2

Total ESLint disabled count

id before after diff
@kbn/securitysolution-autocomplete 6 4 -2

History

Copy link
Member

@ashokaditya ashokaditya left a comment

Choose a reason for hiding this comment

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

Tested the copy paste and it works as expected.

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.

looking good! thanks for adding the tests 🚀

@parkiino parkiino merged commit 5766f41 into elastic:main Feb 25, 2026
16 checks passed
qn895 pushed a commit to qn895/kibana that referenced this pull request Mar 11, 2026
…s allows for copy paste in advanced mode conditions values (elastic#248537)

## Summary


- [x] Copy pasted values are properly updated into the Trusted Apps
matches operator values and saved
- [x] Refactors the trusted apps form exception builder handler to
properly handle duplicate condition entries and shows the "Wildcard with
wrong operator" callout in basic mode

# Screenshots

![copypaste](https://github.com/user-attachments/assets/131976e4-134d-4410-a46e-a9b9ab1c22c0)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting ci:cloud-deploy Create or update a Cloud deployment release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants