Repository navigation
Conversation
Containerized REA reaches an IDA MCP server on the container host through host.docker.internal (Docker, Podman compatibility) or host.containers.internal (Podman). The HTTP registration refinement only admitted localhost, 127.0.0.1 and [::1], so doctor reported the valid gateway registration as invalid_configuration. Admit both gateway names in the registration's local-host set. The refinement still requires http or https, no URL credentials, and refuses every other host. Fixes morluto#8925
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. |
d07d963 to
4be615f
Compare
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The PR appears safe to merge; no actionable issue was found in the changed code. SummaryThe PR admits Docker and Podman host-gateway names at the existing IDA registration boundary.
Reviews (1) · Last reviewed commit: "fix(ida): admit Docker host-gateway name..." · Reviewed by Greptile |
Summary
Containerized REA could not use an IDA MCP HTTP registration that points at the container host.
rea doctorrefusedhttp://host.docker.internal:<port>/mcpasinvalid_configuration("IDA MCP must use a local HTTP endpoint without URL credentials"), while the same server worked aslocalhost. REA now accepts the Docker and Podman host-gateway names as local IDA MCP hosts.Fixes #8925
Problem and expected behavior
Trigger: an IDA MCP registration with
"url": "http://host.docker.internal:13337/mcp"(reported on Debian trixie with Podman, REA 6.8.0).The HTTP registration refinement in
src/ida/IdaConfiguration.tsadmitted onlylocalhost,127.0.0.1, and[::1]. Docker Desktop and Podman expose the container host through the reserved gateway nameshost.docker.internal(Docker, and Podman for compatibility) andhost.containers.internal(Podman), so a correctly configured containerized setup was rejected before any connection attempt.Expected: those gateway names are accepted alongside the loopback literals. Everything else stays fail-closed.
Change and scope
IdaConfiguration.tsowns IDA HTTP endpoint admission. Its inline host list becomes a namedLOCAL_IDA_HTTP_HOSTSset that also containshost.docker.internalandhost.containers.internal. The refinement still requireshttp:/https:, rejects URL credentials, and refuses any other host. The WHATWGURLparser lowercases hostnames, soHOST.DOCKER.INTERNALmatches while the caller's originalurlstring is kept unchanged.docs/ida-provider.mdlists the admitted hosts and explains when to use a gateway name. It also changes "loopback URL restriction" to "local URL restriction" so the native-plugin warning stays accurate.127.0.0.1/[::1]rule (src/config/jebMcpEndpoint.ts) and the Ghidra and Cutter bridge hosts are unchanged, since no issue asks for those.Contract and boundary impact
readIdaConfigurationregistration schema (src/ida/IdaConfiguration.ts); consumers receive the same parsedIdaConfiguration.docs/public/product-catalog.json), package, or installation impact: none.Expected effects:
Validation
Run on macOS with Node 24.22.1 (
.nvmrc):npm run test:local -- src/ida/IdaConfiguration.test.ts: 12 passed. The boundary test now acceptshttp://host.docker.internal:13337/mcpandhttp://HOST.CONTAINERS.INTERNAL:13337/mcp(keeping the caller's URL), and rejectshttp://token@host.docker.internal:13337/mcp,http://host.docker.internal.example.com/mcp, andftp://host.docker.internal/mcp, alongside the existing remote-host and credential refusals. With the source change reverted, this test fails.npm run test:local -- src/ida/*.test.ts: 20 files, 431 tests passed.npm run check:fast: passed.npm run docs:check: passed.Not verified: I did not run a real Docker or Podman container against a live IDA MCP server. Coverage is limited to the registration-parsing boundary.
Author readiness
Human owner: @BeqaKs
Before merge
type(scope): outcome.