Skip to content

fix(jeb): confine an invalid REA_JEB_MCP_URL to the JEB tools - #2145

Merged
kaoru0822-kitauji merged 1 commit into
mainfrom
fix/issue-2143
Oct 12, 2026
Merged

kaoru0822-kitauji merged 1 commit into
mainfrom
fix/issue-2143

Conversation

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

Summary

JebProvider's constructor throws when REA_JEB_MCP_URL fails parseJebMcpEndpoint. createJebAnalysisProvider runs eagerly from registerJebCommands in createCli, and from createServer for each MCP connection. So a malformed value, or the natural http://localhost:8425/mcp (rejected because the host is not a literal loopback address), took down REA as a whole:

  • every CLI command, including rea doctor and analyses unrelated to JEB, crashed with an AnalysisInputError stack trace;
  • every MCP connection failed with Internal server error, with nothing on stderr.

createJebAnalysisProvider now parses the endpoint itself. When the endpoint is unusable, it returns a JEB port that:

  • reports not_configured availability, with the reason;
  • returns a ConfigurationError naming REA_JEB_MCP_URL from every JEB operation, with the standard configuration remediation.

JebProvider itself is unchanged and still rejects unusable endpoints at construction, as its unit tests assert.

Fixes #2143

Before / after

$ REA_JEB_MCP_URL=http://localhost:8425/mcp rea inspect-go-binary /path/to/go-binary
before: AnalysisInputError stack trace (createCli → registerJebCommands → new JebProvider)
after:  normal Go build-info Evidence

$ REA_JEB_MCP_URL=http://localhost:8425/mcp rea inspect-jeb-client --json
after:  {"code":"configuration_invalid","message":"REA configuration is invalid: REA_JEB_MCP_URL: JEB MCP endpoint must use a literal loopback host (127.0.0.1 or ::1).", …}

Over stdio MCP, the same setting now lists all 173 tools, and inspect_jeb_client returns the configuration_invalid error.

Validation

  • New tests: tests/boundary/cli/jebCli.test.ts covers inspect-jeb-client reporting configuration_invalid while capabilities still succeeds; tests/boundary/mcp/jebMcp.test.ts covers the server listing tools and inspect_jeb_client returning the configuration error. Both fail on main and pass with this change. src/jeb/JebProvider.test.ts passes unchanged.
  • Separately checked other provider settings (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 lint passes.
  • npm test: 9153 passed, 14 failed in 7 files. These are the same environmental files that fail on clean origin/main on this host: Hopper not installed, Command Line Tools only (ibtool), hdiutil, and inspector target-location cases.

🤖 Generated with Claude Code

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]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T11:21:58.088598Z 9ad3cac PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kaoru0822-kitauji
kaoru0822-kitauji merged commit df2c08b into main Oct 12, 2026
30 checks passed
@kaoru0822-kitauji
kaoru0822-kitauji deleted the fix/issue-2143 branch October 12, 2026 13:49
@github-actions github-actions Bot mentioned this pull request Oct 12, 2026
3 tasks done
@morluto morluto added bug Something isn't working area: mcp MCP server, transport, and tool registration labels Oct 14, 2026
@morluto morluto added the provider: jeb Analysis provider / engine: jeb label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcp MCP server, transport, and tool registration bug Something isn't working provider: jeb Analysis provider / engine: jeb

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] An invalid REA_JEB_MCP_URL crashes every CLI command and every MCP connection

2 participants