Skip to content

fix(security): restrict tokenless dev mode to loopback (#408)#418

Merged
imran-siddique merged 1 commit into
mainfrom
merge-408-tokenless-loopback
Jul 24, 2026
Merged

fix(security): restrict tokenless dev mode to loopback (#408)#418
imran-siddique merged 1 commit into
mainfrom
merge-408-tokenless-loopback

Conversation

@imran-siddique

Copy link
Copy Markdown
Contributor

Lands @danyalahmed1995's security hardening from #408, rebased onto current main to resolve conflicts in docs/quickstart.md (which was rewritten in #417). No behavior changes from the original PR — same code, docs, and tests.

What

Tokenless CMCP_DEV_MODE=1 now binds to loopback only. Reaching the gateway from a LAN, container, or cloud network requires CMCP_BEARER_TOKEN, so an unauthenticated gateway can't be exposed by accident. Adds a proper parse_listen_addr (handles IPv6 bracket form) and a loopback check, with unit tests.

Full suite green after rebase: 833 passed, 6 skipped. Original CI on #408 was all green.

Credit: @danyalahmed1995 (commit authorship preserved). Supersedes #408.

Co-Authored-By: Danyal Ahmed 58849388+danyalahmed1995@users.noreply.github.com

🤖 Generated with Claude Code

@imran-siddique
imran-siddique merged commit bc8b624 into main Jul 24, 2026
12 checks passed
@imran-siddique
imran-siddique deleted the merge-408-tokenless-loopback branch July 24, 2026 05:01
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