Skip to content

Add opt-in Unicode canonical matching to exec policy rules - #59535

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/c2f79069dc38d55c77028c457b22beb468d5c571
Nov 5, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Add opt-in Unicode canonical matching to exec policy rules

What changed

  • Support canonical_matching=True in prefix_rule and canonical_matching = true in managed TOML prefix rules. Apply Unicode canonical caseless matching to every prefix token, including alternatives, while keeping exact matching as the default.
  • Match case and canonically equivalent Unicode spellings, such as bash and bAſh, without resolving executables on the filesystem.
  • Preserve managed restrictions when checking absolute-path rule amendments, and enforce applicable host_executable path allowlists during basename fallback.

Testing

Add coverage for case folding, Unicode normalization, token alternatives, exact-match defaults, and host executable allowlists. Extend managed-policy and shell-execution tests to cover canonical matching.

## What changed

- Support `canonical_matching=True` in `prefix_rule` and `canonical_matching = true` in managed TOML prefix rules. Apply Unicode canonical caseless matching to every prefix token, including alternatives, while keeping exact matching as the default.
- Match case and canonically equivalent Unicode spellings, such as `bash` and `bAſh`, without resolving executables on the filesystem.
- Preserve managed restrictions when checking absolute-path rule amendments, and enforce applicable `host_executable` path allowlists during basename fallback.

## Testing

Add coverage for case folding, Unicode normalization, token alternatives, exact-match defaults, and host executable allowlists. Extend managed-policy and shell-execution tests to cover canonical matching.

GitOrigin-RevId: c2f79069dc38d55c77028c457b22beb468d5c571
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/c2f79069dc38d55c77028c457b22beb468d5c571 branch from aecd170 to de6e72a Compare November 5, 2026 00:55
@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-11-05T00:55:58.933759Z aecd170 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 de6e72a into main Nov 5, 2026
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/c2f79069dc38d55c77028c457b22beb468d5c571 branch November 5, 2026 00:56
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 5, 2026

This branch was previously deployed

1 inactive deployment
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.

5 participants