Repository navigation
docs(spec): reject malformed Host values - #135
Conversation
Classify comma lists and malformed Host syntax as 400 before allowlist evaluation. Link the reference broker and its pure and socket regression tests. Work item: tbhb-dev/agent-orchestration-poc.internal#82 Refs: #82
tbhb-agent-reviewer
left a comment
There was a problem hiding this comment.
Claude Code, claude-opus-5-5, security focus. Changes requested: merge conflict only. The content is approved.
I reviewed 771f77e against the reference broker on internal host-comma-list at a05e26cf. The full note is internal wiki/reviews/2026-10-09T0914Z-host-comma-list-review.md on branch review-host-comma-list (21a2f8b5).
The "Malformed host" bullet matches the broker. It trims spaces and tabs only, lists the shapes the broker refuses, and states the registered-name syntax without commas, bracketed IPv6 and IPvFuture, and the numeric port rule. It applies to all three forms, and a valid host off the allowlist still gets 403. I sent comma lists, lists with spaces, empty elements, and trailing commas in origin form, absolute form, and CONNECT. Every one got 400 with nothing reaching the stub. The #72, #75 and #77 bypass sets still hold. mise run check passes on the host.
Blocking: this branch forked from main at #133 (5829a31). #134 (62e55ec) has since added its "Duplicate host" bullet at the same spot, so GitHub reports the PR as CONFLICTING and no check run exists. Merge main, keep both bullets, and get check green.
While resolving, please also update the reference paragraph. It still links f074931d and leaves a malformed Host off its list of refusals.
Preserve both malformed and duplicate Host rules when merging main. Cite the merged internal broker at c42c05fd and include malformed Host refusals in the reference paragraph. Refs: #82
|
Addressed both review requests in e51df2a:
Verified: |
tbhb-agent-reviewer
left a comment
There was a problem hiding this comment.
Claude Code, claude-opus-5-5, security focus. Approved at e51df2a.
Both spec changes are intact after the merge. The "Malformed host" bullet from this PR and the "Duplicate host" bullet from #134 now sit next to each other, and neither lost any text. The reference paragraph now cites c42c05fd on internal main, which contains f357a25b. Its scripts/ directory is identical to the a05e26cf I reviewed, and the #later-finding-... anchor resolves. That paragraph now lists a malformed Host among the refusals. The PR is MERGEABLE, and check passed on e51df2a.
What
Require a present Host value to contain one host with an optional port. Malformed values, including comma lists, get 400 before allowlist evaluation, with the connection closed and nothing forwarded.
Why
Internal issue #82 records that the reference broker returned 403 for comma lists. The spec now distinguishes malformed syntax from a valid destination off the allowlist.
Evidence
Verified: the reference broker at internal commit
f357a25bpasses all 29 tests, including plain-value syntax cases and socket comma-list refusals. The spec links that source. Verified:CARGO_BUILD_JOBS=2 mise run checkpassed with 435 Rust tests and 50 replay repetitions. The suite reports 12 existing ignored host tests, governed by the repository'scheck:hostworkflow; this documentation change adds no ignores. Normal commit hooks passed.Docs
Updated
specs/runtime-driver-contract.mdwith the malformed Host rule and reference evidence.Checklist
Refs: #82