Skip to content

[MOCA SBX] Deny-by-default destination allow list #1483

Closed

Description

@pdettori

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.

Done when

Conformance case off_allowlist_named_403 passes.

Activity

  1. added
    enhancement
    on Oct 22, 2026
  2. self-assigned this
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions