Skip to content

fix(ida): admit Docker host-gateway names as local MCP hosts - #8932

Open
BeqaKs wants to merge 1 commit into
morluto:mainfrom
BeqaKs:fix/ida-host-docker-internal-8925
Open

BeqaKs wants to merge 1 commit into
morluto:mainfrom
BeqaKs:fix/ida-host-docker-internal-8925

Conversation

@BeqaKs

@BeqaKs BeqaKs commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Containerized REA could not use an IDA MCP HTTP registration that points at the container host. rea doctor refused http://host.docker.internal:<port>/mcp as invalid_configuration ("IDA MCP must use a local HTTP endpoint without URL credentials"), while the same server worked as localhost. 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.ts admitted only localhost, 127.0.0.1, and [::1]. Docker Desktop and Podman expose the container host through the reserved gateway names host.docker.internal (Docker, and Podman for compatibility) and host.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.ts owns IDA HTTP endpoint admission. Its inline host list becomes a named LOCAL_IDA_HTTP_HOSTS set that also contains host.docker.internal and host.containers.internal. The refinement still requires http:/https:, rejects URL credentials, and refuses any other host. The WHATWG URL parser lowercases hostnames, so HOST.DOCKER.INTERNAL matches while the caller's original url string is kept unchanged.
  • No other IDA admission or doctor path reinterprets the host. Doctor and session setup use this parsed registration, so the fix lives at one boundary.
  • docs/ida-provider.md lists 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.
  • Not included: JEB's literal 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

  • Semantic owner and earliest changed stage: readIdaConfiguration registration schema (src/ida/IdaConfiguration.ts); consumers receive the same parsed IdaConfiguration.
  • Contribution scope fit and linked maintainer decision: not applicable; ordinary fix within the existing IDA HTTP boundary.
  • CLI and MCP/tool-catalog contract: none changed; two more registration hosts are accepted.
  • Provider, bridge, target-format, or platform compatibility: containerized REA (Docker Desktop / Podman) can reach a host-side IDA MCP server.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

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 accepts http://host.docker.internal:13337/mcp and http://HOST.CONTAINERS.INTERNAL:13337/mcp (keeping the caller's URL), and rejects http://token@host.docker.internal:13337/mcp, http://host.docker.internal.example.com/mcp, and ftp://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

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

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

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 ⚠️ Failed 2026-11-04T19:02:14.605313Z
We couldn’t complete this review. Comment @codex review to try again.
d07d963 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.

@BeqaKs
BeqaKs force-pushed the fix/ida-host-docker-internal-8925 branch from d07d963 to 4be615f Compare November 4, 2026 19:02
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issue was found in the changed code.

Summary

The PR admits Docker and Podman host-gateway names at the existing IDA registration boundary.

  • IDA HTTP registrations can point to Docker and Podman host gateways.

Reviews (1) · Last reviewed commit: "fix(ida): admit Docker host-gateway name..." · Reviewed by Greptile

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] host.docker.internal not recognized as localhost

1 participant