Skip to content

fix(server): bind to localhost by default - #584

Closed
aaronjmars wants to merge 2 commits into
NVIDIA-NeMo:mainfrom
aaronjmars:fix/local-default-bind
Closed

fix(server): bind to localhost by default#584
aaronjmars wants to merge 2 commits into
NVIDIA-NeMo:mainfrom
aaronjmars:fix/local-default-bind

Conversation

@aaronjmars

@aaronjmars aaronjmars commented Sep 1, 2026

Copy link
Copy Markdown

Summary\n\n- Change the standalone switchyard-server default bind address from 0.0.0.0 to 127.0.0.1.\n- Keep all-interface exposure available through an explicit --host value.\n\nThis is a project-improvement contribution following NVIDIA PSIRT ticket 6648053. It is intentionally separate from the closed security report and does not claim that the documented demo server is a security bug.\n\n## Testing\n\n- git diff --check\n- Cargo tests unavailable because Cargo is not installed in this environment.

Summary by CodeRabbit

  • Security
    • The server now binds to localhost by default, reducing unintended external exposure.
    • External access requires explicitly configuring a host address.

@aaronjmars
aaronjmars requested a review from a team as a code owner September 1, 2026 01:57
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c3ab0d50-277f-4093-996e-4d5dee9f5ac6

📥 Commits

Reviewing files that changed from the base of the PR and between c597bfd and 949be12.

📒 Files selected for processing (1)
  • crates/switchyard-server/src/cli.rs

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


Walkthrough

The server CLI now binds to IPv4 localhost by default. Comments state that external exposure requires an explicit --host value.

Changes

Server bind configuration

Layer / File(s) Summary
Local-only server default
crates/switchyard-server/src/cli.rs
The default host changed from 0.0.0.0 to IPv4 localhost. Comments document the explicit --host requirement for external exposure.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 949be

The server will bind to localhost by default, reducing unintended remote exposure while preserving external access through an explicit --host value. No actionable merge-blocking risk remains after normal checks and review.

Poem

A rabbit guards the localhost gate
The server binds close, not wide open in wait
A host flag leads the way
For journeys beyond the tray
Safe defaults now hop into place

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: the server now binds to localhost by default.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.


Comment @coderabbitai help to get the list of available commands.

Signed-off-by: Aaron Elijah Mars <61592645+aaronjmars@users.noreply.github.com>
@aaronjmars
aaronjmars force-pushed the fix/local-default-bind branch from 949be12 to 16a0539 Compare September 1, 2026 18:14
@afourniernv

Copy link
Copy Markdown
Contributor

Thanks for raising this. This changes the deployment behavior of switchyard-server, not just the bind address. It would also affect the checked-in systemd service and normal Docker port publishing.

I've opened #596 so we can decide what the default should be and account for those paths together. I'm going to close this PR for now.

@afourniernv afourniernv closed this Sep 2, 2026
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.

2 participants