You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MOCA SBX] Deny-by-default destination allow list #1483
Priority: P1 (shape A; in shape B, MOCA's front end owns this) · Part of the Cortex × MOCA SBX epic · Not in #905's breakdown · MOCA contract: MI1 §8.5 item 3
Problem
A sandbox may reach only the hosts the operator lists, for example package registries and GitHub. A request for any other host must be refused by name, never left to time out, so that the user and the agent can see why.
What Cortex does today
skip_hosts is a bypass list: matching hosts skip the outbound pipeline (listener/skiphost/skiphost.go:46). An opa rule on the CONNECT pipeline might express an allow list; this has not been checked.
What MOCA needs
Applied to both the CONNECT target and absolute-form http:// hosts.
Off-list → 403 destination_denied, with header X-Moca-Egress-Error and a destination_denied: <host> text body.
One audit event per refusal.
Design questions
Is this a listener feature, or an opa policy shipped with the MOCA profile? If policy, it must run before any dial and before interception.
Activity
fix: HTML-escape the name in MocaRefusal's body (#1483)
fix: Deny a stray-bracket destination instead of panicking (#1483)
Merge main into fix/sbx-egress-allowlist (#1483)
docs: Name the listener scope of the egress allow list (#1483)
Merge main into fix/sbx-egress-allowlist (#1483)
docs: Name enforce-redirect in the egress allow list's scope note (#1483
Feat: Deny-by-default egress allow list for the forward proxy (#1548)