Skip to content

M4: Route every pipeline stage through the ActionGateway and FlagFirewall #72

Done

Description

@h45sh

Context

ether pipeline and the MCP execute_pipeline tool do not go through the execution gateway.

  • SupervisedExecutionService.execute_pipeline (src/ether/services/execution.py:331-333) preflights only the first stage, and calls preflight_verify(..., flags=""). preflight_verify is not ActionGateway.validate_action: it does not run FlagFirewall.
  • PipelineEngine (src/ether/core/pipeline.py:149-172) then calls adapter.execute_action(target_finding, stage.params, context) directly, forwarding every parsed key=value from the expression with no validation.

As a result, no FlagFirewall, no shell-metacharacter check, no CIDR/scope check and no per-stage destination check runs for the first-stage flags or for any downstream stage. It is reachable from the agent-facing MCP tool (src/ether/mcp/server.py:824), not only from an operator CLI.

Concrete consequences under GatePolicy.SAFE:

  • ether pipeline 'nmap(target=10.0.0.5, flags=-oN /tmp/pwned --script=/tmp/x.nse)' bypasses the firewall entries (-oN, --script) that block the same flags on ether run / execute_tool.
  • An expression with no target= defaults to 127.0.0.1 (pipeline.py:136), which bypasses the loopback block since nothing validates that seed target.
  • Downstream stages consume graph-derived targets without any destination validation.

Acceptance criteria

  • Build an ActionRequest per stage and call ActionGateway.validate_action (plus preflight_verify with the real flags) before any adapter runs.
  • Run FlagFirewall against pipeline flags, including first-stage flags, with regressions for -oN, --script, --config, -iL under SAFE.
  • Reject pipeline parameters not declared by the manifest instead of forwarding them to the adapter.
  • Validate the explicit/implicit stage-0 target and every graph-derived target against EngagementScope.
  • Add a test proving a blocked flag or out-of-scope target fails the pipeline while a clean pipeline still runs.

Out of scope

Changing pipeline syntax or adding stages.

Part of #27

Related to #68

Activity

  1. added this to the M4 Boundary milestone on Nov 30, 2026
  2. added
    type:security
    area:gateway
    priority:P0
    on Nov 30, 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:P0type:security

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions