Skip to content

policy advisor: approving an API proposal merges an inert rule (no binaries / any_binary) #6212

Backlog

Description

@guimou

What happens

A policy-advisor proposal submitted through the in-sandbox API (POST http://policy.local/v1/proposals with a plain host:port endpoint) is accepted and listed as a pending chunk, but approving it merges a rule that matches no process, so the host stays denied. Denial-draft chunks (which carry the requesting binary) approve correctly.

Reproduction (gateway 0.1.11)

  1. In a sandbox with agent_policy_proposals_enabled=true and proposal_approval_mode=manual, POST:
    {"intent_summary":"probe","operations":[{"addRule":{"ruleName":"advisor_probe","rule":{"endpoints":[{"host":"example.com","port":443}]}}}]}
    → 202, one pending chunk (L4, enforcement: UNSPECIFIED, no binary).
  2. Approve it (console/ApproveDraftChunk) → 200; the effective policy gains the rule with no binaries and no any_binary.
  3. Connect to example.com:443 from the sandbox → still denied; supervisor logs transparent_tcp_policy_denied.

Control: a denial-draft chunk for a denied host carries the requesting binary; approving it makes the connection succeed. No external services are needed to reproduce; example.com is enough.

Expected

An API-origin chunk has no binary context, so the approved NetworkRule should carry any_binary: true (or the proposal API should derive/require the requesting binary), and the approved host should become reachable. Today NetworkRule declares "either a nonempty binary list or any_binary, never both" — an empty list with any_binary=false matches nothing.

Why it matters

The advisor's API half is the advertised interface: POST /v1/proposals let an agent request a host, but approving the request has no effect, so the feature is advisory-only and silently so.

Notes

  • ApproveDraftChunkRequest carries only chunk_id, review_token, sandbox, request_id, so a caller cannot add any_binary at approve time.
  • Not reproducible with a denial draft (binary present); this is specific to API proposals.

Activity

  1. added
    state:triage-needed
    on Dec 3, 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

    state:triage-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions