fix(hosted): disable project LSP execution in reviews - #170
Merged
BunsDev merged 2 commits intoJul 27, 2026
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR hardens hosted-review execution by preventing untrusted repository settings from launching external processes via the LSP tool, and by ensuring the hosted-review tool allowlist cannot include LSP even though it is marked PermissionLevel::ReadOnly.
Changes:
- Sanitize project settings by clearing
config.lsp_serversso repo-provided LSP server definitions are never merged at startup. - Exclude
LSPfrom the hosted-review read-only tool allowlist viafilter_read_only_tools_except(...). - Add/update unit tests to prevent regressions in both the settings merge behavior and hosted-review tool filtering.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src-rust/crates/core/src/lib.rs | Clears lsp_servers during project-settings sanitization and adds a regression test ensuring project configs cannot inject LSP servers. |
| src-rust/crates/cli/src/main.rs | Updates hosted-review tool filtering to explicitly exclude LSP from the read-only allowlist and extends the hosted-review toolset test accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Val Alexander <68980965+BunsDev@users.noreply.github.com>
BunsDev
deleted the
codex/fix-hosted-review-lsp-command-execution-vulnerability
branch
July 27, 2026 14:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
LSPas read-only even though invoking it can start an external language-server process.Description
LSPfrom the default hosted-review read-only tool set.lsp_serversbefore hierarchical settings merge while retaining trusted global LSP configuration.hostedReviewcapability policy andpermissionRulesbefore merge so a project cannot re-enable LSP, Bash, write, plugin, or MCP access.Verification
cargo fmt --checkcargo check --workspace --lockedcargo clippy --workspace --all-targets --locked -- -D warningscargo test --workspace --lockedgit diff --check origin/main --