Skip to content

Harden network proxy MITM authorization - #37211

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/8812a980ac64a97cbac3a237376d29be5ded9220
Aug 6, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/8812a980ac64a97cbac3a237376d29be5ded9220

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

Harden network proxy MITM authorization

Why

MITM hooks authorize requests before the upstream server parses them. Paths that
can be decoded or normalized to a different resource must not match an allowed
path, and hosts that require MITM inspection must not bypass it through the
plain HTTP proxy path.

What changed

  • Reject ambiguous hook paths, including traversal segments, backslashes,
    malformed percent encodings, and encoded separators or percent signs.
  • Block plain HTTP proxy requests for hosts whose policy always requires MITM,
    recording the decision as mitm_required.

Testing

  • Cover safe and ambiguous path forms, encoded traversal through repository
    allowlists, and absolute-form HTTPS requests sent to the HTTP proxy.

## Why

MITM hooks authorize requests before the upstream server parses them. Paths that
can be decoded or normalized to a different resource must not match an allowed
path, and hosts that require MITM inspection must not bypass it through the
plain HTTP proxy path.

## What changed

- Reject ambiguous hook paths, including traversal segments, backslashes,
  malformed percent encodings, and encoded separators or percent signs.
- Block plain HTTP proxy requests for hosts whose policy always requires MITM,
  recording the decision as `mitm_required`.

## Testing

- Cover safe and ambiguous path forms, encoded traversal through repository
  allowlists, and absolute-form HTTPS requests sent to the HTTP proxy.

GitOrigin-RevId: 8812a980ac64a97cbac3a237376d29be5ded9220
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/8812a980ac64a97cbac3a237376d29be5ded9220 branch from 9350353 to 7a0e974 Compare August 6, 2026 03:57
@copyberry
copyberry Bot merged commit 7a0e974 into main Aug 6, 2026
30 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/8812a980ac64a97cbac3a237376d29be5ded9220 branch August 6, 2026 03:58
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 6, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — 7a0e974e Deployed Aug 6, 2026 by locus3309 via Generate label suggestions #36388
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.