Skip to content

fix(gateway): harden health endpoint exposure - #4906

Merged
Re-bin merged 2 commits into
mainfrom
codex/fix-gateway-health-exposure
Jul 13, 2026
Merged

Re-bin merged 2 commits into
mainfrom
codex/fix-gateway-health-exposure

Conversation

@Re-bin

@Re-bin Re-bin commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • show a browser-usable local health URL and explicitly warn when the listener binds beyond loopback
  • bound health-server connection concurrency, shorten slow-client reads, and close responses explicitly
  • publish the official Docker health port on host loopback by default and document remote-monitoring precautions

Security assessment

The gateway health listener already defaults to 127.0.0.1. Existing users may still have 0.0.0.0 in older or manually edited configs, and container deployments intentionally bind all interfaces inside the container. The endpoint returns only {"status": "ok"} and cannot invoke the agent, but an exposed listener still adds connection, bandwidth, and slow-client denial-of-service surface.

This keeps explicit non-loopback deployments backward compatible while making the exposure visible and limiting application-level resource use.

Validation

  • PYTHONPATH="$PWD" pytest tests/cli/test_commands.py -q (117 passed)
  • PYTHONPATH="$PWD" ruff check nanobot/cli/commands.py tests/cli/test_commands.py
  • git diff --check
  • docker compose config

@chengyongru chengyongru added priority: p1 Important user-impacting issue or project priority with bounded impact or a reasonable workaround. fix security labels Jul 13, 2026
@Re-bin
Re-bin merged commit a65a6f3 into main Jul 13, 2026
5 checks passed
@Re-bin
Re-bin deleted the codex/fix-gateway-health-exposure branch July 13, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix priority: p1 Important user-impacting issue or project priority with bounded impact or a reasonable workaround. security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants