Skip to content

Use a dedicated matcher for network domain policies - #51897

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/64f65fcda1a50998d70e046445d22cd2d2dcf27a
Oct 8, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/64f65fcda1a50998d70e046445d22cd2d2dcf27a

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Use a dedicated matcher for network domain policies

Why

Network domain rules need explicit wildcard semantics independent of filesystem glob syntax, including matching Unicode hosts with ?.

What changed

Replace globset in network allowlist and denylist matching with a domain matcher. Make ? consume one Unicode scalar value, retain ASCII case-insensitive matching and existing host normalization, and preserve the distinction between *.example.com and **.example.com.

Reject empty patterns, repeated wildcards outside the supported **. prefix, character classes, brace expansions, escapes, slashes, and embedded whitespace when loading policies. Continue allowing global wildcards only in allowlists.

Testing

Add coverage for Unicode wildcard semantics, unsupported syntax, IPv6 normalization, invalid entries in either policy list, and adversarial matching inputs. Compare the matcher against an independent dynamic-programming implementation over exhaustive short inputs.

## Why

Network domain rules need explicit wildcard semantics independent of filesystem glob syntax, including matching Unicode hosts with `?`.

## What changed

Replace `globset` in network allowlist and denylist matching with a domain matcher. Make `?` consume one Unicode scalar value, retain ASCII case-insensitive matching and existing host normalization, and preserve the distinction between `*.example.com` and `**.example.com`.

Reject empty patterns, repeated wildcards outside the supported `**.` prefix, character classes, brace expansions, escapes, slashes, and embedded whitespace when loading policies. Continue allowing global wildcards only in allowlists.

## Testing

Add coverage for Unicode wildcard semantics, unsupported syntax, IPv6 normalization, invalid entries in either policy list, and adversarial matching inputs. Compare the matcher against an independent dynamic-programming implementation over exhaustive short inputs.

GitOrigin-RevId: 64f65fcda1a50998d70e046445d22cd2d2dcf27a
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/64f65fcda1a50998d70e046445d22cd2d2dcf27a branch from bb6dd98 to 529cd6b Compare October 8, 2026 01:12
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-08T01:12:52.766573Z bb6dd98 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit 529cd6b into main Oct 8, 2026
11 of 18 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/64f65fcda1a50998d70e046445d22cd2d2dcf27a branch October 8, 2026 01:12
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 8, 2026
@thePober
thePober deployed to issue-triage October 8, 2026 01:14 — with Image GitHub Actions Active
@thePober
thePober deployed to issue-triage October 8, 2026 01:14 — with Image GitHub Actions Active
@thePober
thePober deployed to issue-triage October 8, 2026 01:14 — with Image GitHub Actions Active
@nimz
nimz deployed to issue-triage October 8, 2026 01:14 — with Image GitHub Actions Active
@nimz
nimz deployed to issue-triage October 8, 2026 01:14 — with Image GitHub Actions Active
@nimz
nimz deployed to issue-triage October 8, 2026 01:14 — with Image GitHub Actions Active
@anotb
anotb deployed to issue-triage October 8, 2026 01:14 — with Image GitHub Actions Active
@anotb
anotb deployed to issue-triage October 8, 2026 01:14 — with Image GitHub Actions Active
@anotb
anotb deployed to issue-triage October 8, 2026 01:14 — with Image GitHub Actions Active
@thePober
thePober deployed to issue-triage October 8, 2026 01:15 — with Image GitHub Actions Active
@nimz
nimz deployed to issue-triage October 8, 2026 01:15 — with Image GitHub Actions Active
@anotb
anotb deployed to issue-triage October 8, 2026 01:15 — with Image GitHub Actions Active
@ofogs11
ofogs11 deployed to issue-triage October 8, 2026 01:29 — with Image GitHub Actions Active
@ofogs11
ofogs11 deployed to issue-triage October 8, 2026 01:29 — with Image GitHub Actions Active
@ofogs11
ofogs11 deployed to issue-triage October 8, 2026 01:29 — with Image GitHub Actions Active
@rokoo44
rokoo44 deployed to issue-triage October 8, 2026 01:51 — with Image GitHub Actions Active
@rokoo44
rokoo44 deployed to issue-triage October 8, 2026 01:51 — with Image GitHub Actions Active
@rokoo44
rokoo44 deployed to issue-triage October 8, 2026 01:51 — with Image GitHub Actions Active
@ChengOpus
ChengOpus deployed to issue-triage October 8, 2026 02:00 — with Image GitHub Actions Active
@ChengOpus
ChengOpus deployed to issue-triage October 8, 2026 02:00 — with Image GitHub Actions Active
@ChengOpus
ChengOpus deployed to issue-triage October 8, 2026 02:00 — with Image GitHub Actions Active
@leejss
leejss deployed to issue-triage October 8, 2026 02:03 — with Image GitHub Actions Active
@leejss
leejss deployed to issue-triage October 8, 2026 02:03 — with Image GitHub Actions Active
@leejss
leejss deployed to issue-triage October 8, 2026 02:03 — with Image GitHub Actions Active
@leejss
leejss deployed to issue-triage October 8, 2026 02:04 — with Image GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — 529cd6b8 Deployed Oct 8, 2026 by leejss via Identify potential duplicates (open issues fallback) #52866
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.

10 participants