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

[Console] Fix code scanning alert #194700

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

sabarasaba
Copy link
Member

@sabarasaba sabarasaba commented Oct 2, 2024

Fixes https://github.com/elastic/kibana/security/code-scanning/16 and https://github.com/elastic/kibana/security/code-scanning/15

Summary

Replaced the regex for the hasComments method for another one that avoids overmatching by ensuring that the block comment starts with /, contains any number of non- characters, followed by one or more stars, and checks for a proper closing */.

Note: This code isnt used anyway as it's only used by the old console model for the sense editor which should be eventually deleted with #194533

@sabarasaba sabarasaba added Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes backport:all-open Backport to all branches that could still receive a release labels Oct 2, 2024
@sabarasaba sabarasaba self-assigned this Oct 2, 2024
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #93 / serverless observability UI Dataset Quality Flyout overview summary panel should show summary KPIs

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @sabarasaba

@sabarasaba sabarasaba marked this pull request as ready for review October 2, 2024 14:51
@sabarasaba sabarasaba requested a review from a team as a code owner October 2, 2024 14:51
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

Copy link
Contributor

@ElenaStoeva ElenaStoeva left a comment

Choose a reason for hiding this comment

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

Changes lgtm!

@sabarasaba sabarasaba added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed backport:all-open Backport to all branches that could still receive a release labels Oct 3, 2024
@sabarasaba sabarasaba merged commit 3dbb7da into elastic:main Oct 3, 2024
25 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 3, 2024
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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 Oct 3, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Console] Fix code scanning alert
(#194700)](#194700)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Ignacio
Rivas","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-03T13:21:52Z","message":"[Console]
Fix code scanning alert
(#194700)","sha":"3dbb7da016a42f846b04d0f88a9fba746238558d","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Console","Team:Kibana
Management","release_note:skip","v9.0.0","backport:prev-minor"],"title":"[Console]
Fix code scanning alert
","number":194700,"url":"https://github.com/elastic/kibana/pull/194700","mergeCommit":{"message":"[Console]
Fix code scanning alert
(#194700)","sha":"3dbb7da016a42f846b04d0f88a9fba746238558d"}},"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/194700","number":194700,"mergeCommit":{"message":"[Console]
Fix code scanning alert
(#194700)","sha":"3dbb7da016a42f846b04d0f88a9fba746238558d"}}]}]
BACKPORT-->

Co-authored-by: Ignacio Rivas <[email protected]>
tiansivive pushed a commit to tiansivive/kibana that referenced this pull request Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Console Dev Tools Console Feature release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants