feat(http): answer browsers only by the node's own names; Secure from requestOrigin (W39, D1361–D1363) #243
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.42) × (1 − Review Confidence (0.46)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 320 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 99% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.345
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #243"
general
weight: 0.35
claude[bot]
W39 slice 1 (security.md PR 6a). Implements D1361–D1363.
X-Forwarded-Proto, shell access throughterminals.write, one connection holding the node's memory, stolen bearer tokens, MCP clients granted too much, secrets at rest.jhin.httprefuses a browser's request (OriginorSec-Fetch-Site) for a host the node does not answer to with 403, before any route or upgrade (a DNS rebinding page). Answered: every IP address,localhost/.localhost, the machine's host name (and.local),.ts.net(Tailscale Serve), the mesh's advertised hosts (http.server1.4allowHost, additive and optional) andjhin.http.allowedHosts(name,.example.com,*). Requests fromtrustProxypeers and non-browsers (CLI, nodes, MCP clients; Node'sfetchsendsSec-Fetch-Mode, so that header does not count) are not checked, so existing pairing (W33),jhin client, mesh links and MCP clients keep working.SecurefollowsrequestOrigin(TLS, orX-Forwarded-Proto: httpsonly from a trusted or loopback peer).Behaviour change, documented in D1362: a browser opening the node by an unlisted LAN name (
nas.lan) gets 403 with "Add it to jhin.http.allowedHosts."Evidence
The local unit failures are unrelated and reproduce alone: Chromium/preview and source-control tests timing out at 5 s under the machine's load, and
apps/jhin/test/cli.test.tsreading Node 22'sExperimentalWarning: SQLite(local Node is 22; CI runs 24). CI runs the full suite.🤖 Generated with Claude Code