feat: enforce scoped Codex task reads - #723
Conversation
|
Superseded by #724, opened from the intended personal account. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 22dac7a6e1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| throw new Error("Choose either --resume/--resume-last or --fresh."); | ||
| } | ||
| const write = Boolean(options.write); | ||
| const readRoots = (options["read-root"] ?? []).map((readRoot) => resolveReadRoot(cwd, readRoot)); |
There was a problem hiding this comment.
Preserve empty read-root tokens in raw invocations
When task is invoked through the documented task "<raw arguments>" form, splitRawArgumentString() discards a quoted empty token. Thus input such as --read-root '' src inspect is parsed as though src were the root; if that directory exists, this line validates and grants access to a root the user never supplied, while also removing src from the prompt instead of failing closed. Preserve empty quoted tokens so resolveReadRoot() can reject them before positional arguments shift.
Useful? React with 👍 / 👎.
Summary
--read-root <directory>support for Codex task and rescue flowsVerification
npm test(97 passed)npm run buildnode scripts/bump-version.mjs --check 1.0.11claude plugin validate plugins/codexgit diff --check