-
Notifications
You must be signed in to change notification settings - Fork 37.3k
Refactor: Harden parseLsFiles against ReDoS #269818
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
base: main
Are you sure you want to change the base?
Conversation
Adds a new 'vscode-playwright-mcp-web' server configuration to 'mcp.json'. This allows running the MCP server with Chromium ('--web' flag) without having to manually edit the configuration file.
The previous implementation of parseLsFiles used a regular expression to parse the output of git ls-files. While the regex was already improved to be more specific, this commit refactors the function to remove the regex entirely. The new implementation uses indexOf and split to parse the lines, which is safer and more performant, completely eliminating the risk of Regular Expression Denial of Service (ReDoS) vulnerabilities.
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @lszomoruMatched files:
|
|
@aka76bm please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
|
@aka76bm, please address the merge conflicts. Also the PR contains quite some files that are out of scope. |
The previous implementation of parseLsFiles used a regular expression
to parse the output of git ls-files. While the regex was already
improved to be more specific, this commit refactors the function to
remove the regex entirely.
The new implementation uses indexOf and split to parse the lines,
which is safer and more performant, completely eliminating the risk of
Regular Expression Denial of Service (ReDoS) vulnerabilities.