Skip to content

M4: Apply the engagement's loopback policy to entity-target validation #88

Backlog

Description

@h45sh

Context

src/ether/gateway/gate.py:447 — validate_action checks a selected entity with
is_blocked_destination(pik_str) and no allow_loopback argument, so the
function's default True applies. The command-argument path 70 lines earlier
reads the engagement scope instead
(is_blocked_destination(flags_str, allow_loopback=allow_loopback),
gate.py:377), as do the preflight call sites. Under GatePolicy.SAFE with the
default EngagementScope (allow_loopback=False), the same loopback address is
rejected when it arrives as a flag and accepted when it arrives as a stored
entity the adapter then scans.

Proof

Proof withheld: private advisory. Reproduced under the audited policy at the ref in the footer; the minimal reproducer and its observed output are held in the audit's private store (mode 0600) and are available to maintainers on request.

Impact

Default SAFE policy. An agent can register a discovered loopback host (or
any host that resolves to loopback) as a target entity and run tools against
host-local services — dev servers, MCP bridges, admin APIs — without the operator
enabling loopback. Metadata addresses remain blocked by BLOCKED_TARGETS, so
this is loopback scope, not metadata.

Acceptance criteria

  • validate_action passes the engagement's loopback policy when checking a target entity
  • A regression test stores a loopback host and asserts SAFE rejects it while allow_loopback=True accepts it
  • A mechanical guard asserts every is_blocked_destination call site passes an explicit allow_loopback
  • The metadata-entity test still blocks for the metadata reason, not by accident

Out of scope

Changing the default of is_blocked_destination; other callers rely on it.

Part of #27

Related to #11


audit:proven · run 2026-12-08 · ref origin/dev@db5fc07 · cell boundary×security

Activity

  1. added this to the M4 Boundary milestone on Dec 1, 2026
  2. added
    type:security
    area:gateway
    priority:P1
    on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:gatewaypriority:P1type:security

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions