Skip to content

Prompt before trusting local project directories - #36960

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/850e6f54aec84d584cd161348ecdb1da89aaabd4
Aug 4, 2026
Merged

Prompt before trusting local project directories#36960
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/850e6f54aec84d584cd161348ecdb1da89aaabd4

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 4, 2026

Copy link
Copy Markdown

Prompt before trusting local project directories

Why

Trusting a directory enables project-local config, hooks, and exec policies, which can increase exposure to prompt injection. Require an explicit decision instead of automatically trusting projects whose trust level is unset.

What changed

  • Add a directory-trust step to TUI onboarding, with options to trust and continue or quit.
  • Apply trust to the Git repository root when starting from a subdirectory, persist the decision, and reload config before continuing.
  • Keep the prompt active and show the config error when trust cannot be persisted. Skip the prompt for remote workspaces and projects with an explicit trust level.

Testing

  • Cover trust-screen rendering, keyboard selection, persistence failures, and prompt visibility for explicit trust and Windows sandbox states.

## Why

Trusting a directory enables project-local config, hooks, and exec policies, which can increase exposure to prompt injection. Require an explicit decision instead of automatically trusting projects whose trust level is unset.

## What changed

- Add a directory-trust step to TUI onboarding, with options to trust and continue or quit.
- Apply trust to the Git repository root when starting from a subdirectory, persist the decision, and reload config before continuing.
- Keep the prompt active and show the config error when trust cannot be persisted. Skip the prompt for remote workspaces and projects with an explicit trust level.

## Testing

- Cover trust-screen rendering, keyboard selection, persistence failures, and prompt visibility for explicit trust and Windows sandbox states.

GitOrigin-RevId: 850e6f54aec84d584cd161348ecdb1da89aaabd4
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/850e6f54aec84d584cd161348ecdb1da89aaabd4 branch from 76739c9 to 17801b4 Compare August 4, 2026 19:48
@copyberry
copyberry Bot merged commit 17801b4 into main Aug 4, 2026
20 of 24 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/850e6f54aec84d584cd161348ecdb1da89aaabd4 branch August 4, 2026 19:49
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 4, 2026
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.

2 participants