Skip to content

fix(security): reject non-loopback Daemon.Host in Local exposure mode#901

Merged
Aaronontheweb merged 2 commits into
netclaw-dev:devfrom
Aaronontheweb:claude-wt-loopback-secure
May 6, 2026
Merged

fix(security): reject non-loopback Daemon.Host in Local exposure mode#901
Aaronontheweb merged 2 commits into
netclaw-dev:devfrom
Aaronontheweb:claude-wt-loopback-secure

Conversation

@Aaronontheweb
Copy link
Copy Markdown
Collaborator

Summary

  • ExposureMode.Local now rejects non-loopback Daemon.Host values at daemon startup and via netclaw doctor (upgraded from warning to hard error)
  • Extracted DaemonExposureValidator.GetLoopbackViolationIssue() helper to keep message strings in one place, matching the existing GetMissingRequiredProcessIssue() pattern
  • Users who need a non-loopback bind must set an explicit ExposureMode (reverse-proxy, tailscale-serve, etc.)

Closes #900
Related: #189 (closed), #866, #868

Test plan

  • Validator_rejects_non_loopback_host_in_local_mode — 0.0.0.0, 10.0.0.5, 192.168.1.100 all produce validation issues
  • Validator_accepts_loopback_host_in_local_mode — 127.0.0.1, ::1, localhost pass clean
  • Local_NonLoopbackHost_Throws — startup service aborts with InvalidOperationException
  • Local_LoopbackHost_SkipsAllValidation — default config still starts fine
  • Local_NonLoopbackHost_IsError / Local_WithPrivateIp_IsError — doctor surfaces error severity
  • All existing exposure mode tests pass (no regressions in reverse-proxy, tunnel, or device pairing flows)

…netclaw-dev#900)

ExposureMode.Local now requires binding to a loopback address (127.0.0.1,
::1, or localhost). Non-loopback hosts are rejected at daemon startup and
surfaced as errors by netclaw doctor. Users who need a non-loopback bind
must set an explicit ExposureMode.
Docker CI smoke test now probes health from inside the container via
docker exec instead of host port mapping, letting the daemon bind
loopback in Local mode. README Docker quickstart updated to include
ExposureMode=reverse-proxy and TrustedProxies for non-loopback binds.
@Aaronontheweb Aaronontheweb force-pushed the claude-wt-loopback-secure branch from d12f7ed to acbf13a Compare May 6, 2026 21:57
@Aaronontheweb Aaronontheweb merged commit b52b100 into netclaw-dev:dev May 6, 2026
6 checks passed
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.

Warn or reject non-loopback Daemon.Host in ExposureMode.Local

1 participant