Skip to content

feat: enforce scoped Codex task reads - #723

Closed
kil-penguin wants to merge 5 commits into
openai:mainfrom
kil-penguin:feat/scoped-codex-read-roots
Closed

feat: enforce scoped Codex task reads#723
kil-penguin wants to merge 5 commits into
openai:mainfrom
kil-penguin:feat/scoped-codex-read-roots

Conversation

@kil-penguin

Copy link
Copy Markdown

Summary

  • add repeatable --read-root <directory> support for Codex task and rescue flows
  • enforce request-scoped permission profiles across foreground, background, and resumed tasks
  • fail closed for invalid roots, unsupported runtimes, and unapproved temp/workspace access
  • document the option and add regression coverage

Verification

  • npm test (97 passed)
  • npm run build
  • node scripts/bump-version.mjs --check 1.0.11
  • claude plugin validate plugins/codex
  • git diff --check

@kil-penguin
kil-penguin requested a review from a team September 4, 2026 01:42
@kil-penguin

Copy link
Copy Markdown
Author

Superseded by #724, opened from the intended personal account.

@kil-penguin kil-penguin closed this Sep 4, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

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.

2 participants