Skip to content

refactor(plugin): port security policy resolution to TypeScript - #799

Open
kmbroai wants to merge 2 commits into
dev/kyleb/python-free-windows-wide-pathsfrom
dev/kyleb/python-free-policy-resolver
Open

refactor(plugin): port security policy resolution to TypeScript#799
kmbroai wants to merge 2 commits into
dev/kyleb/python-free-windows-wide-pathsfrom
dev/kyleb/python-free-policy-resolver

Conversation

@kmbroai

@kmbroai kmbroai commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Replace the Python SECURITY.md resolver and its tests with a typed helper bundled alongside the MCP runtime. Policy discovery and root-to-leaf guidance now run through the existing Node launcher.

Stacked on #798.

Changes

  • Preserve policy containment, symlink and junction behavior, the existing byte limit, UTF-8 handling, home expansion, inventory ordering, argument behavior, and output formats.
  • Use the native primitives for POSIX path bytes and Windows UTF-16 arguments, environment values, working directories, and filesystem paths. Compare canonical Windows path components without losing characters during Unicode case conversion.
  • Update callers to launch_codex_security_mcp[.cmd] --helper resolve-security-md --repo PATH [--list | --scope PATH] [--out PATH]; output still defaults to stdout. There are no new top-level CLI flags.
  • Remove the migrated Python implementation and tests. Add built-helper coverage and Windows runtime proofs on Node 20.0 and 22.13.

Testing

  • Built policy and launcher tests: 34 passed on each of Node 20.0 and 22.13; four Windows-only tests skipped locally. Original-Python policy comparisons and 1,350 Windows path comparisons per runtime matched.
  • SDK/MCP types, formatting, Rust checks for both Windows targets, Ruff, and portable source checks passed.
  • The actual tarball passed installed CLI, SDK, MCP, credential-locking, and nested-worker checks. Its extracted helper resolved policies and listed inventory on both Node versions with an empty PATH.
  • Two full SDK runs passed: 2,171 passed, 45 skipped, zero failures per run (seeds 12345 and 1197252949).
  • Three fresh independent reviews and a separate verification pass found no actionable issues on the final commit.

Risk and rollout

The helper entrypoint changes from the Python script to the shared launcher; repository callers are updated together. Other Python helpers remain until their migration slices land. The package uses the current verified native artifacts. Actual Windows execution of the new policy helper is a hosted CI gate and was not run on the local Linux host.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
🔒 Security Review Completed 2026-09-03T03:39:47.099565Z 1eb78b2 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant