← Back to Pull requests

feat(spec,tck): add host-port@1 capability #138

Closed
unknown closed this pull request without merging on Oct 30, 2026 11:18 UTC
View on GitHub
unknown unknown commented on Oct 21, 2026 14:04 UTC
Author

Adds com.docker.sandbox/host-port@1: a capability that exposes one host loopback TCP or UDP service inside the sandbox at an IPv4 loopback endpoint, the reverse of port@1. TCP is the default; UDP forwarding preserves datagrams and routes replies to the originating sandbox socket.

- type: com.docker.sandbox/host-port@1
  config:
    host: 5353
    container: 15353
    transport: udp
    family: ipv6 # host ::1; sandbox endpoint remains 127.0.0.1:15353

family describes the host service: ipv4 (default), ipv6, or dual when either family reaches the same service. It is part of the permission surface (host->container/transport/family), because IPv4 and IPv6 loopback may serve different host services. Different effective families at the same sandbox endpoint conflict rather than overriding an omitted IPv4 grant. container: 0 remains the default-to-host sentinel; the table now states its accepted range as 0–65535. Empty transport remains accepted as TCP in both the Go grammar and JSON Schema.

Validation and composition reject a port@1 publication and a host-port@1 mapping claiming the same sandbox port and transport, in either declaration order and regardless of family. Different transports may share a numeric port. No descriptor field was renamed or removed. This capability has not shipped in a tagged release, so its config can change in place under RELEASES.md; no capability or schema version bump is needed.

Normative accounting: host-port@1/config-valid is enforced by descriptor validation and the artifact suite; host-port@1/family-honored has TCP/UDP IPv4/IPv6 host-listener fixtures and mutations for ignored families, missing family surface, and conflicting family grants. That check also covers the updated host-port@1/conflict and host-port@1/permission-surface duties. host-port@1/published-port-conflict is covered by descriptor validation and a two-order runtime refusal check with a fake-adapter mutation. Existing forwarding, lifecycle, on-demand, raw-byte, datagram, and no-extra-access checks remain; unobservable confinement and teardown duties retain their recorded waivers.

Rebased onto current main, including its shared instance-key and strict-config validation machinery.

``release-note
Add host-port@1 to grant access to a specific IPv4 or IPv6 host loopback TCP or UDP service through a sandbox loopback endpoint.
``

Diff: 300 lines (+225 / -75) across 3 files Reviewer: robmry Review duration: 12794m
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 300 lines diff across 3 files
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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.341
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #138"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 40.1% (MEDIUM) · Higher = larger blast radius
40.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.8% · Safe to merge
15.8%