Skip to content
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

[8.x] Fix code scanning alert no. 370: Useless regular-expression character escape (#198264) #198999

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

… escape (elastic#198264)

Fixes
[https://github.com/elastic/kibana/security/code-scanning/370](https://github.com/elastic/kibana/security/code-scanning/370)

To fix the problem, we need to remove the unnecessary escape sequence
`\-` from the regular expression on line 32. This will not change the
functionality of the code but will make the regular expression clearer
and more maintainable.

- In general terms, we need to ensure that only necessary escape
sequences are used in regular expressions.
- Specifically, we will update the regular expression on line 32 to
remove the unnecessary escape sequence.
- The change will be made in the file
`x-pack/plugins/session_view/public/methods/index.tsx`.

_Suggested fixes powered by Copilot Autofix. Review carefully before
merging._

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: @Omolola-Akinleye
(cherry picked from commit ae2b382)
@kibanamachine kibanamachine merged commit f312c1e into elastic:8.x Nov 5, 2024
24 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @kfirpeled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants