Repository navigation
fix(jeb): confine an invalid REA_JEB_MCP_URL to the JEB tools - #2145
Merged
Merged
Conversation
JebProvider throws when REA_JEB_MCP_URL fails endpoint validation, and the composition built it eagerly for the CLI and every MCP connection. A malformed value, or http://localhost:8425/mcp, therefore crashed every CLI command with a stack trace and failed every MCP connection with an internal server error. The composition now parses the endpoint first and, when it is unusable, returns a JEB port that reports not_configured availability and a ConfigurationError naming REA_JEB_MCP_URL. Fixes #2143 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
3 tasks done
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.
Summary
JebProvider's constructor throws whenREA_JEB_MCP_URLfailsparseJebMcpEndpoint.createJebAnalysisProviderruns eagerly fromregisterJebCommandsincreateCli, and fromcreateServerfor each MCP connection. So a malformed value, or the naturalhttp://localhost:8425/mcp(rejected because the host is not a literal loopback address), took down REA as a whole:rea doctorand analyses unrelated to JEB, crashed with anAnalysisInputErrorstack trace;Internal server error, with nothing on stderr.createJebAnalysisProvidernow parses the endpoint itself. When the endpoint is unusable, it returns a JEB port that:not_configuredavailability, with the reason;ConfigurationErrornamingREA_JEB_MCP_URLfrom every JEB operation, with the standard configuration remediation.JebProvideritself is unchanged and still rejects unusable endpoints at construction, as its unit tests assert.Fixes #2143
Before / after
Over stdio MCP, the same setting now lists all 173 tools, and
inspect_jeb_clientreturns theconfiguration_invaliderror.Validation
tests/boundary/cli/jebCli.test.tscoversinspect-jeb-clientreportingconfiguration_invalidwhilecapabilitiesstill succeeds;tests/boundary/mcp/jebMcp.test.tscovers the server listing tools andinspect_jeb_clientreturning the configuration error. Both fail on main and pass with this change.src/jeb/JebProvider.test.tspasses unchanged.REA_JADX_MCP_JAR,REA_WABT_BIN_DIRECTORY,REA_PWNTOOLS_PYTHON,REA_BROWSER_EXECUTABLE,REA_WAKARU_COMMAND,REA_BINWALK_COMMAND, …) with invalid values. None crashes CLI composition or MCP connections.npm run lintpasses.npm test: 9153 passed, 14 failed in 7 files. These are the same environmental files that fail on cleanorigin/mainon this host: Hopper not installed, Command Line Tools only (ibtool),hdiutil, and inspector target-location cases.🤖 Generated with Claude Code