-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fix code scanning alert no. 370: Useless regular-expression character escape #198264
Conversation
… escape Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
/ci |
@kfirpeled Session Viewer is working fine! |
⏳ Build in-progress
History
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11686816769 |
… 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)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…racter escape (#198264) (#198999) # Backport This will backport the following commits from `main` to `8.x`: - [Fix code scanning alert no. 370: Useless regular-expression character escape (#198264)](#198264) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kfir Peled","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-05T15:01:20Z","message":"Fix code scanning alert no. 370: Useless regular-expression character escape (#198264)\n\nFixes\r\n[https://github.com/elastic/kibana/security/code-scanning/370](https://github.com/elastic/kibana/security/code-scanning/370)\r\n\r\nTo fix the problem, we need to remove the unnecessary escape sequence\r\n`\\-` from the regular expression on line 32. This will not change the\r\nfunctionality of the code but will make the regular expression clearer\r\nand more maintainable.\r\n\r\n- In general terms, we need to ensure that only necessary escape\r\nsequences are used in regular expressions.\r\n- Specifically, we will update the regular expression on line 32 to\r\nremove the unnecessary escape sequence.\r\n- The change will be made in the file\r\n`x-pack/plugins/session_view/public/methods/index.tsx`.\r\n\r\n\r\n_Suggested fixes powered by Copilot Autofix. Review carefully before\r\nmerging._\r\n\r\n---------\r\n\r\nCo-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: @Omolola-Akinleye","sha":"ae2b3827f8237a07472699cfbd442a8bc567dc34","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:cloud-deploy"],"title":"Fix code scanning alert no. 370: Useless regular-expression character escape","number":198264,"url":"https://github.com/elastic/kibana/pull/198264","mergeCommit":{"message":"Fix code scanning alert no. 370: Useless regular-expression character escape (#198264)\n\nFixes\r\n[https://github.com/elastic/kibana/security/code-scanning/370](https://github.com/elastic/kibana/security/code-scanning/370)\r\n\r\nTo fix the problem, we need to remove the unnecessary escape sequence\r\n`\\-` from the regular expression on line 32. This will not change the\r\nfunctionality of the code but will make the regular expression clearer\r\nand more maintainable.\r\n\r\n- In general terms, we need to ensure that only necessary escape\r\nsequences are used in regular expressions.\r\n- Specifically, we will update the regular expression on line 32 to\r\nremove the unnecessary escape sequence.\r\n- The change will be made in the file\r\n`x-pack/plugins/session_view/public/methods/index.tsx`.\r\n\r\n\r\n_Suggested fixes powered by Copilot Autofix. Review carefully before\r\nmerging._\r\n\r\n---------\r\n\r\nCo-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: @Omolola-Akinleye","sha":"ae2b3827f8237a07472699cfbd442a8bc567dc34"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198264","number":198264,"mergeCommit":{"message":"Fix code scanning alert no. 370: Useless regular-expression character escape (#198264)\n\nFixes\r\n[https://github.com/elastic/kibana/security/code-scanning/370](https://github.com/elastic/kibana/security/code-scanning/370)\r\n\r\nTo fix the problem, we need to remove the unnecessary escape sequence\r\n`\\-` from the regular expression on line 32. This will not change the\r\nfunctionality of the code but will make the regular expression clearer\r\nand more maintainable.\r\n\r\n- In general terms, we need to ensure that only necessary escape\r\nsequences are used in regular expressions.\r\n- Specifically, we will update the regular expression on line 32 to\r\nremove the unnecessary escape sequence.\r\n- The change will be made in the file\r\n`x-pack/plugins/session_view/public/methods/index.tsx`.\r\n\r\n\r\n_Suggested fixes powered by Copilot Autofix. Review carefully before\r\nmerging._\r\n\r\n---------\r\n\r\nCo-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: @Omolola-Akinleye","sha":"ae2b3827f8237a07472699cfbd442a8bc567dc34"}}]}] BACKPORT--> Co-authored-by: Kfir Peled <[email protected]>
… 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
Fixes 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.x-pack/plugins/session_view/public/methods/index.tsx
.Suggested fixes powered by Copilot Autofix. Review carefully before merging.