Skip to content

Add pattern matching for MITM hooks#18168

Merged
evawong-oai merged 5 commits intocodex/mitm-proxy-landingfrom
codex/mitm-hook-wildcards-landing
Apr 16, 2026
Merged

Add pattern matching for MITM hooks#18168
evawong-oai merged 5 commits intocodex/mitm-proxy-landingfrom
codex/mitm-hook-wildcards-landing

Conversation

@evawong-oai
Copy link
Copy Markdown
Contributor

@evawong-oai evawong-oai commented Apr 16, 2026

Summary

  1. Add explicit pattern matching for MITM hook path, query, and header constraints.
  2. Keep literal matching as the default and require pattern: for wildcard style matching.
  3. Keep literal: as the escape when a value starts with a reserved prefix.
  4. Document the exact TOML shape and matcher semantics in the proxy README.

Scope

  1. This PR stays within MITM hook request matching on top of codex/mitm-proxy-landing.
  2. It does not add secret sourcing, trust distribution, feature gating, or platform rollout work.
  3. It also carries the minimal inherited test callsite comment fixes needed to unblock argument comment lint on this stacked branch.

Safety

  1. Path matching keeps segment boundaries, so * and ? do not cross /.
  2. Invalid pattern syntax fails during hook compilation before activation.
  3. Literal values that start with pattern: can still be expressed with literal:.

Validation

  1. cargo fmt --all
  2. git diff --check
  3. cargo test -p codex-network-proxy

@evawong-oai evawong-oai marked this pull request as ready for review April 16, 2026 20:51
@evawong-oai evawong-oai merged commit 90964e9 into codex/mitm-proxy-landing Apr 16, 2026
20 of 23 checks passed
@evawong-oai evawong-oai deleted the codex/mitm-hook-wildcards-landing branch April 16, 2026 20:51
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2026
@evawong-oai evawong-oai requested a review from viyatb-oai April 16, 2026 21:08
@evawong-oai evawong-oai changed the title Support wildcard matching in MITM hooks Add pattern matching for MITM hooks Apr 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant