refactor(plugin): port security policy resolution to TypeScript - #799
refactor(plugin): port security policy resolution to TypeScript#799kmbroai wants to merge 7 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
Security findingsBlocking findings (1)
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
1eb78b2 to
7a77479
Compare
7a77479 to
2228b64
Compare
2228b64 to
0216913
Compare
0216913 to
ad511ed
Compare
There was a problem hiding this comment.
💡 Codex Security Review
Here are some automated security review suggestions for this pull request.
Reviewed commit: ad511edcbb
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
mldangelo-oai
left a comment
There was a problem hiding this comment.
Re-reviewed the exact current head and reconciled all prior threads. The compatibility behavior is well covered; the remaining comments are nonblocking simplification and documentation cleanup.
ad511ed to
9986e31
Compare
|
|
||
| On Windows, use `launch_codex_security_mcp.cmd` with the same arguments. The launcher reuses the plugin's configured or bundled Node runtime and preserves the working directory for relative helper paths. | ||
|
|
||
| The launcher preserves the public Python helper's argument and path behavior. Prefer the full option names shown above; unique long-option prefixes such as `--r`, `--s`, and `--o` remain accepted. The inherited help forms (`-h`, `--help`, `-hh`, and `-hfoo`) and help short-circuiting of unrelated parse errors are retained. Missing option values and invalid attached values still fail before later help. Detached negative-number paths and otherwise unrecognized dash-leading values containing spaces remain accepted as option values; `--repo=-1` and corresponding full-option `=` forms are unambiguous. |
There was a problem hiding this comment.
[P3] Keep migration archaeology out of operator guidance
Thanks for making the compatibility choice explicit. These three paragraphs now spend 274 words on parser error ordering, pathological home-variable states, and a GNU realpath discrepancy—details an agent invoking the helper cannot act on. Could we replace them with the actionable contract, for example:
For compatibility, the resolver retains the former Python helper's option abbreviations, help parsing, home expansion, and path resolution; prefer the full option names shown above.
Quote tilde paths so the helper expands them for
--repoand--scope;--outkeeps tildes literal, and--out -writes to stdout.
That preserves the supported surface while cutting about 227 words and avoids turning implementation quirks into durable product guidance.
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 use the existing Node launcher.
Changes
launch_codex_security_mcp[.cmd] --helper resolve-security-md --repo PATH [--list | --scope PATH] [--out PATH], defaulting to stdout. Limit the SDK's Python interpreter instruction to.pyhelper scripts.Testing
Fileintegration: both MSVC-target Clippy checks, CI-tool compilation, proof syntax, Rust/TypeScript formatting, workflow lint, Ruff, portable source checks, and all nine checker tests passed.Risk and rollout
Stacked on #798. The helper entrypoint changes from the Python script to the shared launcher, with callers updated together. Previously accepted arguments and home expansion remain supported intentionally. GNU Linux
file/..compatibility requires retaining the existing resolver; native realpath is not a drop-in replacement. Other Python helpers remain for subsequent migration slices. There are no new top-level CLI flags.Public disclosure review