Skip to content

M4: Upgrade FlagFirewall to typed manifest flag contracts #68

Backlog

Description

@h45sh

Context

src/ether/gateway/flags.py parses arguments with loose heuristics: positional targets are accepted by regex, macros are not expanded, and manifest flags are only checked as an allowlist. Forms like -p80,443, --port=8443, and -T4 are not validated against typed contracts.

Acceptance criteria

  • Validate flags against typed manifest contracts, including value arity and ranges.
  • Expand {target}, {domain}, and {wordlist} macros before validation.
  • Track multi-flag expect_value correctly across = and space-separated forms.
  • Reject positional tokens that are not well-formed targets.
  • Add bypass tests for each accepted and rejected form.

Out of scope

New adapters or new manifest sections beyond flag contracts.

Part of #27

Activity

  1. added this to the M4 Boundary milestone on Nov 29, 2026
  2. added
    type:security
    area:gateway
    priority:P1
    on Nov 29, 2026
  3. h45sh commented on Dec 1, 2026

    @h45sh
    OwnerAuthor

    Observed FlagFirewall friction under default GatePolicy.SAFE:

    • Ether's own built-in gobuster --profile fast fails preflight with PreflightGateRejected: Unvalidated positional argument 'dir' rejected for 'gobuster' under SAFE policy.
    • nmap --min-rate is also blocked under SAFE policy, causing full-port TCP connect scans over WAN to stall until timeout.
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