inspector/.gitignore
Cliff Hall cea22d86b8
feat(web): enforce localhost-only binding; expand loopback origin allow-list (#1796)
Closes #1795.

Enforce localhost-only binding in code (the "never 0.0.0.0" rule was only a spec note): refuse an all-interfaces HOST — across every spelling the OS binds as the wildcard (inet_aton decimal/octal/hex, IPv6, IPv4-mapped, zone-scoped, IDNA/Unicode) — unless DANGEROUSLY_BIND_ALL_INTERFACES=true (Docker's sanctioned opt-in). Fixes the reported stdio-connect 403 by expanding the default loopback origin allow-list to all three interchangeable forms.

Hardening surfaced across an extended review: closes an IDNA/fullwidth wildcard bypass, a blank-ALLOWED_ORIGINS fail-open, and the CLI/TUI OAuth-callback wildcard bind (loopback-only now, RFC 8252); canonicalizes the origin allow-list the way a browser does; derives frame-ancestors from the real embedder list (IPv6-literal exclusion verified in headless Chromium); strictPort on all three bind points; and preserves the CLI exit-code map + JSON envelope through the mcp-inspector --cli launcher path. Shared host normalization lives in core/node/hostUrl.ts. Docs + tests + smokes throughout.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-07-26 22:15:10 -04:00

27 lines
736 B
Text

.idea
.vscode
.DS_Store
.claude/
node_modules
dist
clients/web/dist
clients/**/build
clients/**/coverage
test-servers/build
# TypeScript incremental build cache (written by `tsc -b`); web routes its own
# into node_modules/.tmp via tsBuildInfoFile, but a stray `tsc -b` elsewhere
# drops one next to the tsconfig — never source.
*.tsbuildinfo
.env
/.playwright-mcp/
# Local debugging artifacts dropped at the repo root (e.g. attached to
# Claude Code conversations): screenshots, exported Inspector history dumps,
# and ad-hoc registry/client config fixtures used for manual import testing.
# Should never be part of the source tree.
/*.png
/inspector-history-*.json
/inspector-network-*.json
/*.server.json
/configs/
pr-screenshots